diff --git a/src/k8s/pkg/k8sd/setup/kubelet.go b/src/k8s/pkg/k8sd/setup/kubelet.go index fe447dc02e..e4f1db3d14 100644 --- a/src/k8s/pkg/k8sd/setup/kubelet.go +++ b/src/k8s/pkg/k8sd/setup/kubelet.go @@ -44,8 +44,6 @@ func kubelet(snap snap.Snap, hostname string, nodeIP net.IP, clusterDNS string, args := map[string]string{ "--anonymous-auth": "false", "--authentication-token-webhook": "true", - "--tls-cert-file": path.Join(snap.KubernetesPKIDir(), "kubelet.crt"), - "--tls-private-key": path.Join(snap.KubernetesPKIDir(), "kubelet.key"), "--client-ca-file": path.Join(snap.KubernetesPKIDir(), "client-ca.crt"), "--container-runtime-endpoint": path.Join(snap.ContainerdSocketDir(), "containerd.sock"), "--containerd": path.Join(snap.ContainerdSocketDir(), "containerd.sock"), @@ -58,7 +56,9 @@ func kubelet(snap snap.Snap, hostname string, nodeIP net.IP, clusterDNS string, "--register-with-taints": strings.Join(taints, ","), "--root-dir": snap.KubeletRootDir(), "--serialize-image-pulls": "false", + "--tls-cert-file": path.Join(snap.KubernetesPKIDir(), "kubelet.crt"), "--tls-cipher-suites": strings.Join(kubeletTLSCipherSuites, ","), + "--tls-private-key": path.Join(snap.KubernetesPKIDir(), "kubelet.key"), } if cloudProvider != "" { args["--cloud-provider"] = cloudProvider