CoreWeave
Search
K

Get Started with Kubernetes

Learn how to configure your CoreWeave Kubernetes setup to access the Cloud

Request an account

The first step to getting access to CoreWeave Cloud is to fill out the Contact Sales form. Your information will be submitted to our team for review, who will be in touch with next steps.

Create CoreWeave access credentials

Important
Only organization admins may generate, view, and delete access tokens.
For each user who requires a separate Access Token, a new Token and corresponding Kubeconfig file must be generated by the organization admin. The admin must then share this with the user in a secure manner.
At CoreWeave, Kubeconfig files are used to interact with our Kubernetes cluster via clients such as kubectl.
API access tokens are used for programmatic access to CoreWeave Cloud applications, such as Prometheus. Once the organization admin account has been approved and activated, the organization admin may log in to the CoreWeave Cloud UI, then navigate to the API Access page from the left-hand menu.
New Kubeconfig files and credentials as well as new API tokens are created and managed on this page.
Screenshot of the "API & Kubeconfig" page in the Cloud app

[Org admins] Generate a new access token and Kubeconfig file

Organization admins may generate new API access tokens by navigating to the API Access page on the Cloud UI. From here, click the API & Kubeconfig tab at the top right of the page, then click the Create a New Token button to the right to open the token generation modal.
Warning
The Kubeconfig and Access Token are shown only once! Be sure to save this file and the token in a secure location. If you lose your Access Token, it can be found inside your Kubeconfig file.
Token names are optional, but recommended. If the Automatically download Kubeconfig checkbox is checked, a Kubeconfig file with the new token embedded within it, named cw-kubeconfig, will download automatically upon token creation. To prevent this, uncheck this box.
Below the name input is the option to select the namespaces to which this token grants access. Select a namespace by clicking it, then click the right-pointing arrow to move it to the box on the right. Namespaces listed in the box on the right will be granted to the new token upon creation. To select multiple namespaces, check the boxes beside each desired namespace, then click the right-facing arrow to add them. Clicking the left-pointing arrow will remove namespaces to be added.
Once namespace selection is complete, click Create token.

Custom RBAC for tokens

For more fine-grained access control, organization admins may create a token with no namespaces selected. This creates a "blank" token, whose permissions are managed solely by custom Kubernetes RBAC policies bound to the token as the RBAC subject. For more information, contact support.

Install Kubernetes tools

Once you have obtained your Access Credentials from your organization admin, download the Kubernetes command line tools to your local machine.
Additional Resources
For more information on Kubernetes installation and configuration, please reference the official Kubernetes documentation.
Linux
macOS
Windows

Installing kubectl on a Linux system

Downloading and installing the binary

The following command is a simple way to install kubectl on your Linux system by downloading the binary.
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
Once you have the kubectl binary downloaded, install it by first making the binary executable:
$ chmod +x ./kubectl
Then, move the file into the system bin directory:
$ sudo mv ./kubectl /usr/local/bin/kubectl
Note
If you would prefer to install Kubernetes using a Native Package Manager, please view the Kubernetes guide on Installing using Native Package Manager.
Verifying the kubectl binary
If you'd like to verify kubectl, you can verify it by running a checksum operation on the downloaded file prior to installing it, such as:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
This should return kubectl: OK to confirm the file is indeed valid. If this returns an error, please review the official kubectl installation guide.

Installing kubectl on a macOS system

Installing using Homebrew

Most Mac users use Homebrew to install packages.
If you do not already have Homebrew installed, follow the Brew Installation guide to do so, then install kubectl using Homebrew by running the following command:
$ brew install kubectl

Installing kubectl on a Windows system

Installing using PowerShell

Using PowerShell, kubectl can be installed by using the following the command:
& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/coreweave/kubernetes-cloud/master/getting-started/k8ctl_setup.ps1')))
Note
Add the -Silent flag to the end of this string for a non-interactive setup.

Installing using a Package Manager

You can also install kubectl on Windows using a package manager such as Chocolatey or Scoop.
Using Chocolatey:
$ choco install kubernetes-cli
Using Scoop:
$ scoop install kubectl
If you would prefer to download the kubectl executable directly, follow the official Kubernetes instructions to download the latest version.

Configure Kubernetes

Finally, once you have kubectl installed, and the cw-kubeconfig file has been generated and obtained from your organization admin, the next step is to move the config file to the right location.
If this is your first time using Kubernetes, or you're using a system that has never had Kubernetes configured before, you probably don't have an existing kubeconfig.
To verify, check the default path for your operating system:
Operating System
Default path
Linux
~/.kube/config
macOS
/Users/<username>/.kube/config
Windows
%USERPROFILE%\.kube\config
Also, check your environment and verify no value is set for KUBECONFIG:
Linux or macOS
Windows
$ echo $KUBECONFIG
> echo %KUBECONFIG%
Existing kubeconfig
If a kubeconfig exists, Advanced Kubeconfig Environments explains how to merge them.
If you do not have an existing Kubeconfig file, follow the steps below for your operating system.
Linux and macOS
Windows
Assuming that cw-kubeconfig was downloaded to ~/Downloads, create the directory and move the file to the correct location.
$ mkdir ~/.kube
$ mv ~/Downloads/cw-kubeconfig ~/.kube/config
Assuming that cw-kubeconfig was downloaded to %USERPROFILE%\Downloads, create the directory and move the file to the correct location.
> mkdir %USERPROFILE%\.kube
> mv %USERPROFILE%\Downloads\cw-kubeconfig %USERPROFILE%\.kube\config
Tip
To use a different kubeconfig path, see Advanced Kubeconfig Environments.

Verify Kubernetes credentials

Since your new account will not yet have any resources, listing your cluster secrets is a good way to test that proper communication with the cluster is in place. To verify your CoreWeave Kubernetes configuration using kubectl, invoke the following commands.
First, set the Kubernetes context to coreweave:
$ kubectl config set-context coreweave
Next, request the secret objects:
$ kubectl get secret
This should return your default secrets, such as:
NAME TYPE DATA AGE
default-token-frqgm kubernetes.io/service-account-token 3 3h

Retrieve the API Access Token

Because the API token is only shown once in CoreWeave Cloud, you may need to retrieve it later from the kubeconfig when setting up applications like self-hosted Grafana.
To view the API access token stored in the kubeconfig:
$ kubectl config view --raw
Output:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: DATA+OMITTED
server: https://k8s.ord1.coreweave.com
name: coreweave
contexts:
- context:
cluster: coreweave
namespace: tenant-EXAMPLE
user: token-EXAMPLE-USER
name: coreweave
current-context: coreweave
kind: Config
preferences: {}
users:
- name: token-EXAMPLE-USER
user:
token: 123example456
The API access token is 123example456. If the kubeconfig has more than one context, it can have multiple tokens.

Congratulations!
🎉

You are now ready to use CoreWeave Cloud to deploy all types of services on CoreWeave's Kubernetes infrastructure!