简体   繁体   中英

Kubeconfig for deploying to all namespaces in a k8s cluster

I am looking at instructions on how to go about generating a kubeconfig file that can deploy, delete my k8s deployment to all namespaces and also have have permissions to create, delete and view secrets in all namespaces.

The use case for this kubeconfig is to use it in Jenkins for performing deployments to a kube cluster.

I am aware of k8s service accounts with role and rolebindings, however it appears they can be used to only to specific namespace(s)

Thanks

you should create cluster role and cluster role bindings to grant access cluster level. Then using the service account that has cluster level access, you should be able to do the stuff across all namespaces.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM