运维

K8s加入控制节点

# 原控制节点生成 certificate-key 执行:
kubeadm init phase upload-certs --upload-certs
I0306 10:29:11.382754  220341 version.go:256] remote version is much newer: v1.32.2; falling back to: stable-1.28
[upload-certs] Storing the certificates in Secret "kubeadm-certs" in the "kube-system" Namespace
[upload-certs] Using certificate key:
2fe28b5f0b22cbcd7d1b8d51bfe1db7975c23aaab8ba0e745af6e9f66d69c1d2
# 执行 join
# kubeadm join <control-plane-endpoint>:6443 --token <token> --discovery-token-ca-cert-hash sha256:<hash> --control-plane --certificate-key <cert-key>

kubeadm join 172.22.8.46:6443 --token xychbd.3bx8kkv3y4trsepf \
	--discovery-token-ca-cert-hash sha256:2bfa9b7845bdc3ec6e4ca63ada3b27f2e065b659015bb9ba3d6e09d3d06595e4 \
	--control-plane \
    --certificate-key 2fe28b5f0b22cbcd7d1b8d51bfe1db7975c23aaab8ba0e745af6e9f66d69c1d2

# 未指定certificate-key 将会提示 failure loading certificate for CA: couldn't load the certificate

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注