# Fetch DigitalOcean Kubernetes Cluster kubeconfig for T4K UI Authentication

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`

T4K 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 T4K 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 T4K UI authentication.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trilio.io/kubernetes/5.0.x/appendix/fetch-digitalocean-kubernetes-cluster-kubeconfig-for-tvk-ui-authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
