> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Managed Authentication in CKS

> Learn about Managed Authentication and Kubeconfig files in CKS clusters

In Kubernetes, [Kubeconfig files](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) are YAML configuration files that manage access to Kubernetes clusters. They specify the details needed to authenticate and interact with the cluster's API server. With a Kubeconfig file, you can run commands without repeatedly providing connection details or credentials.

Managed Auth generates Kubeconfig files for your CKS clusters from the Cloud Console. These Kubeconfig files follow the permissions configured for their related tokens and automatically embed the API Access Token.

To generate a Kubeconfig file, follow the instructions in [Manage API Access Tokens and Kubeconfig Files](/security/authn-authz/manage-api-access-tokens).

The following example shows a Kubeconfig file generated by Managed Auth in the Cloud Console:

```yaml theme={"system"}
apiVersion: v1
clusters:
- cluster:
    server: https://api-server.url.com
  name: my-cluster
contexts:
- context:
    cluster: my-cluster
    namespace: my-namespace
    user: token
  name: my-cluster
current-context: my-cluster
kind: Config
preferences: {}
users:
- name: token
  user:
    token: REDACTED
```

Generated Kubeconfig files contain the following values and might include additional values:

| Field                        | Description                                                                                                                                                                       |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiVersion`                 | [The API group](https://kubernetes.io/docs/reference/using-api/#api-groups) version                                                                                               |
| `clusters`                   | Connection settings for the target cluster, including the API server addresses                                                                                                    |
| `clusters.cluster.server`    | API server addresses                                                                                                                                                              |
| `clusters.cluster.name`      | The cluster name                                                                                                                                                                  |
| `contexts`                   | The [Kubernetes context](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/#context_) containing the related cluster, user, and namespace name |
| `contexts.context.cluster`   | The cluster associated with the context                                                                                                                                           |
| `contexts.context.namespace` | The namespace associated with the context                                                                                                                                         |
| `contexts.context.user`      | The user associated with the context, in this case an API Access Token (`token`)                                                                                                  |
| `users`                      | A list of "users" associated with the context, in this case the API Access Token (`token`)                                                                                        |
| `users.name`                 | The name of the user, in this case the Access Token, `token`                                                                                                                      |
| `users.user.token`           | The actual Access Token value                                                                                                                                                     |
