home目录新建.kube/config, 将public_key粘贴到config,如果有多个可以对齐root key更新,注意要修改name,如sit、uat,不能重复apiVersion: v1
clusters:
- cluster:
certificate-authority-data: xxxx
server: https://xxxxxxx
name: sit
- cluster:
certificate-authority-data: xxxx
server: https://xxx.xx.xx.x:6443
name: uat
contexts:
- context:
cluster: sit
user: sit
name: sit
- context:
cluster: uat
user: uat
name: uat
current-context: uat
kind: Config
preferences: {}
users:
- name: sit
user:
client-certificate-data: xxxxxx
- name: uat
user:
client-certificate-data: xxxxx
client-key-data: xxxxx