站长资讯网
最全最丰富的资讯网站

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

赞(0)
分享到: 更多 (0)
网站地图   沪ICP备18035694号-2    沪公网安备31011702889846号