Skip to content

Roll out a new control-plane version

What you will end up with

The control plane running a new image, with all three containers on the same version, verified through the rollout and the health surface.

Prerequisites

  • An existing control-plane deployment.
  • The new image reachable from the cluster.
  • kubectl and jq, and a way to reach the API.
export CP_NS=xratu-cp
export CP_SERVICE=xratu-control-plane
export CP_PORT=8080
export XRATU_IMAGE_REGISTRY=<xratu-published-registry>
export XRATU_VERSION=<new-release-tag>

What a version bump may not change

A rollout replaces the image. It must not change anything the identity latch recorded, because the new pods evaluate the same finalization invariants the old ones did and will refuse to become ready if the values drift.

Safe to change in a rollout Not safe
The image tag XRATU_CP_DB_BACKEND
Replica count XRATU_CP_DB_DSN pointing at a different store
CPU and memory requests and limits XRATU_CP_STORE_PROFILE

Changing a latched value does not reconfigure the deployment. It produces pods that fail readiness with a drift message naming both the latched and observed values. See Post-finalization limits.

1. Record what is running

Capture the current image so you can return to it.

kubectl -n ${CP_NS} get deploy xratu-control-plane \
  -o jsonpath='{.spec.template.spec.containers[*].image}{"\n"}'

Keep that value. It is the rollback target.

2. Set the new image

All three containers run the same image, so all three are set together.

kubectl -n ${CP_NS} set image deployment/xratu-control-plane \
  api=${XRATU_IMAGE_REGISTRY}/xratu-control-plane:${XRATU_VERSION} \
  controller=${XRATU_IMAGE_REGISTRY}/xratu-control-plane:${XRATU_VERSION} \
  scheduler=${XRATU_IMAGE_REGISTRY}/xratu-control-plane:${XRATU_VERSION}

Setting only one of them leaves the deployment running mixed versions, which is the most common mistake here.

3. Wait for the rollout

kubectl -n ${CP_NS} rollout status deployment/xratu-control-plane --timeout=600s

Expected output

The rollout reports success once the new pod passes its startup probe and becomes ready. Because the shipped manifest runs a single replica, expect a brief interruption while the old pod is replaced.

4. Verify it worked

Confirm all three containers report the new image:

kubectl -n ${CP_NS} get deploy xratu-control-plane \
  -o jsonpath='{.spec.template.spec.containers[*].image}{"\n"}'
kubectl -n ${CP_NS} get pods -l app=xratu-control-plane -o wide

The image should appear three times, all identical.

Confirm the health surface and that the latch is unchanged:

curl -fsS "${CP_CLI_ENDPOINT}/v1/system/health/readiness" \
  | jq '{db_backend, store_profile, finalization}'

cp_instance_uuid must be the same value it was before the rollout. A new instance UUID means you are talking to a different control plane rather than an upgraded one, which on a single deployment would mean its store was replaced.

Confirm the API still serves your identity:

xratu auth whoami

When it fails

The rollout times out. Inspect why the new pod is not becoming ready:

kubectl -n ${CP_NS} describe pod -l app=xratu-control-plane | grep -A10 Events
kubectl -n ${CP_NS} logs deploy/xratu-control-plane -c api --tail=200

Readiness reports backend or store profile drift. The new pod's environment differs from the latched values. Restore the environment rather than attempting to change the latch, which is immutable.

Only some containers updated. Re-run the set image command with all three container names.

Roll back. Set the image back to the value recorded in step 1 and wait for the rollout again:

kubectl -n ${CP_NS} set image deployment/xratu-control-plane \
  api=${XRATU_IMAGE_REGISTRY}/xratu-control-plane:<previous-tag> \
  controller=${XRATU_IMAGE_REGISTRY}/xratu-control-plane:<previous-tag> \
  scheduler=${XRATU_IMAGE_REGISTRY}/xratu-control-plane:<previous-tag>

kubectl -n ${CP_NS} rollout status deployment/xratu-control-plane --timeout=600s

A rollback restores the image. It does not undo anything the newer version wrote to the store, so treat a version that changed stored state as a forward fix rather than a reversible step.

What changed

The deployment runs a new image. The identity latch, the storage backend and profile, tenancy, enrolled nodes and every stored record are untouched, and nodes that were connected reconnect to the same control plane identity.

Nodes are upgraded separately; a control-plane version bump does not change what is running on them.