Search…
2.10.X
Fetch DigitalOcean Kubernetes Cluster kubeconfig for TVK UI Authentication
This page describes how to pull the kubeconfig file using doctl CLI for the DigitalOcean Kubernetes Cluster without exec section in it which causes authentication failure on TVK Management UI.
The DigitalOcean Kubernetes Cluster provides two ways to download the kubeconfig of the cluster using doctl CLI.
After authenticating to the DogitalOcean Kubernetes service using Access Token with doctl, user can either run show or save command to get the kubeconfig of the desired cluster. The save command will set the context in the existing kubeconfig file at /root/.kube/config which contains exec section and show command will print the output which user has to save and then copy to /root/.kube/config
Here are the commands:
$ doctl kubernetes cluster kubeconfig show <k8s cluster ID>
$ doctl kubernetes cluster kubeconfig save <k8s cluster ID>
For example:
$ doctl kubernetes cluster kubeconfig save 85e2ea36-29f0-4a9e-8d62-230c88a6fb39
TVK UI authentication does not support the kubeconfig which contain the exec section. User is encouraged to use the show option and save the kubeconfig in a different file using redirect operator > to use it for authentication on TVK UI.
Here is an example:
$ doctl kubernetes cluster kubeconfig save 85e2ea36-29f0-4a9e-8d62-230c88a6fb39 > /root/tvk_ui_kubeconfig
This will create a new file /root/tvk_ui_kubeconfig which won't have exec section and can be used for TVK UI authentication.
Copy link