执行 命令:
[root@oldxin-master17 ~]# kubeadm init --apiserver-advertise-address=192.168.1.17 --image-repository registry.aliyuncs.com/google_containers --kubernetes-version v1.20.5 --service-cidr=10.96.0.0/12 --pod-network-cidr=10.244.0.0/16
发生报错信息:
原报错:
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/ error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR Port-6443]: Port 6443 is in use [ERROR Port-10259]: Port 10259 is in use [ERROR Port-10257]: Port 10257 is in use
初步判定为端口占用,杀死进程
解决方案:
尝试杀死进程都没有用,最终重启一下kubeadm就可以了,如下:
[root@k8s-master01 ~]# kubeadm reset