Skip to main content

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.

Phase 1 provisions the foundational infrastructure: a VPC and a CKS Kubernetes cluster. After this phase completes, you will have a running cluster and can download its kubeconfig to proceed to Phase 2, which adds node pools and DFS storage.
Ensure you meet the prerequisites before starting, including the CKS Admin IAM role.

Clone the repository

Clone the CoreWeave reference architecture repository, navigate to the terraform/ folder, and copy the example Terraform variables file:
git clone https://github.com/coreweave/reference-architecture.git
cd ./reference-architecture/terraform/
cp terraform.tfvars.example terraform.tfvars
The terraform.tfvars.example file contains example values which you can use as a starting point. You’ll edit the terraform.tfvars file to set your values.

Configuration

In this section, you’ll set your API token and configure your Terraform variables.

Set your API token

Set the CoreWeave API token as an environment variable:
export TF_VAR_coreweave_api_token="[YOUR-COREWEAVE-API-TOKEN]"
Setting the API token as an environment variable is the recommended approach for security.

Configure variables

Edit terraform.tfvars and set the following values:
VariableDescription
zoneDeployment zone, for example US-EAST-02A.
vpc_nameA name for your VPC.
vpc_prefixesCIDR blocks for pod, service, and internal LB networks. See VPC CIDR sizing for guidance. The example values in terraform.tfvars.example are valid defaults.
cluster_nameA name for your CKS cluster (maximum 30 characters).
Leave create_nodepool and create_dfs_pvc as false for Phase 1.
If you choose to add your CoreWeave API token to the terraform.tfvars file, do not commit terraform.tfvars to the repository. Add it to .gitignore or use environment variables exclusively for security.

Create and verify your VPC and CKS cluster

In this section, you’ll apply your Terraform configuration to create your VPC and CKS cluster, verify the outputs, and download the resulting kubeconfig.

Apply your Terraform configuration

Run the following commands to initialize your Terraform configuration, plan your changes, and apply your changes to create your VPC and CKS cluster:
terraform init
terraform plan
terraform apply
Cluster creation takes approximately 45 minutes. Terraform displays progress as it provisions the VPC and cluster.

Verify outputs

After terraform apply completes, verify the core outputs to ensure your VPC and CKS cluster were created successfully:
terraform output vpc_id
terraform output cks_cluster_id
terraform output cks_api_server_endpoint
terraform output cks_status
The cks_status output should show the cluster as running.

Download kubeconfig

Download the kubeconfig for your new cluster from the CoreWeave Console. You need this file for Phase 2 (node pools and DFS) and for kubectl access.
  1. Log in to the CoreWeave Console.
  2. On the Clusters page, find your new cluster and click the vertical ellipsis on the far right of the screen next to the cluster name.
  3. Click Download kubeconfig.
  4. Save the kubeconfig file to your local machine.
After downloading, set the KUBECONFIG environment variable to the path to the downloaded kubeconfig and verify connectivity:
export KUBECONFIG=[PATH-TO-DOWNLOADED-KUBECONFIG]
kubectl cluster-info

Next steps

Your VPC and CKS cluster are ready. Continue to Phase 2 to add node pools and storage:
Last modified on April 2, 2026