一、master上
kubeadm init \
--apiserver-advertise-address=192.168.0.120 \
--image-repository registry.aliyuncs.com/google_containers \
--kubernetes-version v1.23.6 \
--service-cidr=10.96.0.0/12 \
--pod-network-cidr=10.244.0.0/16
Your Kubernetes control-plane has initialized successfully! To start using your cluster, you need to run the following as a regular user: mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config Alternatively, if you are the root user, you can run: export KUBECONFIG=/etc/kubernetes/admin.conf You should now deploy a pod network to the cluster. Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: https://kubernetes.io/docs/concepts/cluster-administration/addons/ Then you can join any number of worker nodes by running the following on each as root: kubeadm join 192.168.0.120:6443 --token mwyx7i.uvgj1zs2djn6olh4 \ --discovery-token-ca-cert-hash sha256:14df4e8efe99cb20367a2ef7e692fc5b92c7fc2ee1aebe7eff7d20e4cadfd7a4
二、node
重置节点
kubeadm reset -f
标签:kube,kubernetes,--,cluster,集群,HOME,kubeadm,k8s,搭建 From: https://www.cnblogs.com/dxtx/p/18456272