Skip to content

Just clone this repo and run the commands to get a read only service account on kubernetes that can be used to access kubernetes API

Notifications You must be signed in to change notification settings

Nirzak/service-account-to-access-kubernetes-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

service-account-to-access-kubernetes-api

Just clone this repo and run the commands to get a read only service account on kubernetes that can be used to access kubernetes API

Run the following commands sequentially to get everything ready

kubectl apply -f account.yml
kubectl apply -f clusterrole.yml
kubectl apply -f rolebinding.yml
kubectl apply -f secret.yml

This will create a service account on monitoring namespace on kubernetes cluster and will only have read only access to the cluster.

To get the sercret token of this service account to access the cluster, Run the following command:

kubectl describe secrets/<our_token_name> -n monitoring

About

Just clone this repo and run the commands to get a read only service account on kubernetes that can be used to access kubernetes API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published