[k8s] Fix instance ID issue with podman and autoscaler
Adding the volume mount for /etc/machine-id so that the kubelet
boostraped by podman can access the correct instance ID. Without
this, autoscaler will fail to delete empty node. This issue is
reported on autoscaler repo[1].
[1] https://github.com/kubernetes/autoscaler/issues/2819
Task: 38743
Story: 2007286
Change-Id: I2852f4b255e782bb65b13571502194ee9f455ae3
(cherry picked from commit eb2b688f3e
)
This commit is contained in:
parent
a75d8be424
commit
7e89ac65a4
|
@ -201,6 +201,7 @@ ExecStart=/bin/bash -c '/usr/bin/podman run --name kubelet \\
|
|||
--volume /var/run:/var/run \\
|
||||
--volume /var/run/lock:/var/run/lock:z \\
|
||||
--volume /opt/cni/bin:/opt/cni/bin:z \\
|
||||
--volume /etc/machine-id:/etc/machine-id \\
|
||||
\${CONTAINER_INFRA_PREFIX:-k8s.gcr.io/}hyperkube:\${KUBE_TAG} \\
|
||||
kubelet \\
|
||||
\$KUBE_LOGTOSTDERR \$KUBE_LOG_LEVEL \$KUBELET_API_SERVER \$KUBELET_ADDRESS \$KUBELET_PORT \$KUBELET_HOSTNAME \$KUBELET_ARGS'
|
||||
|
|
|
@ -98,6 +98,7 @@ ExecStart=/bin/bash -c '/usr/bin/podman run --name kubelet \\
|
|||
--volume /var/run:/var/run \\
|
||||
--volume /var/run/lock:/var/run/lock:z \\
|
||||
--volume /opt/cni/bin:/opt/cni/bin:z \\
|
||||
--volume /etc/machine-id:/etc/machine-id \\
|
||||
\${CONTAINER_INFRA_PREFIX:-k8s.gcr.io/}hyperkube:\${KUBE_TAG} \\
|
||||
kubelet \\
|
||||
\$KUBE_LOGTOSTDERR \$KUBE_LOG_LEVEL \$KUBELET_API_SERVER \$KUBELET_ADDRESS \$KUBELET_PORT \$KUBELET_HOSTNAME \$KUBELET_ARGS'
|
||||
|
|
Loading…
Reference in New Issue