How to generate locally a kubeconfig file for KuboScore?
In this post, you will be guided step-by-step through the process of generating a Kubernetes configuration file in order to use it with KuboScore.
Throughout the guide, you will create two Kubernetes resources needed in order to generate a valid Kubernetes configuration file:
- a ServiceAccount which is the account for which we will generate the configuration file
- a ClusterRoleBinding binding the ServiceAccount to the cluster-admin ClusterRole
For private clusters, please contact us at contact@kubolabs.io.
References:
Prerequisites
You must have :
- CloudShell or Terminalopened in Linux Bastion Virtual Machine, connected with sudo privileges
- ssh-keygen installed in Linux Bastion
n order to make sure you have access to the cluster with the needed permissions, execute the following command:
This command will check that you can create ClusterRoleBinding resources on the cluster. If you have the right permissions, the output should be yes.
If the output is no, see the I cannot create a ClusterRoleBinding section.
Choose your flavor
This guide is available in two flavors:
- an easy one, which uses a unix shell script to automatically perform the commands
- a more detailed one, which requires you to manually perform kubectl commands