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