Skip to main content

Assign a VPC to a Cluster

VPCs are assigned to clusters through the CKS cluster manifest. To assign a VPC to a cluster, add the VPC's network information to the network block of the cluster manifest. The example manifest below connects the cluster to the default VPC for the region.

The highlighted values in the network section define the VPC's IP configuration.

example-cluster.yaml
---
apiVersion: cks.coreweave.com/v1alpha1
kind: Cluster
metadata:
name: example-cluster
namespace: <Org ID>
Replace with your Org ID, found in Console settings.
spec:
kubernetes:
version: v1.29
network:
public: true
internalLbCIDRs:
- 10.16.4.0/22
podCIDR: 10.0.0.0/13
serviceCIDR: 10.16.0.0/22
vpc: default-us-east-04
placement:
region: us-east-04
Learn more

Learn how VPCs use the CIDR blocks defined in the network section.

After creating the manifest, save it to a file, such as example-cluster.yaml. Then, use kubectl to apply the manifest to the cluster in the organization's namespace:

Example
$
kubectl apply -f example-cluster.yaml -n <Org ID>
Replace with your Org ID, found in Console settings.

More information

See the VPC cluster assignment reference guide for more details about the network section of the cluster manifest.