Create a file to store the kubeconfig
in
Copy this configuration into the file
Change the namespace of the kubeconfig and add your organization name to it.
Use chmod 600 <filename>
to change permissions of the file.
Export the kubeconfig to use it via export KUBECONFIG=<path/to/file>
.
To access the management cluster, you need to have kubelogin installed. use kubectl get clusters
. This will open your browser for authentication. After successful authentication, you will be able to use kubectl
as always!
If this is your first time using Syself Autopilot, the output of kubectl get clusters
will be No resources found in org-your-company namespace.
. This is not an error, it just means no clusters have been created yet under your organization.
You might have to authenticate yourself again, if the token (and refresh token) expires. In case you want to invalidate the current session and remove access to the management cluster, you can use rm -rf ~/.kube/cache/oidc-login
.