Service Accounts
Service accounts are used to access kubernetes services through APIs by other software programs. For example, a prometheus service to watch the resources matrices etc.
To access the kubernetes we following things
- service account with right set of permissions
- token for that service account
Token will then can be used in application to access kubernetes.
Create a sa
kubectl create sa dashboard-sa
Or
kubectl create serviceaccount dashboard-sa
To use it, we need to generate the token for that service account.
kubectl create token dashboard-sa
(It is assumed that permissions have been assigned to a service account.)