Skip to content

Upgrades

Two upgrade paths, both dev first: Kubernetes versions (kubespray, ubernetes repo) and addon charts (ArgoCD, ubernetes-applications).

  • Read the upstream release notes for breaking changes.

  • Do it on kestrel-dev first.

  • Announce the maintenance window to tenants through the RCS ops channel.

  • Take an etcd snapshot on a control-plane node (etcdctl needs the etcd client certs; see documentation/Etcd.md in ubernetes):

    Terminal window
    sudo /usr/local/bin/etcdctl --endpoints=https://localhost:2379 \
    --cacert /etc/kubernetes/ssl/etcd/ca.crt \
    --cert /etc/kubernetes/ssl/etcd/peer.crt \
    --key /etc/kubernetes/ssl/etcd/peer.key \
    snapshot save /tmp/etcd-backup-$(date +%Y%m%d).db

    Copy the snapshot off the node (for example scp to the control host); a copy left in /tmp can be lost in the upgrade it protects against.

  • Cluster healthy: kubectl get nodes, kubectl get pods -A | grep -v Running.

  • All ArgoCD Applications Synced and Healthy.

  1. Set kube_version in ubernetes/clusters/kestrel/inventory/group_vars/k8s_cluster/k8s-cluster.yml. The file is shared by kestrel-dev and kestrel-prod, so make the change on the upgrade branch and run it against kestrel-dev first.
  2. Follow the per-version notes in ubernetes/documentation/upgrades/ (for example 1.30.md): submodule and Kubespray version, control-node play, then the upgrade.
  3. Run upgrade-cluster.yml as described in ubernetes/documentation/ClusterOperations.md. It upgrades the control plane, then cordons, drains, upgrades and uncordons workers one at a time.
  4. Verify: kubectl version shows the new server version, kubectl get --raw /healthz returns ok, and kubectl get nodes -o wide shows every node Ready on the new kubelet.

For a node handled outside kubespray (for example an OS re-image), one node at a time:

Terminal window
kubectl cordon <node>
kubectl drain <node> --ignore-daemonsets --delete-emptydir-data
# do the work, then
kubectl uncordon <node>

Chart versions live in the addon’s ApplicationSet under addons/ in ubernetes-applications (for example addons/cert-manager-appset.yaml), not in values files. Most carry two addonChartVersion values: the base generator (all non-prod clusters, including kestrel-dev) and the environment: prod override. Some carry extra version keys for sub-charts (cert-manager also has addonChartWebhookVersion and addonChartPolicyVersion).

  1. Read the chart changelog, especially for CRD changes.
  2. If CRDs change: helm pull <repo>/<chart> --version <new> --untar and kubectl apply -f <chart>/crds/ before merging. Helm does not upgrade CRDs.
  3. Bump the base version, merge, and let kestrel-dev sync. Check the Application is Synced and Healthy and the pod logs are clean.
  4. Bump the prod override in a second MR.
AddonWatch for
ArgoCDRBAC policy changes, UI changes, ApplicationSet CRD updates
cert-managerCRD version jumps, webhook certificate rotation, approver-policy compatibility
CapsuleTenant CRD changes, webhook compatibility
capsule-argo-addonTemplate changes: afterwards, kubectl get argotranslator tenant-onboarding must be Ready
TraefikIngressRoute and Middleware CRD changes, config key renames

Kubernetes: the control plane can’t be downgraded in place. As a last resort: restore the etcd snapshot, re-provision the control plane at the previous version, and re-image workers (drain, re-image, uncordon). Prefer fixing forward.

Addon: revert the version-bump MR. If CRDs were updated and the old chart can’t use them, restore the old CRDs from the previous chart. ArgoCD syncs the revert on its next poll (about 3 minutes).

  1. kubectl get nodes -o wide: all Ready, correct version.
  2. kubectl get pods -A | grep -v Running: nothing unexpected.
  3. ArgoCD: all Applications Synced and Healthy.
  4. Ask one or two active tenants to confirm their services work.