API Access Tokens authenticate users and grant access to resources such as CKS Clusters and VPCs.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.
Prerequisites
This guide assumes that you have an active CoreWeave account.Create a new API Access Token
API Access Tokens must be created in the CoreWeave Cloud Console. To create a new Access Token, complete the following steps:- In Cloud Console, navigate to Tokens, and then click the Create Token button in upper-right corner.
-
In the Create API Token dialog, configure the token values by filling in the following fields, and then click Create:
Field Description Name The name of the token. Expiration The length of time for which the Token is valid. Note A description for future reference. -
Select one of the following options:
Option Description Token Secret Copy and store the token secret for use cases like scraping logs, metrics, and setting up your own self-hosted Grafana, or to add the token secret to an existing kubeconfig.Kubeconfig Create and download a kubeconfigfor a specific cluster to interact with the cluster using commands likekubectl. Note that a Kubeconfig can access multiple Clusters by switching contexts.
Use the kubeconfig file
To use the kubeconfig file, you must have thekubectl command-line tool installed. If you don’t have kubectl installed, follow the instructions in the Kubernetes documentation.
To use the Kubeconfig file, either:
- copy it to the default location for Kubeconfig files, typically
~/.kube/config; - specify the file location with the
KUBECONFIGenvironment variable; or, - use the
--kubeconfigflag withkubectl.
kubectl to interact with the CKS clusters. To test the configuration, run:
Best practices for Kubeconfig security
The Kubeconfig contains API Access Tokens, which should be treated with the same care as passwords or private SSH keys.- Make sure only the file owner can read and write the Kubeconfig file. For example, on Linux or macOS, use
chmod 600to set the appropriate permissions. - Avoid storing the Kubeconfig in version control systems.
- Use separate Kubeconfigs for different users and applications, instead of sharing a single Kubeconfig among multiple users or apps.
- Regularly rotate Kubeconfig files, and revoke access for users or applications that no longer need it to reduce the risk of credential leakage.
Learn more about Kubeconfig files in the official Kubernetes documentation.
Manage Access Tokens
You can view or delete Access Tokens on the Access Tokens dashboard. The secret values are never shown again after creation, so be sure to record them in a secure location.