Docker(三十四)kubectl通过token 链接kube-apiserver

kubectl config set-credentials tf-admin --token=***************

kubectl config set-cluster tf-cluster --insecure-skip-tls-verify=true --server=https://{kube-apiserver}

kubectl config set-context tf-system --cluster=tf-cluster --user=tf-admin

kubectl config use-context tf-system

-==================================-

kubectl config set-credentials qa-admin --username=admin --password=******

kubectl config set-cluster qa-cluster --server={kube-apiserver} --certificate-authority=/etc/kubernetes/cluster-ca.crt

kubectl config set-context qa-system --cluster=qa-cluster --user=qa-admin

kubectl config use-context qa-system


后面的配置是通过账号密码设置来访问api-server

上一篇:passat QA / error code 20190210


下一篇:C语言解决批量路径中缺少\的问题