kubernetes: failed to load Kubelet config file /var/lib/kubelet/config.yaml after kubelet update
Is this a BUG REPORT or FEATURE REQUEST?:
Uncomment only one, leave it on its own line:
/kind bug
What happened: /var/lib/kubelet/config.yaml got removed after kubelet update.
What you expected to happen: kubelet update without /var/lib/kubelet/config.yaml being removed.
How to reproduce it (as minimally and precisely as possible): Yum update kubeadm.x86_64 0:1.11.0-0 kubectl.x86_64 0:1.11.0-0 kubelet.x86_64 0:1.11.0-0 Restart kubelet
Anything else we need to know?:
Environment:
- Kubernetes version (use
kubectl version
): 1.11 - Cloud provider or hardware configuration: AWS
- OS (e.g. from /etc/os-release): CentOS Linux release 7.5.1804 (Core)
- Kernel (e.g.
uname -a
): 3.10.0-862.6.3.el7.x86_64 - Install tools:
- Others:
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 16
- Comments: 27 (5 by maintainers)
Commits related to this issue
- Fixed order of the upgrade process ref: https://github.com/kubernetes/kubernetes/issues/65562 and https://github.com/kubernetes/kubernetes/issues/65863 — committed to notjames/cluster-api-provider-ssh by notjames 6 years ago
- Fixed order of the upgrade process ref: https://github.com/kubernetes… (#155) * Fixed order of the upgrade process ref: https://github.com/kubernetes/kubernetes/issues/65562 and https://github.com/ku... — committed to samsung-cnct/cluster-api-provider-ssh by notjames 6 years ago
I pasted my
config.yaml
from another similar cluster and then followed @WisWang procedure, and my cluster came back to life.Posting the conf here in case it is useful for somebody else, obviously, it may not match your cluster conf.
New installs require running
kubeadm init
See https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/#instructions
I upgrade my cluster from 1.10.3 to 1.11.0 with kubeadm. I also met this issue, I use this to generate the kubelet config file
kubeadm upgrade node config --kubelet-version v1.11.0
, andsystemctl daemon-reload&&systemctl restart kubelet
, I also changed thecgroupDriver
in/var/lib/kubelet/config.yaml
, My cluster allcgroupDriver
both docker and kubelet issystemd
, Now the node looks like ok.Hi, THis is more likely bcos the join on the kube node was invoked without the sudo command. Try again on the nodes the kubeadm join with sudo and it should work perfectly fine. Regards Ranga
But what about new installs of 1.11.0 (NOT upgrades) getting the same error on a clean CentOS
and what to do in the meantime until 1.12 is released?
Looks like the documentation issue is being addressed. Sweet!
https://github.com/kubernetes/website/pull/9509/files#diff-b4d7b9c51d0dac39e5ad31a3dac5c878R172
Additionally, here’s a way of recovering: https://github.com/kubernetes/kubernetes/issues/65562. (I had to tweak the rollback version to
apt install kubelet=1.10.5-00
.)We haven’t called it out explicitly in the past, but we are planning on calling this out explicitly in the Install docs for the 1.12 release. The kubelet and kubeadm packages should not be upgraded outside of performing the kubeadm upgrade steps for the cluster.
https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-upgrade-1-11/ has the steps needed for performing a cluster upgrade.
The cause of the issue is a configuration change that was made for the v1.11 release to enable kubelet component config (the /var/lib/kubelet/config.yaml file), as well as adding a systemd environment file to remove the recommendation of modifying systemd unit files for kubelet configuration customization that was required for previous versions.
If there are any additional issues related to the upgrade process, please file them against https://github.com/kubernetes/kubeadm which is used for tracking kubeadm-specific issues.