Skip to content

Commit

Permalink
增加 pod-infra-container 可选择配置
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmzj committed Jan 10, 2019
1 parent a1be546 commit edd68c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions roles/kube-node/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# 默认使用kube-proxy的 'iptables' 模式,可选 'ipvs' 模式(experimental)
PROXY_MODE: "iptables"

# 基础容器镜像
SANDBOX_IMAGE: "mirrorgooglecontainers/pause-amd64:3.1"
#SANDBOX_IMAGE: "registry.access.redhat.com/rhel7/pod-infrastructure:latest"

# Kubelet 根目录
KUBELET_ROOT_DIR: "/var/lib/kubelet"

Expand Down
3 changes: 1 addition & 2 deletions roles/kube-node/templates/kubelet.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Requires=docker.service

[Service]
WorkingDirectory=/var/lib/kubelet
#--pod-infra-container-image=registry.access.redhat.com/rhel7/pod-infrastructure:latest
ExecStart={{ bin_dir }}/kubelet \
--address={{ inventory_hostname }} \
--allow-privileged=true \
Expand All @@ -24,7 +23,7 @@ ExecStart={{ bin_dir }}/kubelet \
--kubeconfig=/etc/kubernetes/kubelet.kubeconfig \
--max-pods={{ MAX_PODS }} \
--network-plugin=cni \
--pod-infra-container-image=mirrorgooglecontainers/pause-amd64:3.1 \
--pod-infra-container-image={{ SANDBOX_IMAGE }} \
--register-node=true \
--root-dir={{ KUBELET_ROOT_DIR }} \
--tls-cert-file={{ ca_dir }}/kubelet.pem \
Expand Down

0 comments on commit edd68c7

Please sign in to comment.