Ensure you meet the prerequisites before starting, including the CKS Admin Identity and Access Management (IAM) role.
Clone the repository
The reference architecture is distributed as a Terraform configuration in a public GitHub repository. Clone the CoreWeave reference architecture repository, navigate to theterraform/ folder, and copy the example Terraform variables file:
terraform.tfvars.example file contains example values you can use as a starting point. You’ll edit terraform.tfvars to set your values in the next section.
Configuration
In this section, you set your API token and configure your Terraform variables.Set your API token
Set the CoreWeave API token as an environment variable:Configure variables
Editterraform.tfvars and set the following values:
| Variable | Description |
|---|---|
zone | Deployment zone, for example US-EAST-02A. |
vpc_name | A name for your VPC. |
vpc_prefixes | CIDR 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_name | A name for your CKS cluster (maximum 30 characters). |
create_nodepool and create_dfs_pvc as false for Phase 1. You enable these variables in Phase 2 when you add node pools and storage.
Create and verify your VPC and CKS cluster
In this section, you apply your Terraform configuration to create your VPC and CKS cluster, verify the outputs, and download the resulting kubeconfig.Apply your Terraform configuration
Initialize your Terraform configuration, preview the planned changes, and apply them to create your VPC and CKS cluster:Verify outputs
Afterterraform apply completes, verify the core outputs to confirm Terraform created your VPC and CKS cluster successfully:
cks_status output shows the cluster as running.
Download kubeconfig
Download the kubeconfig for your new cluster from the CoreWeave Console. The kubeconfig authenticateskubectl to your cluster, and you also need it for Phase 2, which covers node pools and DFS.
- Log in to the CoreWeave Console.
- On the Clusters page, find your new cluster and click the vertical ellipsis (More options) next to the cluster name.
- Click Download kubeconfig.
- Save the kubeconfig file to your local machine.
KUBECONFIG environment variable to the path to the downloaded kubeconfig and verify connectivity:
Next steps
You now have a running CKS cluster in a CoreWeave VPC, withkubectl configured to access it. Continue to Phase 2, Add node pools and storage, to add node pools and DFS storage.