- 已编辑
先上错误log
[sudo] password for lan:
W1216 00:51:15.874111 12645 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
kubeadm join lb.kubesphere.local:6443 --token ii8gns.kuxurz3i0qxr6dlm --discovery-token-ca-cert-hash sha256:3f15b07eb8d32d115e3dcb88a6f38e54e6ec2686092bc50d5a76d43cef9dece6
[lanx 192.168.1.102] MSG:
sudo: /etc/sudoers.d is world writable
[sudo] password for lan:
lanx v1.18.3 [map[address:192.168.1.102 type:InternalIP] map[address:lanx type:Hostname]]
ERRO[00:51:16 CST] illegal base64 data at input byte 4 node=192.168.1.102
WARN[00:51:16 CST] Task failed ...
WARN[00:51:16 CST] error: interrupted by error
Error: Failed to init kubernetes cluster: interrupted by error
Usage:
kk create cluster [flags]
我的kk配置文件:
lan@lanx:~/repo/git/kubekey$ cat kk.config
apiVersion: kubekey.kubesphere.io/v1alpha1
kind: Cluster
metadata:
name: sample
spec:
hosts:
- {name: lanx, address: 192.168.1.102, internalAddress: 192.168.1.102, user: lan, password: 123}
- {name: kube254, address: 192.168.1.254, internalAddress: 192.168.1.254, user: root, password: 123}
roleGroups:
etcd:
- lanx
master:
- lanx
worker:
- lanx
- kube254
...
当前pod情况:
lan@lanx:~$ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-6b55b6764d-4lnhg 0/1 Pending 0 9m4s
kube-system coredns-6b55b6764d-w6ckj 0/1 Pending 0 9m4s
kube-system kube-apiserver-lanx 1/1 Running 0 9m14s
kube-system kube-controller-manager-lanx 1/1 Running 0 9m14s
kube-system kube-proxy-tr6s4 1/1 Running 0 9m4s
kube-system kube-scheduler-lanx 1/1 Running 0 9m14s
kube-system nodelocaldns-tjm8n 1/1 Running 0 9m4s
看起来像是准备部署CNI的时候出错了,简单搜索了下源码,应该是在runner.go中的提示:
如果其他人有类似的经验麻烦提示一下,明晚我会尝试在kk源码中加点log跟踪一下出错的步骤,在此之前感谢任何帮助!