OrkStageOrkStage

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 resourceCapabilityWhat gets created
networkvpc (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-servicecks-deployment (default)Namespace, Deployment, Service, optional HorizontalPodAutoscaler and Ingress on the target's cluster
object-storageai-object-storage (default)coreweave_object_storage_bucket, private, with optional versioning and expiration rule
ingresscks-ingress (default)Host name under the cluster domain, served by the installed controller (CoreWeave Traefik chart) with cert-manager TLS

Container services

  • cpu and memoryMiB become resource requests. Memory is also the limit.
  • public: true creates a LoadBalancer Service with the service.beta.kubernetes.io/coreweave-load-balancer-type: public annotation. The module waits for the public IP and outputs url.
  • autoscaling creates a HorizontalPodAutoscaler on CPU. The Deployment then leaves the replica count to it.
  • GPUs come from overrides.coreweave.gpu in the template. count (1 to 8) becomes the nvidia.com/gpu limit; class adds required node affinity on the gpu.nvidia.com/class node label. Check the class values on your nodes with kubectl 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 fieldRequiredMeaning
stateBucketyesAI Object Storage bucket for OpenTofu state. Must exist before deploying.
clusterNamefor services and ingressExisting CKS cluster that workloads deploy into
zonenoZone of the cluster and the state bucket, for example US-EAST-04A. Defaults to the deployment region.
stateEndpointnoS3 endpoint for state. Defaults to https://cwobject.com.
ingressClassNamenoIngressClass for ingress routes. Defaults to traefik.
clusterIssuernocert-manager ClusterIssuer for TLS routes. Defaults to letsencrypt-prod.
ingressDomainnoDNS 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 as COREWEAVE_API_TOKEN. CKS managed auth accepts the same token as a Kubernetes bearer token, so with clusterName set no kubeconfig is needed: the adapter looks up the cluster's API server endpoint through the CKS API.
  • stateAccessKeyId and stateSecretAccessKey: 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-data and bearer token are 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:

  1. 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.
  2. Create an access key (Console, Object Storage, Keys) and put it in the credential secret.
  3. 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 cw

The 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

CapabilityActionParametersEffect
cks-deploymentrestartnoneRolling 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). The vpc capability 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_ref and other providers cannot be handed credentials for them.
  • Buckets have no force destroy: empty a bucket before deleting it. The template tier and publicAccess are 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.

On this page