To authenticate to your Kubernetes cluster, create a service account in the desired namespace, and assign the cluster admin role to it.
Procedure
-
To create the service account, run the create command on the kubectl command line tool.
For example, run the following command:
kubectl create serviceaccount
cvbackup -n namespacewhere:
-
cvbackup is the name of the service account
-
namespace is the name of the namespace where the service account is created
-
-
To ensure that the service account has sufficient privileges to perform data protection operations, run the following command to add the service account to the default-sa-crb cluster role binding.
kubectl create clusterrolebinding default-sa-crb --clusterrole=cluster-admin --serviceaccount=
namespace:
cvbackup -
Run the following command to extract the service account token.
You will enter the token in the Kubernetes guided setup.
kubectl get secrets -n namespace -o jsonpath="{.items[?(@.metadata.annotations['kubernetes\.io/service-account\.name']=='cvbackup')].data.token}"|base64 --decode