我有一个现有的 K8 集群,我想向其中添加一个节点。似乎存在版本问题,我不确定如何解决。
当我尝试加入新节点(使用kubeadm join
):
...
[kubelet] Downloading configuration for the kubelet from the "kubelet-config-1.12" ConfigMap in the kube-system namespace
configmaps "kubelet-config-1.12" is forbidden: User "system:bootstrap:rsezn8" cannot get configmaps in the namespace "kube-system"
在现有节点上:
[root@kube0 ~]# kubeadm version
kubeadm version: &version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.1", GitCommit:"4ed3216f3ec431b140b1d899130a69fc671678f4", GitTreeState:"clean", BuildDate:"2018-10-05T16:43:08Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}
[root@kube0 ~]# rpm -qa | grep kube
kubeadm-1.12.1-2.x86_64
kubernetes-cni-0.6.0-2.x86_64
kubectl-1.12.1-2.x86_64
kubelet-1.12.1-2.x86_64
在(假定的)新节点上:
[root@kube4 ~]# rpm -qa | grep kube
kubectl-1.12.1-0.x86_64
kubelet-1.12.1-0.x86_64
kubernetes-cni-0.6.0-0.x86_64
kubeadm-1.12.1-0.x86_64
在主节点上:
[root@kube-master kubernetes]# kubectl get configmap -n kube-system
NAME DATA AGE
coredns 1 106d
extension-apiserver-authentication 6 106d
filebeat-config 1 16d
filebeat-inputs 1 16d
kube-proxy 2 106d
kubeadm-config 1 106d
kubelet-config-1.11 1 106d
kubernetes-dashboard-settings 1 105d
weave-net 0 106d
[root@kube-master kubernetes]# kubelet --version
Kubernetes v1.12.1
当我查看以前针对此问题的解决方案时(这里)看起来新节点是更高版本比现有版本要新。就我而言,情况恰恰相反。(yum update
不显示任何较新版本)
另一个问题是kubelet-配置-1.11。这是我的问题吗?我该如何解决?