Generate Kubernetes credentials
In order to use our products, a Kubernetes credentials file β commonly called kubeconfig file β is required to grant us access and permissions to your cluster.
This guide will walk you through the generation process of a kubeconfig file for a specific service account of your cluster.
π
Automatic generation
If youβre in a hurry, or donβt want to get lost in commands, you can use our hand-crafted Bash script which will do the heavy lifting for you! It takes the service account name as its sole argument and will generate the file in the current directory.
Change <myserviceaccount>
with the name of the service account you wish to create a kubeconfig file for. For KuboScore, it should be ksa-kuboscore
. For KuboVisor, it should be ksa-kubovisor
.
If you want to use a different namespace, cluster or context, just use the --namespace
, --cluster
and --context
flags like you would normally do with kubectl
.
π Manual generation
Donβt trust our Bash script? Donβt have Bash? We got you covered!
π Prerequisites
Following content assumes that kubectl
binary is installed on your system and you have permissions to get the following objects from the namespace where the service account lives:
ServiceAccounts
Secrets
Execute the following commands to make sure you have enough permissions.
Replace <namespace>
with the actual name of the namespace.
If you have the right permissions, both commands should return yes
as a result.
If the output to one of these commands is no
, it means the credentials youβre using donβt have enough permissions to get the requested resource. Make sure youβre using the correct credentials or contact your cluster administrator.
π Credentials generation
Prepare your environment
Replace <namespace>
by the actual namespace name and <service_account_name>
by the actual service account name.
Generate the file
π© Troubleshooting
I canβt connect to my cluster
In this case, make sure that youβre connected to the internet or to a network (eg. VPN) from which you can access your cluster.
If the problem persists, please contact your cluster administrator.
I canβt use the generated credentials file with your products!
The service account you specified doesnβt have enough permissions. Please contact us.
Last updated