Skip to content

Deploy a data plane with provider flags

What you will end up with

Two enrolled nodes in the edge-eu pool of acme, from a bundle you reviewed before applying.

Prerequisites

  • An organization with reconciled enrollment governance, and a pool. See Reconcile tenant-scoped bootstrap authority.
  • kubectl pointed at the target cluster, and terraform on your path.
  • Cloud credentials for the provider.
export ORG=acme
export POOL=edge-eu
export DP_INSTALL=dp-eu-west1

1. Confirm the pool

All three install commands validate it, so confirm it now rather than at prepare:

xratu dataplane pool list "${ORG}"

Create it if it is missing:

xratu dataplane pool create "${ORG}" "${POOL}"

2. Prepare

This renders the bundle and creates nothing:

xratu dataplane install prepare "${ORG}" "${POOL}" "${DP_INSTALL}" \
  --provider gcp \
  --dp-count 2 \
  --artifact-registry <region>-docker.pkg.dev/<gcp-project-id>/<repository> \
  --artifact-bucket gcs://<bucket>/<prefix> \
  --project-id <gcp-project-id> \
  --region <region>

Expected output

{
  "status": "prepared",
  "operation": "prepare",
  "organization_name": "acme",
  "dataplane_pool": "edge-eu",
  "dp_install": "dp-eu-west1",
  "dp_count": 2,
  "provider": "gcp",
  "spec_file": "install/dp-eu-west1/install.spec.json",
  "install_input_spec_file": "install/dp-eu-west1/install.input.yaml",
  "output_dir": "install/dp-eu-west1",
  "written_file_count": 9
}

3. Review the rendered bundle

ls install/${DP_INSTALL}/
install.input.yaml  install.spec.json  k8s  terraform  xratu

Read the cloud layer before it runs:

cat install/${DP_INSTALL}/terraform/main.tf

Confirm the service account annotations carry real identities:

grep -A1 annotations install/${DP_INSTALL}/k8s/serviceaccounts.yaml
    iam.gke.io/gcp-service-account: dp-eu-west1-runtime@<gcp-project-id>.iam.gserviceaccount.com
--
    iam.gke.io/gcp-service-account: dp-eu-west1-build@<gcp-project-id>.iam.gserviceaccount.com

On Azure these read REPLACE_RUNTIME_CLIENT_ID_FROM_TERRAFORM, and you replace them from the Terraform outputs before the cluster layer is applied. See Provider configuration.

Confirm the node count and the approved namespaces:

grep -E "dp_count|project_runtime_namespaces" install/${DP_INSTALL}/install.input.yaml

An empty project_runtime_namespaces means the node will report no approved project runtime namespace and will never be selected for placement. Add them to the spec and re-prepare if you intend this node to host projects.

4. Apply

xratu dataplane install apply "${ORG}" "${POOL}" "${DP_INSTALL}"

This runs Terraform, applies the five manifests in order, mints an invitation per node label, injects the enrollment secret, applies the workload and scales it to dp_count. See Apply ordering.

Expected output

{
  "status": "applied",
  "operation": "apply",
  "dp_install": "dp-eu-west1",
  "dp_count": 2,
  "apply_mode": "auto_enrollment",
  "serviceaccounts_apply_state": "applied",
  "spire_workload_identity_apply_state": "applied",
  "project_runtime_authority_apply_state": "applied",
  "fabric_apply_state": "applied",
  "runtime_apply_state": "applied",
  "enrollment_state": "auto_enrolled"
}

5. Verify

kubectl -n ${DP_INSTALL} get statefulset,pods
xratu get dataplanes

Both pods should be running and both nodes enrolled. See Scale and verify an installation.

The single-step form

up prepares and applies in one call with the same flags, and is the normal way to run an installation. Steps 2 to 4 above split it so the generated Terraform can be read first:

xratu dataplane install up "${ORG}" "${POOL}" "${DP_INSTALL}" \
  --provider gcp \
  --dp-count 2 \
  --artifact-registry <region>-docker.pkg.dev/<gcp-project-id>/<repository> \
  --artifact-bucket gcs://<bucket>/<prefix> \
  --project-id <gcp-project-id> \
  --region <region>

The bundle is still written, so the record is the same. Split it when you want to read terraform plan before the cloud layer runs.

If it fails

Symptom Cause Fix
provider_config.<field> is required for <provider> A required provider field is missing See Provider configuration
artifact_bucket.path scheme must match provider The bucket scheme and provider disagree See Registry and bucket schemes
A pool resolution error The pool does not exist in the organization xratu dataplane pool create "${ORG}" "${POOL}"
dataplane install terraform command failed (...) The cloud layer failed; the cluster is untouched Read the Terraform error, fix, re-apply
dataplane install kubectl apply failed: ... A manifest was refused Read the kubectl error; the payload names the manifest path
... does not match prepared install bundle spec The arguments name a different installation from the bundle Pass the same three positional arguments you prepared with
Pods running but never enrolled The invitation, governance or label check failed See Diagnosing a node that will not enroll

What changed

Object State
Cloud Runtime, build and publish delegate identities, registry and bucket access, federation bindings
Cluster Namespace, service accounts, SPIRE entries, project runtime authority, fabric, StatefulSet, Service, PVCs
Control plane Scheduler capability recorded, two enrollments active
Disk The bundle under install/${DP_INSTALL}/