生产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