CoreWeave
Connect CoreWeave with an API token, prepare the AI Object Storage state bucket, and run container services with GPUs on an existing CKS cluster.
Preview
The CoreWeave adapter is covered by unit tests and its OpenTofu modules pass tofu validate. It
has not been verified against a live organization yet.
OrkStage creates VPCs and AI Object Storage buckets with the coreweave/coreweave OpenTofu
provider. Container services and ingress routes are Kubernetes objects on an existing
CoreWeave Kubernetes Service (CKS) cluster, created with the hashicorp/kubernetes provider.
OpenTofu state lives in an AI Object Storage bucket you own.
CoreWeave has no managed PostgreSQL, Redis or queue service. Place those resources on another provider in the same instance; a CoreWeave service that depends on them receives their connection settings as environment variables and their credentials as a Kubernetes Secret.
What OrkStage creates
| Template resource | Capability | What gets created |
|---|---|---|
network | vpc (default) | coreweave_networking_vpc with pod, service and internal load balancer prefixes ready for a CKS cluster. One zone; internet egress is built in. |
compute.container-service | cks-deployment (default) | Namespace, Deployment, Service, optional HorizontalPodAutoscaler and Ingress on the target's cluster |
object-storage | ai-object-storage (default) | coreweave_object_storage_bucket, private, with optional versioning and expiration rule |
ingress | cks-ingress (default) | Host name under the cluster domain, served by the installed controller (CoreWeave Traefik chart) with cert-manager TLS |
Container services
cpuandmemoryMiBbecome resource requests. Memory is also the limit.public: truecreates aLoadBalancerService with theservice.beta.kubernetes.io/coreweave-load-balancer-type: publicannotation. The module waits for the public IP and outputsurl.autoscalingcreates a HorizontalPodAutoscaler on CPU. The Deployment then leaves the replica count to it.- GPUs come from
overrides.coreweave.gpuin the template.count(1 to 8) becomes thenvidia.com/gpulimit;classadds required node affinity on thegpu.nvidia.com/classnode label. Check the class values on your nodes withkubectl get nodes -L gpu.nvidia.com/class.
overrides:
coreweave:
gpu: { count: 1, class: H100_NVLINK_80GB }Ingress
Each routed service creates an Ingress object for its path in its own namespace, with the ingress
host, the IngressClass and, when tls is on, the cert-manager.io/cluster-issuer annotation. The
controller merges them under one host. Install the CoreWeave Traefik and cert-issuer charts (or set
ingressClassName, clusterIssuer and ingressDomain for your own controller) before deploying.
Dependencies on other providers
Connection settings of dependencies (<ID>_HOST, <ID>_PORT, <ID>_URL, <ID>_BUCKET,
<ID>_ENDPOINT) are plain environment variables. Credentials published through secret_ref, for
example a PostgreSQL password on AWS or Supabase, are read from the owning provider at deploy time
and stored in the Kubernetes Secret <name>-deps, loaded with envFrom as <ID>_PASSWORD,
<ID>_USERNAME, <ID>_URL and so on. They pass to OpenTofu as the sensitive TF_VAR_secret_env
and are kept in the OpenTofu state, like any Kubernetes Secret managed by OpenTofu.
Target configuration
config field | Required | Meaning |
|---|---|---|
stateBucket | yes | AI Object Storage bucket for OpenTofu state. Must exist before deploying. |
clusterName | for services and ingress | Existing CKS cluster that workloads deploy into |
zone | no | Zone of the cluster and the state bucket, for example US-EAST-04A. Defaults to the deployment region. |
stateEndpoint | no | S3 endpoint for state. Defaults to https://cwobject.com. |
ingressClassName | no | IngressClass for ingress routes. Defaults to traefik. |
clusterIssuer | no | cert-manager ClusterIssuer for TLS routes. Defaults to letsencrypt-prod. |
ingressDomain | no | DNS suffix served by the ingress controller. Defaults to <organization id>-<clusterName>.coreweave.app. |
Credential secret
{
"token": "<CoreWeave API access token>",
"stateAccessKeyId": "<access key id>",
"stateSecretAccessKey": "<secret key>",
"kubeconfig": "<optional kubeconfig, raw or base64>"
}token: a CoreWeave API access token (Console, Tokens). The OpenTofu runner receives it asCOREWEAVE_API_TOKEN. CKS managed auth accepts the same token as a Kubernetes bearer token, so withclusterNameset no kubeconfig is needed: the adapter looks up the cluster's API server endpoint through the CKS API.stateAccessKeyIdandstateSecretAccessKey: an AI Object Storage access key that can read and write the state bucket and the buckets OrkStage creates.kubeconfig: only for clusters reached another way (a private endpoint, a different token). The current context's server,certificate-authority-dataand bearertokenare used. Client certificates and exec plugins are not supported.
Cluster access reaches OpenTofu as TF_VAR_k8s_host, TF_VAR_k8s_token and TF_VAR_k8s_ca for
one command. Nothing is written to disk and no secret is part of the configuration.
Prepare state storage
AI Object Storage is S3 compatible and accepts only virtual hosted style requests
(https://<bucket>.cwobject.com). Before the first deployment:
- As an organization admin, create an organization access policy that lets the principal behind the access key use AI Object Storage (Console, Object Storage, Policies). Without a policy every S3 request is denied.
- Create an access key (Console, Object Storage, Keys) and put it in the credential secret.
- Create a versioned bucket:
aws configure set s3.addressing_style virtual --profile cw
aws configure set aws_access_key_id <access key id> --profile cw
aws configure set aws_secret_access_key <secret key> --profile cw
aws s3api create-bucket --bucket acme-orkstage-state --endpoint-url https://cwobject.com \
--create-bucket-configuration LocationConstraint=US-EAST-04A --profile cw
aws s3api put-bucket-versioning --bucket acme-orkstage-state --endpoint-url https://cwobject.com \
--versioning-configuration Status=Enabled --profile cwThe S3 backend runs without native locking, because conditional writes are not confirmed for AI Object Storage. OrkStage already runs one operation per resource at a time.
Permissions
- API token: read the caller identity, list CKS clusters, create and delete VPCs, create and delete AI Object Storage buckets and their versioning and lifecycle settings.
- In the cluster (the token's Kubernetes RBAC): create and delete namespaces, and in them Deployments, Services, Ingresses, HorizontalPodAutoscalers and Secrets; read pods and pod logs; patch Deployments (restart action).
- AI Object Storage access key: read and write the state bucket; read the buckets OrkStage creates (health checks).
Regions
allowedRegions and defaultRegion are CoreWeave zone names such as US-EAST-04A. VPCs and
buckets are created in the deployment region. A VPC lives in one zone.
Actions for triggers
| Capability | Action | Parameters | Effect |
|---|---|---|---|
cks-deployment | restart | none | Rolling restart of every pod of the Deployment, like kubectl rollout restart, keeping the same image and settings |
Logs are the last lines of up to three pods.
Known limits
- OrkStage does not create CKS clusters or node pools. Workloads go to the cluster in
clusterName(or the kubeconfig). Thevpccapability is not attached to that cluster. - Images must be pullable by the cluster nodes. Registry pull secrets are not managed.
- AI Object Storage access keys are scoped to a principal, not a bucket, so buckets publish no
secret_refand other providers cannot be handed credentials for them. - Buckets have no force destroy: empty a bucket before deleting it. The template
tierandpublicAccessare not applied. - Several routed services request their own certificate for the same host (one per namespace). Mind the Let's Encrypt duplicate certificate limit.
- GPU hours are billed per node and are not part of the cost estimate.
Vultr
Connect a Vultr account with an API key, prepare the Object Storage state bucket, and see how OrkStage runs containers, databases and load balancers on Vultr.
Magalu Cloud
Connect a Magalu Cloud tenant with an API key, prepare the Object Storage state bucket, and see what OrkStage creates on virtual machines and DBaaS in Brazil.