kubeadm常用命令

半兽人 发表于: 2020-11-03   最后更新时间: 2024-10-28 09:54:08  
{{totalSubscript}} 订阅, 2,413 游览

生产join集群命令

kubeadm token create --print-join-command

生成 kubeadm 默认配置文件

kubeadm config print init-defaults > kubeadm.yaml
kubeadm config print init-defaults --component-configs \
KubeProxyConfiguration,KubeletConfiguration > kubeadm-config.yaml

验证语法

dry-run模式验证语法

kubeadm init --config kubeadm-config.yaml --dry-run

预先拉取镜像:

查询需要的镜像

kubeadm config images list

拉取

kubeadm config images pull --image-repository registry.aliyuncs.com/google_containers

输出如下

[config/images] Pulled registry.aliyuncs.com/google_containers/kube-apiserver:v1.24.3
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-controller-manager:v1.24.3
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-scheduler:v1.24.3
[config/images] Pulled registry.aliyuncs.com/google_containers/kube-proxy:v1.24.3
[config/images] Pulled registry.aliyuncs.com/google_containers/pause:3.7
[config/images] Pulled registry.aliyuncs.com/google_containers/etcd:3.5.3-0
[config/images] Pulled registry.aliyuncs.com/google_containers/coredns:v1.8.6

创建token

kubeadm token create

查询token

kubeadm token list
更新于 2024-10-28

查看kubeadm更多相关的文章或提一个关于kubeadm的问题,也可以与我们一起分享文章