kubeadmin 安装k8s 1.23.3

网友投稿 285 2022-10-20

kubeadmin 安装k8s 1.23.3

拉去镜像

#!/bin/bash version="1.23.4"images=`kubeadm config images list --kubernetes-version=${version} |awk -F'/' '{print $2}'`for imageName in ${images[@]};do docker pull registry.aliyuncs.com/google_containers/$imageName# docker pull gcr.azk8s.cn/google-containers/$imageName docker tag registry.aliyuncs.com/google_containers/$imageName k8s.gcr.io/$imageName# docker rmi gcr.azk8s.cn/google-containers/$imageNamedone

初始化

[root@master ~]# cat 2.sh #!/bin/bash kubeadm init --kubernetes-version=v1.23.4 --pod-network-cidr=10.244.0.0/16 --service-cidr=10.96.0.0/12 --apiserver-advertise-address=192.168.96.140 --ignore-preflight-errors=NumCPU --image-repository registry.aliyuncs.com/google_containersYour 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/configAlternatively, if you are the root user, you can run: export KUBECONFIG=/etc/kubernetes/admin.confYou should now deploy a pod network to the cluster.Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at: you can join any number of worker nodes by running the following on each as root:kubeadm join 192.168.96.140:6443 --token 1xm28c.3nfm1b3e4z80l829 \ --discovery-token-ca-cert-hash sha256:d877ae5ec7e9c482a43449c5033d5ed0cf1073bce071ba0c16b5594978d57da5

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:SpringBoot2.x设置Session失效时间及失效跳转方式
下一篇:基于docker的cicd
相关文章

 发表评论

暂时没有评论,来抢沙发吧~