Ops Runbook: CRD Operator Upgrades and Flux Freezes¶
Kind: how-to
The operator agent persona (epic #66) follows this runbook when an upgrade of a CRD-bringing operator, or a Flux or Helm deploy failure, leaves a cluster unhealthy. It must work through the matching section, read-only checks first, write commands after, before it raises an attention item. People with cluster access can use it the same way.
Each failure has two ways out:
- Roll forward: keep the new version, and repair what blocks it. For add-ons with CRDs this is the default, because Helm rollback does not cleanly undo a CRD change (Renovate ADR §10).
- Roll back: return to the old version. Use it only when the new controller itself misbehaves, and only after the checks in that section show the old CRDs can be applied again.
When an alert sent you here, start on its page in alert runbooks; opted-in upstream alerts link to their upstream runbook instead, and a failed deploy behind them leads back to the triage order. For KubeJobFailed on a Job that Flux applies, go to its section.
For an UpgradeFailed HelmRelease whose new pods cannot pull an image from Harbor, use the missing-image procedure.
For a post-merge gate or smoke Job whose pod waits in ImagePullBackOff on no match for platform in manifest, use Post-merge Job stuck on no match for platform in manifest.
For an UpgradeFailed HelmRelease whose new pod waits on FailedAttachVolume … Volume is already used by pod(s), use Deployment stalled on a ReadWriteOnce volume during a Helm upgrade.
For an UpgradeFailed HelmRelease whose upgrade fails at once with server-side apply failed … spec.strategy.rollingUpdate: Forbidden, use Helm server-side apply cannot switch a Deployment to Recreate.
For a Harbor HelmRelease whose Helm rollback times out on harbor-core, and whose old core logs no migration found for version N, use Harbor: Helm rollback fails with no migration found for version N.
For a pod that cannot be stopped or restarted, or a replacement stuck on MountVolume.SetUp … DeadlineExceeded, use Pod stuck on a volume that stopped completing I/O.
For a StatefulSet pod recreated after its node stalled, waiting on FailedAttachVolume … waiting on detach, use Worker stalled: a StatefulSet pod waits for its volume to detach.
For Kustomizations that report ArtifactFailed with failed to download archive ... connection refused from source-controller, use ArtifactFailed: source-controller unreachable during a node disruption.
To land a demo release bump of eloro/webshop-platform (a chore(demo) pull request that raises the demo shop's image.tag), use Land a demo release bump.
For several pods on one node killed with exit 137 Error and SandboxChanged within seconds, while the node stays Ready, use Pods SIGKILLed with their sandbox, no kernel OOM.
What happened on 2026-10-20¶
This runbook was written after that incident; the incident report records the repair. The Git and pull-request record shows:
| Time (UTC) | Event | Source |
|---|---|---|
| 14:02 | Renovate opens #473, external-secrets chart 0.10.7 → 0.20.4 | 35cdb4a |
| 14:06 | The agent cuts #473 down to 0.10.7 → 0.16.2, step 1 of 3, because v0.17.0 stops serving v1beta1 |
fb7f69b, task #1313 |
| 14:30 | #473 is merged. On hetzner-mgmt the Helm upgrade fails, the automatic rollback remediation fails too, and about 20 Kustomizations stop |
task #1327 |
| 14:40 | #479 moves every manifest to external-secrets.io/v1 (step 2) |
41ee6bd, task #1315 |
| later | A person repairs the CRDs with kubectl. No Git commit records the repair |
task #1327 |
Here is what the charts render, read from templates/crds/ of the published charts 0.10.7 and 0.16.2:
| Chart | ExternalSecret CRD versions |
Storage | spec.conversion |
|---|---|---|---|
| 0.10.7 | v1alpha1, v1beta1 |
v1beta1 |
Webhook → service external-secrets-webhook, path /convert. The cert-controller patches its CA into the CRDs (--crd-names=...) |
| 0.16.2 | v1, v1beta1 |
v1 |
not rendered, so the strategy defaults to None |
installCRDs: true renders these CRDs from the chart's templates/, not from crds/. Helm therefore upgrades them and rolls them back together with the release. That is how all four failure modes below could happen in a single upgrade:
- The CRDs moved from a conversion webhook to
Nonewhile the webhook Deployment was being replaced: the conversion-webhook trap. - As soon as the 0.16.2 CRDs were accepted, objects were written as
v1, sostatus.storedVersionsgainedv1. Helm's rollback then tried to apply the 0.10.7 CRDs, which have nov1. The API server rejects that: failed rollback withstoredVersions. - A CRD kept a
NamesAccepted=Falsecondition, so Flux health checks scored it as failed: staleNamesAccepted. external-secretsstopped being Ready, and everything withdependsOn: external-secretsorexternal-secrets-configwaited. That is 13 direct dependents onhetzner-mgmt, plus their own dependents: the generic Flux freeze.
The live error messages and the exact commands the person ran are not in the record. The mechanisms above come from the charts and from upstream sources, cited in each section. When the operator agent meets one of these failures, it records the real error text in its run report.
Triage order¶
flowchart TD
A["Flux reports Kustomizations not Ready"] --> B["Find the root: not Ready and not waiting on a dependency"]
B --> C{"Root is a HelmRelease?"}
C -->|yes| D["helm history and HelmRelease conditions"]
C -->|no| E["Kustomization events: apply or health check error"]
D --> F{"What does the error name?"}
E --> F
F -->|"conversion webhook"| G["CRD conversion-webhook trap"]
F -->|"storedVersions"| H["Failed rollback with storedVersions"]
F -->|"no migration found for version N"| S["Harbor rollback on a migrated schema"]
F -->|"NamesAccepted"| I["Stale NamesAccepted"]
F -->|"stalled Deployment, volume already used by pod"| R["Stalled on a ReadWriteOnce volume"]
F -->|"server-side apply failed, rollingUpdate Forbidden"| T["Server-side apply cannot switch to Recreate"]
F -->|"BuildFailed, i/o timeout on a URL"| N["Remote fetch timeout"]
F -->|"failed calling webhook ... no route to host / connection refused / no endpoints / EOF / context deadline exceeded"| W["Admission webhook unreachable"]
F -->|"ArtifactFailed, failed to download archive, connection refused"| U["source-controller unreachable"]
F -->|"Job pull error, no match for platform in manifest"| P["Job image has no amd64 entry"]
F -->|no| J["Generic Flux freeze"]
G --> K["Reconcile root, then dependents"]
H --> K
S --> K
I --> K
R --> K
T --> K
N --> K
W --> K
U --> K
P --> K
J --> K
K --> L{"All Ready?"}
L -->|no, runbook exhausted| M["Raise an attention item with what was tried"]
A flux2 upgrade that fails with context canceled has usually recovered by the time you look, so Flux may show nothing not Ready. For that error on flux-system/flux2, go to flux2 self-upgrade fails with context canceled before the generic Flux freeze. The same upgrade can also cancel the health checks that kustomize-controller is waiting on when its pod is replaced. For health check failed after <duration>: context canceled on any Kustomization, near the time the kustomize-controller pod restarted, go to Health check of another Kustomization canceled. On a backup gate it looks like a failed gate, but usually is not.
A failed Job does not always leave a Kustomization not Ready. When the alert is KubeJobFailed and Flux shows nothing not Ready, go to KubeJobFailed for a Job that Flux applies.
Rules of engagement¶
These rules mirror the operator persona in Skatzi/skatzi-agents.
- GitOps first. The lasting fix lands as a pull request to
mainof the repository that owns the configuration. A live repair that Git does not match is undone by the next reconcile, or comes back on the next upgrade. - Direct writes only for recovery.
kubectl,fluxandhelmwrite commands (patch,apply,annotate,suspend,resume,rollback,reconcile) are allowed only to bring a broken cluster back. Log every command in the run report: the command, why you ran it, and its result. Read-only commands (get,describe,events,history,--dry-run=server) are always allowed. - One change at a time. After each write, check that it worked (
flux --context <context> get kustomizations -A,helm --kube-context <context> history, the CRD's conditions) before you make the next one. - Stateful upgrades need a fresh, verified backup from the component's backup gate: the
<component>-preupgradeKustomization of Renovate ADR §11. If there is no gate, or the gate failed, stop and raise an attention item. - Never delete PVCs or namespaces. Never delete a CRD that still has stored objects. Deleting a CRD deletes every object of that kind. For external-secrets, every
ExternalSecretwithcreationPolicy: Ownerwould then take its targetSecretwith it. - Never uninstall a release to "start clean". cert-manager runs with
crds.keep: false, so uninstalling it deletes its CRDs and everyCertificateandIssuer. - When the runbook is exhausted, stop. Raise an attention item that lists the root object, the error text, every command run and its result, the current state, and 2–4 options, the recommended one first.
-
Name the cluster in every command.
kubectlandfluxtake--context <context>,helmtakes--kube-context <context>. A command without it reads the kubeconfig's current context,admin@mgmt-clusteron the ops runner, whichever cluster the alert came from. Take the context from the alert'sclusterlabel. Pages for alerts that fire only on hetzner-mgmt writeadmin@mgmt-cluster; the other pages write<context>, which you replace:Alert's clusterlabelContext on the ops runner Context on the owner's Mac hetzner-mgmtadmin@mgmt-clusteradmin@mgmt-clusterwebshopwebshopadmin@webshopnone (the Mac mini's k3s) mac-mini, which reads thecinamespace, and pods, logs and events inops-agentnone: on the Mac mini, limactl shell k3s sudo k3s kubectlRead Alertmanager and Prometheus through the API server's Service proxy, not through a port-forward to a fixed
localhostport: on 2026-11-09 port-forwards to hetzner-mgmt left over from earlier runs answered a check meant for the webshop cluster (eloro #2758). Read Alertmanager and Prometheus on a cluster has the commands and the check to run before you trust the answer. Sources: Ops agent on the Mac mini and the disaster recovery runbook for the contexts,components/prometheus-stack/helmrelease.yaml(externalLabels) for the label; read 2026-11-09.
Commands below use external-secrets names as the example. Substitute the release, namespace and CRD group of the operator at hand.
CRD conversion-webhook trap¶
A CRD with spec.conversion.strategy: Webhook makes the API server call a Service of the operator for every read or write that needs a version other than the storage version. If that Service is gone, has no ready endpoints, or has a stale CA, the CRD's API breaks for every client: Helm, Flux, the operator and kubectl. This happens when the operator is being upgraded, removed, or has moved away from webhooks.
Symptoms¶
Upstream lists these in the ESO v0.16.0 notes, under "Troubleshooting":
conversion webhook for external-secrets.io/v1, Kind=ExternalSecret failed: the server could not find the requested resource: the CRDs and the webhook disagree, usually because the CRD update did not finish.spec.conversion.webhookClientConfig: Forbidden: should not be set when strategy is not set to Webhook: the new CRD switches toNone, but the live object still has webhook settings. This rule is in the API server's CRD validation (apiextensions/validation/validation.go).- Errors of the form
conversion webhook ... failed: Post "https://<service>.<ns>.svc:443/convert": ... connection refused,no endpoints availableorx509: certificate signed by unknown authorityappear onkubectl --context <context> get <kind> -A, in HelmReleaseUpgrade/Rollbackfailures, and in Kustomization health checks of the CRs.
Read-only checks¶
# Which CRDs convert by webhook, and to which Service?
kubectl --context <context> get crd -o json | jq -r '.items[]
| select(.spec.conversion.strategy == "Webhook")
| [.metadata.name, .spec.conversion.webhook.clientConfig.service.namespace,
.spec.conversion.webhook.clientConfig.service.name] | @tsv'
# Does that Service exist, and does it have ready endpoints?
kubectl --context <context> -n external-secrets get service external-secrets-webhook
kubectl --context <context> -n external-secrets get endpointslices -l kubernetes.io/service-name=external-secrets-webhook
kubectl --context <context> -n external-secrets get deploy external-secrets-webhook
# What does the chart in Git want for conversion? (rendered by manifest CI or locally,
# see the manifest CI guide)
grep -n -A3 'conversion:' /tmp/render/head/hetzner-mgmt/crds/external-secrets.yaml
# Does a list of the CRs work at all?
kubectl --context <context> get externalsecrets.external-secrets.io -A | head
Decide which case you are in:
- The target chart still uses the webhook (its rendered CRD has
strategy: Webhook), and only the Service or its pods are missing: restore the Service. - The target chart uses
None, but the live CRD still saysWebhook, or has a leftoverwebhookblock: patch the conversion toNone.
Roll forward¶
Case A: restore the Service. Make the webhook Deployment healthy again. Do not touch the CRD.
flux --context <context> -n external-secrets reconcile helmrelease external-secrets --reset # clear the failure count, retry
kubectl --context <context> -n external-secrets rollout status deploy/external-secrets-webhook --timeout=5m
If the pods do not start, debug them as an ordinary workload (kubectl --context <context> describe, logs), and fix the cause in Git.
Case B: patch the conversion to None. This is safe only when every served version has the same schema, because with None the API server rewrites apiVersion and nothing else. External-secrets 0.16.x v1 and v1beta1 meet this condition (v0.16.0 notes). Check the upstream notes for any other operator.
for crd in $(kubectl --context <context> get crd -o name | grep '\.external-secrets\.io$'); do
kubectl --context <context> patch "$crd" --type=json \
-p='[{"op":"replace","path":"/spec/conversion","value":{"strategy":"None"}}]'
done
If the old release's cert-controller is still running and writes the webhook back, the CRD flips back. Watch kubectl --context <context> get crd <name> -o jsonpath='{.spec.conversion}' for a minute. In that case, finish the upgrade first: the new cert-controller replaces the old one.
Then reconcile the root and check:
flux --context <context> -n external-secrets reconcile helmrelease external-secrets --reset --force
flux --context <context> -n flux-system reconcile kustomization external-secrets
kubectl --context <context> get externalsecrets -A # lists without conversion errors; READY True
Roll back¶
A rollback re-applies the old CRDs with strategy: Webhook, so it needs the old webhook Service and its pods to come back. Before you roll back, run the read-only checks of the next section. They usually show that a rollback is blocked once the new storage version has been written.
Failed Helm rollback with status.storedVersions¶
status.storedVersions lists every version that objects of a CRD may be stored in, in etcd. The API server adds the storage version to it whenever a CRD update is accepted. It never removes a version on its own, and it rejects any CRD update that drops a listed version from spec.versions (ValidateCustomResourceDefinitionStoredVersions in apiextensions/validation/validation.go):
status.storedVersions[1]: Invalid value: "v1": missing from spec.versions; v1 was previously a
storage version, and must remain in spec.versions until a storage migration ensures no data
remains persisted in v1 and removes v1 from status.storedVersions
This blocks two moves:
- Upgrade: the new chart drops a version that is still stored. For example, ESO 0.16 drops
v1alpha1, and its notes include a pre-check for it. - Rollback: the new chart introduced a storage version (
v1in 0.16.2) that the old chart does not list (0.10.7). From the moment the 0.16.2 CRDs are accepted, Helm's rollback to 0.10.7 is rejected. The HelmRelease then showsRollbackFailedand stalls.
Read-only checks¶
# Stored, served and storage versions per CRD of the group
kubectl --context <context> get crd -o json | jq -r '.items[] | select(.spec.group == "external-secrets.io")
| [.metadata.name,
"stored=" + (.status.storedVersions | join(",")),
"served=" + ([.spec.versions[] | select(.served) | .name] | join(",")),
"storage=" + ([.spec.versions[] | select(.storage) | .name] | join(","))] | @tsv'
# What Helm tried, and why it failed
helm --kube-context <context> -n external-secrets history external-secrets
kubectl --context <context> -n external-secrets get helmrelease external-secrets \
-o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
# Would the chart you want accept the live CRDs? A server-side dry run runs the same
# validation without changing anything.
kubectl --context <context> apply --server-side --dry-run=server --force-conflicts --field-manager=preflight \
-f /tmp/render/head/hetzner-mgmt/crds/external-secrets.yaml
Then choose:
- Roll forward when the new CRDs still serve every version that the manifests in Git use. On 2026-10-20 this was the case: 0.16.2 serves
v1beta1andv1. This is almost always the answer for add-ons with CRDs. - Roll back only when the new controller misbehaves and a forward fix is not available. You must first migrate the stored objects back to a version the old chart stores (see below).
Roll forward¶
- Fix whatever made the upgrade fail, from the HelmRelease conditions: for example, the conversion webhook (previous section) or a failed health check.
- Make Git name the new version. On 2026-10-20 it already did. If someone reverted it, revert the revert by pull request.
- Retry the upgrade:
flux --context <context> -n external-secrets reconcile helmrelease external-secrets --reset --force
helm --kube-context <context> -n external-secrets history external-secrets # newest revision: deployed, at the new chart
- Upgrade pre-check (the ESO 0.16 case): if the new chart drops a version that is still in
storedVersions, rewrite every object in a version that stays, then remove the old version fromstoredVersions. Steps 1–3 of the procedure below do this, without step 0.
Roll back: migrate stored objects, then patch storedVersions¶
This is the Kubernetes procedure for upgrading existing objects to a new stored version, run towards the old version. The example takes the external-secrets CRDs from v1 back to v1beta1, so that the 0.10.7 CRDs can be applied again. Only do this when both versions have the same schema, as with ESO v1 and v1beta1. Otherwise roll forward.
Before you start, suspend the HelmRelease, so Helm does not fight the change:
- Make the old version the storage version in the live CRD. Keep both served. Look up the index of each version first, because the order differs per CRD:
crd=externalsecrets.external-secrets.io
kubectl --context <context> get crd "$crd" -o json | jq -r '.spec.versions | to_entries[] | "\(.key) \(.value.name) storage=\(.value.storage)"'
# with v1 at index 0 and v1beta1 at index 1:
kubectl --context <context> patch crd "$crd" --type=json -p='[
{"op":"test","path":"/spec/versions/0/name","value":"v1"},
{"op":"replace","path":"/spec/versions/0/storage","value":false},
{"op":"test","path":"/spec/versions/1/name","value":"v1beta1"},
{"op":"replace","path":"/spec/versions/1/storage","value":true}]'
- Rewrite every object, so it is stored in the storage version. A write that changes nothing is skipped by the API server, so add a real change:
stamp=$(date +%s)
kubectl --context <context> annotate externalsecrets.external-secrets.io --all -A --overwrite skatzi.com/storage-migrated="$stamp"
kubectl --context <context> annotate clustersecretstores.external-secrets.io --all --overwrite skatzi.com/storage-migrated="$stamp"
# ... every CRD of the group that has objects: kubectl --context <context> api-resources --api-group=external-secrets.io
Check that every object carries the new stamp. Retry any object that failed with a conflict.
- Remove the newer version from
storedVersions. Do this only after step 1 succeeded for every object:
kubectl --context <context> patch crd "$crd" --subresource=status --type=merge -p '{"status":{"storedVersions":["v1beta1"]}}'
-
Re-check with the read-only checks:
stored=v1beta1, and a server-side dry run of the old chart's CRDs passes. -
Roll back in Git: a pull request that reverts the version bump. Once it is merged, resume:
helm --kube-context <context> rollback by hand is the fallback when Flux cannot get there (see Generic Flux freeze). Git must name the version you roll back to before you resume, or Flux upgrades again.
- Remove the
skatzi.com/storage-migratedannotation afterwards:kubectl --context <context> annotate ... skatzi.com/storage-migrated-.
Stale NamesAccepted condition¶
Every CRD carries the conditions NamesAccepted and Established. The API server's naming controller (apiextensions-apiserver/pkg/controller/status/naming_controller.go) sets NamesAccepted=False when the CRD's plural, singular, short names, kind or list kind clash with another CRD of the same group. The possible reasons are PluralConflict, SingularConflict, ShortNamesConflict, KindConflict and ListKindConflict.
Why it can go stale. Every add, update or delete of a CRD queues it for the controller, and a deleted CRD or a status change also queues the other CRDs of its group. sync() then makes two checks in this order (Kubernetes release-1.29 to release-1.35 and master):
- If
spec.namesequalsstatus.acceptedNames, it returns without looking at the condition ("Skip checking names if Spec and Status names are same"). - Otherwise it computes the accepted names and the
NamesAcceptedcondition. It returns without writing only when both equal what is already stored. If either differs, it writes the status.
So while the names differ, a False lasts only as long as a real conflict exists, or until something queues the CRD again. Once the names are equal, check 1 means no requeue changes the condition: a False that was written then, or left over from an earlier status, stays until someone writes the status or changes spec.names.
Why it blocks reconciliation. Flux's health checks (kstatus, fluxcd/cli-utils pkg/kstatus/status/core.go, crdConditions) mark a CRD Failed whenever NamesAccepted is False, even if Established is True. The Kustomization or HelmRelease that applies the CRD fails its health check, and its dependents wait.
Read-only checks¶
# CRDs with NamesAccepted=False
kubectl --context <context> get crd -o json | jq -r '.items[]
| select(any(.status.conditions[]?; .type == "NamesAccepted" and .status == "False"))
| .metadata.name'
# Conditions of one CRD
crd=externalsecrets.external-secrets.io
kubectl --context <context> get crd "$crd" -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
# Are the requested names already accepted? Different output: a requeue makes the controller recompute.
# Equal output: the controller skips this CRD, so a requeue cannot change the condition.
kubectl --context <context> get crd "$crd" -o json | jq -c '.spec.names, .status.acceptedNames'
# Is there a real conflict? Accepted names of every other CRD in the group:
group=$(kubectl --context <context> get crd "$crd" -o jsonpath='{.spec.group}')
kubectl --context <context> get crd -o json | jq -c --arg g "$group" --arg n "$crd" '.items[]
| select(.spec.group == $g and .metadata.name != $n) | {name: .metadata.name, accepted: .status.acceptedNames}'
Roll forward¶
- Real conflict (another CRD of the group claims the same name): fix the source in Git. Usually this is a CRD left behind by an older chart, or two components shipping the same CRD. Remove the duplicate from Git. Delete a leftover CRD from the cluster only when
kubectl --context <context> get <plural>.<group> -Areturns no objects. Deleting a CRD frees its names and requeues the rest of the group, so the condition clears by itself. - Stale, names differ (
spec.namesandstatus.acceptedNamesdiffer, no conflict in the output above): queue the CRD with a harmless write, read the conditions again, then remove the annotation:
kubectl --context <context> annotate crd "$crd" skatzi.com/requeue="$(date +%s)" --overwrite
sleep 5
kubectl --context <context> get crd "$crd" -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
kubectl --context <context> annotate crd "$crd" skatzi.com/requeue-
If the condition is still False, the controller has found a conflict: go back to the conflict check above.
- Stale, names equal (output equal, no conflict, condition still False): the controller skips this CRD (check 1), so a requeue does nothing. Make the names differ for a moment instead: add a category to spec.names, let the controller recompute, then remove it again. This cleared 9 generator CRDs in the 2026-10-20 incident (step 5).
It works because the controller copies spec.names.categories into status.acceptedNames without a conflict check (calculateNamesAndConditions), so a new category gets past check 1, and every other name still equals its accepted value and passes. The controller then writes NamesAccepted=True itself. The same holds for the second write that removes the category. For the same reason this method cannot find a real conflict: run the conflict check above first.
# 1. Note the categories Git renders, and add one more
cats=$(kubectl --context <context> get crd "$crd" -o json | jq -c '.spec.names.categories // []')
echo "$cats"
tmp=$(jq -c '. + ["skatzi-requeue"]' <<<"$cats")
kubectl --context <context> patch crd "$crd" --type=json -p='[
{"op":"add","path":"/spec/names/categories","value":'"$tmp"'}]'
# 2. The controller recomputes: NamesAccepted and the new category in acceptedNames
sleep 5
kubectl --context <context> get crd "$crd" -o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
kubectl --context <context> get crd "$crd" -o json | jq -c '.status.acceptedNames.categories'
# 3. Undo: put back exactly what Git renders. The test operation fails if someone else changed the list.
if [ "$cats" = "[]" ]; then
undo='{"op":"remove","path":"/spec/names/categories"}'
else
undo='{"op":"replace","path":"/spec/names/categories","value":'"$cats"'}'
fi
kubectl --context <context> patch crd "$crd" --type=json -p='[
{"op":"test","path":"/spec/names/categories","value":'"$tmp"'},'"$undo"']'
sleep 5
kubectl --context <context> get crd "$crd" -o json | jq -c '.spec.names == .status.acceptedNames, .spec.names.categories'
Expected output for the external-secrets passwords generator CRD of chart 0.16.2: ["external-secrets","external-secrets-generators"] at step 1; NamesAccepted=True NoConflicts: no conflicts found and the list with "skatzi-requeue" at step 2; true and the original list at step 3. If the undo's test fails, read .spec.names.categories: when it already equals $cats, Flux or Helm put it back, and there is nothing left to undo.
The trade-offs against the status patch below:
| Add and remove a category | Status patch | |
|---|---|---|
| Who writes the condition | the naming controller, from the live names | you, by hand |
| What it writes | spec, which Helm or Flux owns; a reconcile in between can undo it |
only status, which nothing in Git owns |
| Clean-up | must be undone; until then the live CRD differs from Git | none |
| Writes per CRD | two | one |
Log both patches of each CRD in the run report, and check that step 3 printed true before you go on to the next CRD.
- Stale, names equal, and the category method failed (the spec patch is refused, or the condition stays False): only here, as the last resort, set the condition to the value the controller would write. While the names stay equal, the controller does not overwrite it. The JSON patch test operation makes sure you edit the right list entry:
i=$(kubectl --context <context> get crd "$crd" -o json | jq '.status.conditions | map(.type) | index("NamesAccepted")')
kubectl --context <context> patch crd "$crd" --subresource=status --type=json -p='[
{"op":"test","path":"/status/conditions/'"$i"'/type","value":"NamesAccepted"},
{"op":"replace","path":"/status/conditions/'"$i"'/status","value":"True"},
{"op":"replace","path":"/status/conditions/'"$i"'/reason","value":"NoConflicts"},
{"op":"replace","path":"/status/conditions/'"$i"'/message","value":"no conflicts found"}]'
Then check that Established=True. Never set Established by hand: it tells the API server the resource is being served. If Established does not turn True within a minute, stop and raise an attention item.
Then reconcile the Kustomization or HelmRelease that applies the CRD.
Roll back¶
There is nothing version-specific to roll back. If the conflict came from the new chart (it adds a CRD whose names clash), roll back the chart by pull request, then apply the "real conflict" steps.
Generic Flux freeze¶
Most Flux "freezes" are one root failure plus many Kustomizations that dependsOn it.
Read-only checks¶
# Everything not Ready. Dependents say "dependency '<ns>/<name>' is not ready".
flux --context <context> get kustomizations -A --status-selector ready=false
flux --context <context> get helmreleases -A --status-selector ready=false
# The roots: not Ready for a reason other than a dependency
flux --context <context> get kustomizations -A --status-selector ready=false | grep -v 'dependency'
# Why the root fails
flux --context <context> -n flux-system events --for Kustomization/external-secrets
flux --context <context> -n external-secrets get helmrelease external-secrets
kubectl --context <context> -n external-secrets describe helmrelease external-secrets | sed -n '/Conditions/,$p'
helm --kube-context <context> -n external-secrets history external-secrets
# Who waits on it (direct dependents in Git)
grep -rn -A3 'dependsOn:' cluster/hetzner-mgmt | grep -E 'name: external-secrets(-config)?$'
The error text of the root decides the section: conversion webhook, storedVersions, NamesAccepted, a remote fetch timeout, an unreachable admission webhook, or none of these (go on below).
Roll forward¶
- Fix the cause in Git and merge it, or apply the CRD repair from the matching section. When a Helm hook Job fails on data in the cluster, Git may already be right: use Helm hook Job that fails on data in the cluster.
- Retry the root. A HelmRelease that has used up its remediation retries needs
--reset;--forceruns a one-off upgrade:
flux --context <context> -n external-secrets reconcile helmrelease external-secrets --reset --force
flux --context <context> -n flux-system reconcile kustomization external-secrets --with-source
- Dependents reconcile at their own
interval(1, 5 or 10 minutes onhetzner-mgmt) once their dependency is Ready. To hurry the top level, runflux --context <context> -n flux-system reconcile kustomization <name>for each direct dependent. Do not suspend dependents; they only wait.
Helm hook Job that fails on data in the cluster¶
Here the cause is not in Git. Git already names the right version, and the release's hook Job (annotation helm.sh/hook) fails on rows in the database that the new version does not accept. The fix is a data step with the application's own tool, then a forced upgrade. The 2026-11-11 demo shop incident is the worked example: the post-upgrade seed hook (shop seed --profile ci) failed with seed orders.customer_order: 9 of 11 fixtures in place; another row holds a fixture's id.
- Read the hook Job's logs; they name the cause. A chart with
helm.sh/hook-delete-policy: before-hook-creation,hook-succeeded, as the demo shop's has, deletes a failed hook Job only at the next upgrade. Unlike a Job that Flux applies, its pods are still there to read:
kubectl --context <context> -n <ns> get job <job> -o jsonpath='{.metadata.annotations}{"\n"}'
kubectl --context <context> -n <ns> logs -l job-name=<job> --all-containers --tail=20
- Check the backup. Go on only with a fresh, restore-verified backup from the component's backup gate for the version Git pins (rule 4). In the incident, ConfigMap
cnpg-drill/preupgrade-demohadtargetVersion: v1.137.10and alastSuccessfrom that morning. - Fix the data with the application's own tool, run once as a Job at the version Git pins. Never use hand-written SQL. If the application documents no tool for the fix, stop and raise an attention item. In the incident, the tool was the shop's documented reset,
shop seed --reset, from the CronJobseed-reset:
kubectl --context <context> -n shop-demo create job --from=cronjob/seed-reset seed-reset-<task> --dry-run=client -o yaml > seed-reset.yaml
# Edit seed-reset.yaml: set the image tag Git pins, and ttlSecondsAfterFinished: 86400
kubectl --context <context> apply --dry-run=server -f seed-reset.yaml
kubectl --context <context> apply -f seed-reset.yaml
Check the result read-only before the next step, for example with a SELECT in a BEGIN READ ONLY transaction.
- Retry the upgrade:
On Flux 2.9.6 this ran the upgrade and its hooks again from Stalled/RetriesExceeded without --reset. Helm deleted the failed hook Job when it created the new one (before-hook-creation), which cleared KubeJobFailed.
- When the data will come back, as the shop's nightly reset brings it back, create a follow-up task for the application's owner.
These commands were not run again for this page; the incident report records the run and its results.
Roll back¶
- Preferred: a pull request that reverts the version bump. Flux applies it, and helm-controller upgrades to the old chart.
- When Flux cannot get there, because the HelmRelease is stuck in a failed rollback or upgrade:
flux --context <context> -n external-secrets suspend helmrelease external-secrets
helm --kube-context <context> -n external-secrets history external-secrets # pick the last "deployed" or "superseded" good revision
helm --kube-context <context> -n external-secrets rollback external-secrets <revision> --wait --timeout 10m
# Git must now name the chart version of <revision> (revert PR merged), then:
flux --context <context> -n external-secrets resume helmrelease external-secrets
For a chart that templates its CRDs (external-secrets, cert-manager), helm --kube-context <context> rollback re-applies the old CRDs and hits the same storedVersions check. Do the migration first.
- Suspend a Kustomization (
flux --context <context> -n flux-system suspend kustomization <name>) only while you hand-patch objects that it applies itself. An example is the vendored Gateway API CRDs incomponents/gateway-system/crds/, which kustomize-controller would otherwise revert. Resume it as soon as Git matches. A suspended Kustomization is a freeze of its own, and it must not outlive the run.
HelmRelease stalled on an image missing from Harbor¶
If the pinned image is gone, move the pin in Git to a version Harbor still holds. First confirm the image pull error; a HelmRelease's stalled Deployment message alone does not identify the cause. The 2026-10-28 runner incident records the commands, events and recovery behind this procedure.
Symptoms¶
- The HelmRelease reports
UpgradeFailedwithfailed early due to stalled resources: [Deployment/... status: 'Failed'], or its Kustomization times out waiting for a HelmRelease with statusInProgress. - The new pod is in
ImagePullBackOff. Its events sayfailed to resolve reference "harbor.prod.skatzi.com/...": ... not found.
If the pull error is a 5xx from Harbor (unexpected status from HEAD request to https://harbor.prod.skatzi.com/v2/...: 502 Bad Gateway), the image is not missing: Harbor is down. This procedure does not apply. Check whether the Harbor upgrade gate is running (kubectl --context <context> -n harbor get job harbor-preupgrade, with harbor-core, harbor-jobservice and harbor-registry at 0 replicas). The gate stops pulls on purpose while it dumps. Once Harbor is back, the kubelet's next pull retry, at most 5 minutes later, finishes the rollout without any change, and the Kustomization is Ready on its next reconcile. Moving the pin or rolling back would not help. The 2026-11-17 platform-docs incident is an example.
Read-only checks¶
These cluster checks need access to the affected cluster; they were not run again for this page. The incident report records their results for agent-runners on 2026-10-28.
- Run
kubectl --context <context> -n <ns> get deploy,rs,pods. Identify the failed Deployment, its new ReplicaSet and the image tag on its pod. Read the pod's events withkubectl --context <context> -n <ns> describe pod <pod>; confirmImagePullBackOffand the registry'snot founderror. - Query Harbor's
GET /api/v2.0/projects/<project>/repositories/<repo>/artifactswith the namespace's pull robot credentials. For the runners, the project isskatzi, the image repository isagent-runner, and the robot is inagent-runners/harbor-pull-secret. Check that the replacement image tag exists, including its architecture artifacts. A chart artifact alone does not prove the image remains in Harbor. - Run
helm --kube-context <context> -n <ns> history <release>. Compare the failed upgrade and remediation revisions with the images still in Harbor. A Helm rollback can report success while its pod still cannot start. - For each node that could schedule the pod, run
kubectl --context <context> get node <node> -o jsonand inspect.status.imagesfor the old tag. A cache on one node says nothing about another node. Check the pod'simagePullPolicybefore considering cache evidence.
Roll forward¶
- Read the release notes between the pinned version and a version whose image is present in Harbor. Check whether its chart values need changes. The runner component README names the runner image and explains how its chart version is pinned.
- Change the version pin in Git and open a pull request. For the hetzner-mgmt runners, change
agent_runner_versionincluster/hetzner-mgmt/agent-runners/kustomization.yaml. The parent Kustomization reconciles this pin, so it reverts a live patch; the incident's recovery used a Git pull request. - After merge and reconciliation, check the HelmRelease condition,
helm --kube-context <context> -n <ns> history <release>, andkubectl --context <context> -n <ns> get deploy,rs,pods. Confirm that the new image runs and the Deployment is available.
Roll back¶
Do not count on Helm's automatic rollback to restore service. Its previous revision may point to another image Harbor has deleted. With imagePullPolicy: IfNotPresent, a rollback pod can start from a cached image only if it lands on a node that has that image; scheduling makes the outcome uncertain. In the incident, Helm rolled back to chart 0.5.25, but that image was gone from Harbor. See the rollback evidence.
Recreate rollout delay¶
The agent runners use strategy: Recreate and terminationGracePeriodSeconds: 1800, as documented in the runner component README. The upgrade stops the old pod before it knows whether the new image will pull. The new ReplicaSet can wait up to 30 minutes for the old pod to drain. In the incident, Helm completed emilia's upgrade at 11:59:45 UTC, but emilia-container-agent was Ready only at 12:18:06 UTC; see the incident timeline.
Deployment stalled on a ReadWriteOnce volume during a Helm upgrade¶
When a new pod waits for a volume that the old pod still holds, set the Deployment's strategy to Recreate in Git. No live write is needed when Helm's rollback left the service running. A Hetzner volume (hcloud-volumes) is ReadWriteOnce and attaches to one node at a time. strategy: RollingUpdate starts the new pod before it stops the old one. If the scheduler puts the new pod on another node, it waits for the volume until the Deployment's progress deadline, and Helm's remediation rolls back. If it picks the old pod's node, the upgrade passes, so the failure comes and goes. The 2026-11-04 incident is the worked example: harbor-jobservice on hetzner-mgmt.
Symptoms¶
- The HelmRelease reports
UpgradeFailedwithfailed early due to stalled resources: [Deployment/<ns>/<name> status: 'Failed'], thenRollbackSucceeded. After its last retry it isStalled=True RetriesExceeded, and its Kustomization reportsHealthCheckFailed. - The new pod's events say
FailedAttachVolume … Volume is already used by pod(s) <old pod>, and the old pod runs on another node. If the new pod is inImagePullBackOffinstead, go to the missing-image procedure. - The upgrade may not have touched that Deployment at all. A chart that regenerates secrets on every render restarts its Deployments on every upgrade (see Charts that roll on every upgrade).
Read-only checks¶
These commands need cluster access and were not run against a cluster for this page. The jsonpath expressions were checked offline against a sample Deployment and PVC on 2026-11-06. The incident report records their results for harbor on 2026-11-04.
# The failed upgrades, each followed by a rollback; the last revision is deployed
flux --context <context> get helmreleases -n <ns>
helm --kube-context <context> -n <ns> history <release> --max 10
# The new pod waited for a volume the old pod held
kubectl --context <context> -n <ns> get events --sort-by=.lastTimestamp | grep 'already used by pod'
# Is the service running on the rolled-back revision? Note each pod's node.
kubectl --context <context> -n <ns> get deploy,pods -o wide
# Strategy and claims of each Deployment
kubectl --context <context> -n <ns> get deploy -o jsonpath='{range .items[*]}{.metadata.name}{" "}{.spec.strategy.type}{" "}{.spec.template.spec.volumes[*].persistentVolumeClaim.claimName}{"\n"}{end}'
# Access modes and storage class of each claim
kubectl --context <context> -n <ns> get pvc -o jsonpath='{range .items[*]}{.metadata.name}{" "}{.spec.accessModes}{" "}{.spec.storageClassName}{"\n"}{end}'
This case is confirmed when the stalled Deployment shows RollingUpdate and a claim whose access modes are ["ReadWriteOnce"]. For harbor the stalled Deployment's line was harbor-jobservice RollingUpdate harbor-jobservice.
Roll forward¶
- In Git, set the Deployment's strategy to
Recreatein the HelmRelease values. Use the chart's own key and read itsvalues.yamlfor the name: Harbor'supdateStrategy.type(components/harbor/base/helmrelease.yaml), Gitea'sstrategy.type, Mattermost'smattermostApp.strategywithrollingUpdate: null. Add a comment that names the ReadWriteOnce volume. - In the same pull request, set
spec.upgrade.serverSideApply: disabledon the HelmRelease. Without it, server-side apply keeps the liverollingUpdateblock and the upgrade fails at once; Harbor hit this after the first fix on 2026-11-05 (#1231, then #1236). Helm server-side apply cannot switch a Deployment toRecreateexplains why and gives the checks. - Do not reset or force the HelmRelease. The new values change its digest, and helm-controller tries the upgrade again after
RetriesExceededby itself: on 2026-11-05 it upgraded Harbor again within 9 minutes of #1231's merge. - Check:
helm --kube-context <context> -n <ns> history <release>shows a newdeployedrevision,flux --context <context> get helmreleases -n <ns>is Ready, and the Deployment's.spec.strategy.typeisRecreate.
Recreate stops the old pod before it starts the new one, so the Deployment is down for each rollout. That is the price of a volume that attaches to one node only.
Roll back¶
None needed: Helm's remediation has already rolled back, and the old pod keeps serving. Do not revert the commit that triggered the upgrade, and do not run flux reconcile --force or --reset before the fix merges. Each starts another upgrade that rolls the same Deployment under RollingUpdate and can stall the same way. If the service is not running on the rolled-back revision, stop and raise an attention item (rule 7 of the rules of engagement).
Charts that roll on every upgrade¶
Some charts generate secrets anew on every render. Harbor's chart regenerates its token CA and the registry's htpasswd, which changes the checksum/secret* annotations on the pod templates. So every Harbor upgrade restarts harbor-core, harbor-registry and harbor-jobservice, even one that changes only an unrelated value. On 2026-11-04 the trigger was the database's priorityClassName.
To see which Deployments an upgrade rolled, compare the checksum annotations of two revisions. Do not save or diff the whole helm get manifest output: it holds the release's Secrets, and on 2026-11-04 such a dump was pushed to a branch (#2572).
# Only names and checksum annotations, no Secret values. Run for the old and the new revision.
helm --kube-context <context> -n <ns> get manifest <release> --revision <N> | grep -E '^ name: |checksum/'
With Recreate and serverSideApply: disabled, Harbor's upgrade landed as Helm revision 17 on 2026-11-05; #2569 verified it on 2026-11-06 (after the fix merged).
Helm server-side apply cannot switch a Deployment to Recreate¶
When a chart value changes a Deployment's strategy.type from RollingUpdate to Recreate, set spec.upgrade.serverSideApply: disabled on the HelmRelease in Git. No live write is needed. helm-controller v1.6.4 (Flux 2.9.5) applies the release server-side. The live Deployment holds a strategy.rollingUpdate block that the API server filled in as a default, so no field manager owns it. Server-side apply removes only fields that the applier owns, and it treats the chart's rollingUpdate: null as "no opinion". The block stays, and the API rejects Recreate next to it. A client-side three-way merge sends rollingUpdate: null as a delete, which removes it. The 2026-11-04 incident is the worked example: harbor-jobservice and harbor-registry on hetzner-mgmt, fixed by #1236 after #1231.
Symptoms¶
-
The upgrade fails at once, not at the end of a wait. The HelmRelease reports
UpgradeFailed, thenRollbackSucceeded; after its last retry it isStalled=True RetriesExceeded, and its Kustomization reportsHealthCheckFailed. On 2026-11-05 the error was: -
The commit that triggered the upgrade sets
Recreatefor a Deployment that runsRollingUpdatetoday. Often it is the fix for a Deployment stalled on a ReadWriteOnce volume. - Pods of other objects in the release restart, though the release ends on its old revision. See Side effect: each failed attempt restarts other objects.
Read-only checks¶
These commands need cluster access and were not run against a cluster for this page. The jq filter was checked offline against a sample Deployment on 2026-11-06. The incident report records the results for harbor on 2026-11-05 (step 15).
# Failed upgrades, each followed by a rollback; the description names server-side apply
flux --context <context> get helmreleases -n <ns>
helm --kube-context <context> -n <ns> history <release> --max 10
# The live strategy: type RollingUpdate with a rollingUpdate block
kubectl --context <context> -n <ns> get deploy <name> -o jsonpath='{.spec.strategy}{"\n"}'
# Who owns the strategy fields
kubectl --context <context> -n <ns> get deploy <name> --show-managed-fields -o json \
| jq '.metadata.managedFields[] | {manager, s: .fieldsV1["f:spec"]["f:strategy"]}'
This case is confirmed when helm-controller owns only f:type ("s": {"f:type": {}}) and no entry lists f:rollingUpdate: the block is the API server's default. On 2026-11-05 that was the result for both Harbor Deployments.
A server-side dry run reproduces the error, and a merge-patch dry run shows that the client-side route works. Neither changes anything:
# Server-side apply of Recreate with rollingUpdate: null. Expect the Forbidden error.
# A separate field manager: a partial apply as helm-controller would also drop the
# fields helm-controller owns and fail for another reason.
kubectl --context <context> -n <ns> apply --server-side --dry-run=server --field-manager=ssa-check --force-conflicts -f - <<'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
name: <name>
spec:
strategy:
type: Recreate
rollingUpdate: null
EOF
# Merge patch of the same change. Expect {"type":"Recreate"}.
kubectl --context <context> -n <ns> patch deploy <name> --dry-run=server --type=merge \
-p '{"spec":{"strategy":{"type":"Recreate","rollingUpdate":null}}}' -o jsonpath='{.spec.strategy}{"\n"}'
On 2026-11-05 the DR session ran the merge-patch dry run (as --type=strategic) on both Deployments and got {"type":"Recreate"}, and a server-side-apply dry run reproduced the Forbidden error (step 15). The record does not hold the exact apply command; the one above is its equivalent.
Roll forward¶
There are two ways forward. Use the first: it is the fix of #2589 (#1236). Both need Recreate in Git already: do not change the strategy back to RollingUpdate.
In Git: serverSideApply: disabled (used on 2026-11-05).
-
Open a pull request that sets
spec.upgrade.serverSideApply: disabledon the HelmRelease, with a comment that says why, ascomponents/harbor/base/helmrelease.yamldoes (#1236,f867551a):upgrade: # Client-side three-way merge, not server-side apply. The chart writes `rollingUpdate: null` # for Recreate (updateStrategy below), and only a merge patch deletes the API server's default # rollingUpdate: server-side apply leaves it, and the Deployment is rejected (DR issue #5). serverSideApply: disabled -
Do not reset or force the HelmRelease. The changed spec makes helm-controller try the upgrade again after
RetriesExceededby itself: #1236 merged at 02:32:02 and Helm revision 17 started at 02:41:06. - Check:
helm --kube-context <context> -n <ns> history <release>shows a newdeployedrevision,flux --context <context> get helmreleases -n <ns>is Ready, andkubectl --context <context> -n <ns> get deploy <name> -o jsonpath='{.spec.strategy}'prints{"type":"Recreate"}.
Live: a one-time merge patch, then a reset. Not used so far, and not run against a cluster. It keeps server-side apply for the release. Once the defaulted block is gone, later server-side applies of Recreate have nothing to trip on. It is two cluster writes, so log each one (rule 2 of the rules of engagement).
-
Patch the strategy to match Git. The strategy is not part of the pod template, so the patch rolls no pods:
kubectl --context <context> -n <ns> patch deploy <name> --type=merge --field-manager=operator-recovery \ -p '{"spec":{"strategy":{"type":"Recreate","rollingUpdate":null}}}'Check:
.spec.strategyprints{"type":"Recreate"}, andkubectl --context <context> -n <ns> get rsshows no new ReplicaSet. Repeat for each Deployment the chart switches. -
The HelmRelease is
RetriesExceededand its spec has not changed, so helm-controller will not try again by itself. Clear its failure count and start one upgrade: -
Check as in step 3 above. Then hand
spec.strategy.typeback: step 1 left anUpdateentry foroperator-recoveryin the Deployment'smanagedFields. Remove it as in step 5 of the roll forward in Harbor: Helm rollback fails withno migration found for version N, withdeploy <name>instead ofhelmrelease harbor.
Side effect: each failed attempt restarts other objects¶
Helm applies the release's objects one by one and stops at the first rejected one. Objects applied before it are changed, and the rollback changes them back. Each change restarts their pods. On 2026-11-05 Helm patched the harbor-database StatefulSet before the Deployments failed, so each of the two failed attempts restarted harbor-database-0 (down 01:29:25–01:31:30 and 01:31:52–01:34:04), and the upgrade that landed restarted it once more.
So every further attempt before the fix costs another restart: a revert, flux reconcile --force or --reset, or a Git change that changes the HelmRelease. Make the fix the next attempt. When the release holds a database, check that its last backup and restore drill passed before you merge the fix, as the agent did on 2026-11-04 (rule 4 of the rules of engagement).
Roll back¶
None needed: Helm's remediation has already rolled back, and the release serves on its old revision. Do not revert Recreate either: for a Deployment with a ReadWriteOnce volume that brings back the stall on the volume. If the service is not running on the rolled-back revision, stop and raise an attention item (rule 7 of the rules of engagement).
Open questions¶
- Whether to switch Harbor back to server-side apply now that its Deployments have no
rollingUpdateblock. This runbook does not decide it; the HelmRelease's owner does. - The live route has not been run. Whether
--reset --forcealone starts the upgrade at once, and whether helm-controller's next server-side apply takesspec.strategy.typeover fromoperator-recovery, is not confirmed (read 2026-11-06).
Harbor: Helm rollback fails with no migration found for version N¶
When a Harbor upgrade fails after the new core has migrated the database, Helm's rollback cannot work, so roll forward to the chart in Git. A Helm rollback of a stateful app with schema migrations cannot succeed through Helm alone. Helm puts back the old manifests, not the old data. Harbor's core migrates its database one way when it starts, and the old core refuses a schema that is newer than its own migrations. The only way back to the old version is a restore of the gate's backup, by harbor-rollback (Harbor rollback). The 2026-10-31 incident is the worked example: chart 1.19.2 → 1.19.4, schema 181.
Symptoms¶
- HelmRelease
harbor/harborreportsUpgradeFailedwithtimeout waiting for: [...]. On 2026-10-31 it wasDeployment/harbor/harbor-jobservice: jobservice panicked withfailed to load configuration ... Get "http://harbor-core:80/api/v2.0/internalconfig": ... connection refusedwhile core was not yet up. - Then
RollbackFailed:Helm rollback to previous release harbor/harbor.v<N> with chart harbor@<old version> failed: ... timeout waiting for: [Deployment/harbor/harbor-core status: 'InProgress']. Each event becomes a post-merge failure task, one for the new chart version and one for the old (#2274 and #2277). -
The old
harbor-coreexits with: -
helm historyshows the same rollback again and again. helm-controller remediates a failed rollback with another rollback and does not retry the upgrade by itself.
Read-only checks¶
These are the commands the operator agent ran on 2026-10-31. They were not run again for this page: the run that wrote it has no cluster access.
# The failed upgrade, then rollbacks to the same old revision (failed or pending-rollback)
flux --context admin@mgmt-cluster get helmreleases -n harbor
helm --kube-context admin@mgmt-cluster history harbor -n harbor --max 10
# The old core refuses the schema; the new jobservice waited on core
kubectl --context admin@mgmt-cluster -n harbor logs deploy/harbor-core --tail=50 | grep -E 'FATAL|migrat'
kubectl --context admin@mgmt-cluster -n harbor get events --sort-by=.lastTimestamp | grep -E 'harbor-(core|jobservice|database)'
# The schema version the new core left behind. dirty must be f.
kubectl --context admin@mgmt-cluster -n harbor exec harbor-database-0 -c database -- psql -U postgres -d registry -Atc 'select version, dirty from schema_migrations'
# The chart version Git carries: is it the new one?
grep -n 'version:' components/harbor/base/helmrelease.yaml
# The gate backed up the old version and verified it (Complete, log ends with the publish step)
kubectl --context admin@mgmt-cluster -n harbor get job harbor-preupgrade
kubectl --context admin@mgmt-cluster -n harbor logs job/harbor-preupgrade --all-containers | tail -20
# The live HelmRelease timeout. Empty means Helm's 5m default.
kubectl --context admin@mgmt-cluster -n harbor get helmrelease harbor -o jsonpath='{.spec.timeout}'
# When harbor-smoke started. It starts the harbor-rollback restore 45 minutes later.
kubectl --context admin@mgmt-cluster -n harbor get job harbor-smoke -o jsonpath='{.status.startTime}'
Compare the schema version with the old release's migrations: the highest file number in make/migrations/postgresql/ of the old Harbor tag, for example v2.15.2, which ends at 180. A version above it confirms this case.
On 2026-10-31 the schema was 181|f, Git carried 1.19.4, the gate's backup of 1.19.2 was verified, and the chart diff (harbor-helm v1.19.2...v1.19.4) changed only image tags.
Roll forward¶
Roll forward when all of these hold:
- Git carries the new chart, and nobody has reverted it;
dirtyisf, so the migration finished;- the gate's backup is complete and verified (rule 4 of the rules of engagement);
- the new version was only slow, not broken: its logs show it waiting for the database or core (
connection refused, crash backoff while the database restarts), not errors of its own.
Then, one write at a time, and check each before the next:
-
If the live timeout is empty or shorter than the database restart needs, raise it. Use your own field manager, so kustomize-controller does not undo it before Git carries the value:
kubectl --context admin@mgmt-cluster -n harbor patch helmrelease harbor --type=merge --field-manager=operator-recovery -p '{"spec":{"timeout":"15m"}}'On 2026-10-31 the upgrade restarted
harbor-database. Postgres waited the pod's 120 s grace period for its clients, and the volume took 36 s to reattach. 5 minutes was not enough; 15 minutes was. -
Ask helm-controller for a one-off upgrade to the chart in Git:
helm-controller picks up the request only once the rollback in flight has ended. On 2026-10-31 that was 3 minutes later. The CLI's wait timing out is expected.
-
Check:
helm --kube-context admin@mgmt-cluster history harbor -n harborshows adeployedrevision on the new chart,flux --context admin@mgmt-cluster get helmreleases -A --status-selector ready=falseis empty, andkubectl --context admin@mgmt-cluster -n harbor get job harbor-smoke harbor-rollbackshows the smoke Job Complete and the rollback still suspended. -
Make Git match the cluster: a pull request that sets the same
spec.timeoutincomponents/harbor/base/helmrelease.yaml. Write the incident report. -
Hand
spec.timeoutback to Git once theharborKustomization has applied that pull request. Step 1'skubectl patchleft anUpdateentry foroperator-recoveryinmetadata.managedFields. Because the live value already matches Git, kustomize-controller's dry run reportsHelmRelease/harbor/harbor: unchangedand skips the apply, so it never takes the field over.operator-recoverystays its only owner, and a later Git change or removal ofspec.timeoutwould not reach the cluster. A server-side apply with--field-manager=operator-recoverydoes not help: it adds a separateApplyentry and keeps theUpdateone. Remove the entry itself (#2621, 2026-11-06):# Owners by index. Note the index of operator-recovery, and generation. kubectl --context admin@mgmt-cluster -n harbor get helmrelease harbor --show-managed-fields -o json \ | jq -r '.metadata.managedFields | to_entries[] | "\(.key) \(.value.manager) \(.value.operation) timeout=\(.value.fieldsV1["f:spec"]["f:timeout"] != null)"' kubectl --context admin@mgmt-cluster -n harbor get helmrelease harbor -o jsonpath='{.metadata.generation}{"\n"}' # Remove that one entry. The test op refuses the patch if the index points at another manager. kubectl --context admin@mgmt-cluster -n harbor patch helmrelease harbor --type=json -p '[{"op":"test","path":"/metadata/managedFields/<i>/manager","value":"operator-recovery"},{"op":"remove","path":"/metadata/managedFields/<i>"}]'The
jqlisting was checked against a sample object, not against the cluster; the patch is the one #2621 ran onhetzner-mgmt. On 2026-11-06 the entry was index 2. A metadata-only change leavesgenerationunchanged, so no Helm upgrade runs.Check:
spec.timeoutis unchanged,generationis the same as before, and the HelmRelease is Ready (flux --context admin@mgmt-cluster get helmreleases -n harbor). No manager ownsspec.timeoutnow. kustomize-controller claims it on its next full apply, which is the next Git change to the HelmRelease.The same applies to any other write with
--field-manager=operator-recovery: once Git carries the value, remove that manager's entry the same way.
Finish before harbor-smoke gives up, 45 minutes after its start time. After that, harbor-rollback restores the old version even if the roll-forward is still running.
Roll back: let harbor-rollback restore¶
Restore instead of rolling forward when the new version itself is broken, not just slow:
dirtyist: the migration stopped part way;- the new core or jobservice fails with errors of its own after the database is up;
- the forced upgrade deploys, but the smoke check fails;
- Git has already been reverted to the old chart.
Do not run helm rollback: it ends in the same loop. Let harbor-smoke start harbor-rollback when its 45 minutes run out. That Job restores the gate's backup and pins the old chart. Then revert the upgrade commit in Git, as Harbor rollback says. If harbor-rollback refuses or fails, follow its manual fallback.
Open questions¶
- If a roll-forward is still running when
harbor-smokegives up,harbor-rollbackrestores over it. This runbook does not say whether to stop the smoke check first, or how. Ask the owner before you do.
BuildFailed on a remote fetch timeout¶
A Kustomization that lists a URL under resources: makes kustomize-controller download it on every build, so every reconcile needs that host reachable. One timed-out connection fails the build. Nothing is applied, the workload keeps running at the last applied revision, and only the Kustomization and its dependents go not Ready. The 2026-10-27 incident is the worked example: keycloak on hetzner-mgmt, with prometheus-stack waiting on it for 31 s.
Symptoms¶
- The Kustomization reports
BuildFailed, with an error likekustomize build failed: accumulating resources ... Get "https://...": dial tcp <ip>:443: i/o timeout, orhit 27s timeout running '/usr/bin/git fetch ...'. - The revision it failed at did not change the component: the failure came on a periodic reconcile, not on a merge.
- Its dependents say
dependency 'flux-system/<name>' is not ready.
Read-only checks¶
The first three commands need cluster access and were not run again for this page; the incident report shows their output on 2026-10-27. The last two run on a clone of this repository.
# The error, and whether earlier reconciles succeeded
flux --context <context> -n flux-system events --for Kustomization/<name>
# One timeout or many? Many point at the cluster's egress, not a single blip.
kubectl --context <context> -n flux-system logs deploy/kustomize-controller --since=3h | grep -c 'i/o timeout'
# Does the URL from the error answer now? 200 means a retry will build.
curl -s -o /dev/null -w '%{http_code}\n' <url>
# Did the failing revision touch the component?
git show --stat <revision>
# Which kustomizations still fetch remote resources
grep -rnE '^ *- *(https?://|github\.com/|git::)' components cluster --include=kustomization.yaml
The last command prints nothing on main since #1751 vendored the Keycloak manifests (checked 2026-10-27). Run against the revision before #1751, it finds the three Keycloak URLs. Output there means a component can fail this way again.
Roll forward¶
- Once the URL answers, retry the root. Dependents follow on their own at their next retry:
- If the URL still times out, do not retry in a loop. Check the cluster's egress first, and raise an attention item when the cause lies outside the cluster.
- The lasting fix is to vendor the remote resource into Git by pull request, unchanged, so the build no longer reaches the network. #1751 did this for Keycloak in
components/keycloak/base/upstream/; Gateway API's CRDs are vendored the same way incomponents/gateway-system/crds/. Check thatkubectl kustomize <path>renders the same output before and after, so Flux applies nothing new.
Roll back¶
None needed: the failed build applied nothing, and no version changed.
Admission webhook unreachable during a node disruption¶
An operator's mutating or validating admission webhook is called by the API server on every create or update of its objects, including Flux's server-side dry run. When the node that serves the webhook stalls, or its Cilium agent restarts, the call fails for a few seconds and the Kustomization that applies those objects goes not Ready. Nothing was applied, so the workload keeps running at the last applied revision. The failure usually clears on the next reconcile, so check first, and change nothing in Git once the webhook admits again.
The worked example is the 2026-10-31 incident on hetzner-mgmt (task #2254, incident report). worker-3, saturated by CI jobs, stalled. The only endpoint of the CNPG webhook was on it, and taskbase-prod was not Ready for 5 minutes, until its own next reconcile. Since task #2636 the CNPG operator on hetzner-mgmt runs two replicas on different nodes, each serving the webhook (Operator replicas), so one stalled worker should no longer fail it; a single-replica webhook still can.
The CNPG Barman Cloud plugin is not a webhook, but a stalled worker takes it down the same way, and it still runs one replica. Clusters that use it then report Cluster cannot proceed to reconciliation due to an error while interacting with plugins. They can stay so for up to 17 minutes after the plugin is back, because of the operator's error backoff. To check, and to make the operator retry at once, see Clusters wait up to 17 minutes after the plugin returns (task #2661).
The same call can also fail once with EOF, with no node disruption at all: see a one-off EOF below. Its example is the 2026-11-02 failure of cert-manager-config on hetzner-mgmt (task #2356, incident report).
Symptoms¶
- The Kustomization reports
ReconciliationFailedwith a dry-run error that names an admission webhook and a network failure, for example:
Cluster/tasks-prod/tasks-prod-db dry-run failed (InternalError): Internal error occurred: failed calling webhook "mcluster.cnpg.io": failed to call webhook: Post "https://cnpg-webhook-service.cnpg-system.svc:443/mutate-...": dial tcp 10.104.31.28:443: connect: no route to host
connection refused and no endpoints available for service are the same failure at another moment of the restart. An error that names a conversion webhook is a different problem: go to the conversion-webhook trap.
- Or the call ends in EOF instead of a network error:
ClusterIssuer/letsencrypt-prod dry-run failed (InternalError): Internal error occurred: failed calling webhook "webhook.cert-manager.io": failed to call webhook: Post "https://cert-manager-webhook.cert-manager.svc:443/validate?timeout=30s": EOF
EOF means the API server reached the webhook, and the connection was closed before an HTTP response came back. The network errors above mean no connection was made. For EOF, run the read-only checks, then go to a one-off EOF.
- Or the call ends in context deadline exceeded:
IPAddressPool/metallb-system/ip-address-pool dry-run failed (InternalError): Internal error occurred: failed calling webhook "ipaddresspoolvalidationwebhook.metallb.io": failed to call webhook: Post "https://metallb-webhook-service.metallb-system.svc:443/validate-metallb-io-v1beta1-ipaddresspool?timeout=10s": context deadline exceeded
A connection was made, but no answer came within the webhook's timeoutSeconds (the ?timeout= in the URL: 10 s for MetalLB). The webhook pod may then log http: TLS handshake error from <api-server-ip>:<port>: EOF as the API server gives up. The node usually stays Ready and the webhook pod does not restart, so the restart check below finds nothing: the node was slow, not restarting. Run the read-only checks, then go to a slow node: context deadline exceeded.
- The revision it failed at did not change the object: the failure came on a periodic reconcile, not on a merge. A post-merge failure task can still name that revision, because it was the source's HEAD at the time.
- Pods on one node restarted in the same minute, often the Cilium agent and Flux controllers among them, and other Kustomizations show "Reconciliation in progress" for a while. For context deadline exceeded this check can find nothing.
Read-only checks¶
These checks follow what the operator agent ran for the 2026-10-31 incident; the commands were not run against a cluster for this page. Take <ns>, <svc> and the object from the error text: cnpg-system, cnpg-webhook-service and Cluster/tasks-prod/tasks-prod-db in the example.
# The error, its time, and the revision. If the failing revision equals
# status.lastAppliedRevision, the reconcile was periodic: nothing new was being applied.
flux --context <context> -n flux-system events --for Kustomization/<name>
kubectl --context <context> -n flux-system get kustomization <name> \
-o jsonpath='{.spec.sourceRef.name} {.status.lastAppliedRevision}{"\n"}'
# Did the revision change the object? Run in a clone of the repository the source points to
# (Skatzi/taskbase for taskbase-prod). Compare the commit time with the time of the event.
git show --stat --format='%H %ci %s' <revision>
# Where does the webhook Service point? Note the node of each endpoint.
kubectl --context <context> -n <ns> get endpointslices -l kubernetes.io/service-name=<svc> -o wide
kubectl --context <context> -n <ns> get pods -o wide
# Did pods on that node restart around the event? Time, pod, container, exit code:
kubectl --context <context> get pods -A --field-selector spec.nodeName=<node> -o json \
| jq -r '.items[] | .metadata.namespace as $ns | .metadata.name as $pod
| .status.containerStatuses[]? | select(.lastState.terminated)
| "\(.lastState.terminated.finishedAt) \($ns)/\($pod) \(.name) exit=\(.lastState.terminated.exitCode)"' \
| sort
kubectl --context <context> get events -A --field-selector reason=SandboxChanged
# The Cilium agent on that node: did it restart, and why? "No response from probe" and
# "http2: client connection lost" in its previous log point at a node stall.
kubectl --context <context> -n kube-system get pods -l k8s-app=cilium -o wide --field-selector spec.nodeName=<node>
kubectl --context <context> -n kube-system logs <cilium-pod> -c cilium-agent --previous | tail -50
# Does the webhook admit now? A server-side dry run calls the webhook and changes nothing.
kubectl --context <context> -n <object-ns> get <kind> <object> -o yaml | kubectl --context <context> apply --dry-run=server -f -
The jq filter was checked against sample pod JSON on 2026-11-03.
It is the node-disruption failure when the revision did not change the object, the webhook's endpoint sits on a node whose pods restarted in the same minute, and the dry run is admitted now.
If the dry run is still refused, or the EndpointSlice has no ready address, check the node of the webhook's endpoint before you look at the operator:
# STATUS NotReady means the node's Ready condition is False or Unknown; Unknown means
# the kubelet stopped posting status. node.kubernetes.io/unreachable or not-ready taints
# show the control plane has marked the node out.
kubectl --context <context> get node <node>
kubectl --context <context> get node <node> -o jsonpath='{.spec.taints}{"\n"}'
# Has the taint manager evicted the webhook pod, or cancelled the eviction?
kubectl --context <context> get events -A --field-selector reason=TaintManagerEviction
These commands were not run against a cluster for this page; the operator agent read the node's conditions, taints and TaintManagerEviction events for the 2026-11-06 incident.
- The node is
NotReadyorUnknown: the node is out, not the operator. Do not touch the operator, its HelmRelease or Git. Wait for one of two things: the node returns, or the taint manager evicts the webhook pod once its 300 sunreachable/not-readytoleration runs out, and the Deployment schedules a new pod on another node. The CNPG chart values incomponents/cloudnative-pg/base/helmrelease.yamlset no tolerations, so its pods carry the 300 s that Kubernetes adds by default. When the EndpointSlice shows a ready address, run the dry run again, then go on to the roll forward. If the node stays out and no replacement pod becomes Ready, the runbook is exhausted: raise an attention item (rule 7). - The node is
Readyand the dry run is still refused: the operator itself is down. Follow the generic Flux freeze for its HelmRelease.
The worked example for the first branch is the 2026-11-06 incident on hetzner-mgmt (task #2634, incident report). At 15:47:20 UTC the dry run of mattermost-db was refused with dial tcp 10.104.31.28:443: connect: no route to host, and the webhook's only endpoint was ready=false. The operator was not broken: its node, worker-1, had stopped posting status at 15:41:16 and carried the unreachable taints from 15:46:31. worker-1 came back on its own at 15:48:19, the taint manager cancelled the pending evictions, the dry run was admitted at 15:51:25, and one flux reconcile kustomization mattermost made mattermost Ready. Following the generic Flux freeze for the operator's HelmRelease would have been the wrong branch.
If the node stayed Ready, and the restarts are several pods with exit 137 Error and SandboxChanged within a few seconds, the disruption was likely pods killed with their sandbox: after the roll forward below, use Pods SIGKILLed with their sandbox, no kernel OOM to find why.
One-off or pattern? Two more read-only checks tell a single failed call from a webhook that keeps failing. The API server counts every failed webhook call in apiserver_admission_webhook_rejection_count, with error_type="calling_webhook_error". Take <webhook> from the error text (webhook.cert-manager.io in the EOF example):
# Failed calls per webhook and hour. Graph the first query in Prometheus over the past 7 days
# (Prometheus in a browser: see rule 8 of the rules of engagement).
# sum by (name) (increase(apiserver_admission_webhook_rejection_count{error_type="calling_webhook_error"}[1h]))
# Total so far for this webhook:
# sum(apiserver_admission_webhook_rejection_count{name="<webhook>",error_type="calling_webhook_error"})
# Did the webhook pods restart, and when did they last stop?
kubectl --context <context> -n <ns> get pods -o json \
| jq -r '.items[] | .metadata.name as $pod | .status.containerStatuses[]?
| "\($pod) restarts=\(.restartCount) last=\(.lastState.terminated.finishedAt // "-") exit=\(.lastState.terminated.exitCode // "-")"'
For the 2026-11-02 incident the operator agent read the same counter and the pods' lastState; these commands were not run against a cluster for this page. The jq filter was checked against sample pod JSON, and both queries parse with promtool, on 2026-11-03. There the counter reached 1 at 11:00 UTC and stayed at 1 for 7 days, and neither webhook pod had restarted since 2026-10-31. A single step of 1 and no restart near the event is a one-off. A counter that keeps rising, or a restart in the same minute, is a pattern. An EOF with no node disruption and a counter that stays flat is a one-off EOF.
Roll forward¶
- Nothing to repair once the dry run is admitted. Wait for the Kustomization's next
interval, or recover sooner with one retry:
Do not retry in a loop while the dry run is refused. 2. Check that it is Ready, and that the same restarts left nothing else not Ready. Empty output means nothing is:
flux --context <context> get kustomizations -A --status-selector ready=false
flux --context <context> get helmreleases -A --status-selector ready=false
- Then find why the node stalled, and treat that as its own fix with its own task. On 2026-10-31 the cause was Gitea Actions CI job containers that run outside the runner pod's cgroup, requests and limits (#2256). The node's kernel and service logs come from Talos, which the
operatoragent cannot read; raise an attention item when the cluster's own record does not settle the cause.
A one-off EOF¶
The webhook call ended in EOF, and the checks show no node disruption: the webhook pods stayed Ready in the EndpointSlice, none restarted, and no node or Cilium agent restarted. On 2026-11-02 the nodes were also not CPU-starved and Cilium reported no drops. A likely mechanism is a request sent on a kept-alive connection just as the webhook closes it as idle, but no record shows this directly (see Open questions at the end of this section).
Roll forward: none, when the failed-call counter stays flat and a server-side dry run of the rendered object passes:
# Run in a clone of the repository the Kustomization's source points to, with access to
# the cluster. flux --context <context> build ks reads the live Kustomization and renders its spec.path as
# Flux does, with its patches and its postBuild variables (from cluster-config).
flux --context <context> build ks <name> --path ./<spec.path> \
| kubectl --context <context> apply --dry-run=server --server-side --field-manager=kustomize-controller -f -
Do not render with kubectl kustomize <path>: it skips the Flux variables, so a path that uses ${var} sends the literal text and the dry run fails when nothing is wrong. On 2026-11-02 the Kustomization was cert-manager-config (path components/cert-manager/config, which has no variables), and both ClusterIssuers printed serverside-applied (server dry run) with exit 0 (from the incident report; not run again for this page). On 2026-11-03, flux --context <context> build ks cert-manager-config with --kustomization-file and --dry-run (no cluster) rendered the same two ClusterIssuers; the live form above was not run for this page. Write an incident report, and make no cluster write and no Git change. Flux recovers at the Kustomization's next interval.
If the counter keeps rising, it is not a one-off. Look at the webhook pods' logs and resources (CPU, memory, restarts) and at the node path, as in the node-disruption case above, and treat the cause as its own fix with its own task.
A slow node: context deadline exceeded¶
The webhook call timed out, the webhook's node stayed Ready, and nothing on it restarted, or only one pod did. The node was too slow to answer for a while. Find the node of the webhook's endpoint with the read-only checks above, take its IP from kubectl --context <context> get node <node> -o wide, and read Prometheus at the time of the error (through the Service proxy):
| Query | A slow node shows |
|---|---|
rate(node_pressure_io_waiting_seconds_total{instance="<node-ip>:9100"}[1m]) |
above 0 in the minute of the error, about 0 before |
scrape_duration_seconds{job="node-exporter",instance="<node-ip>:9100"} |
seconds, where it is about 0.1 s otherwise: even node-exporter on the node answers slowly |
node_procs_blocked{instance="<node-ip>:9100"} |
above 0 for about a minute |
node_disk_io_now{instance="<node-ip>:9100"} |
above 0 on the node's attached volumes (sdb and up) |
rate(node_disk_write_time_seconds_total{instance="<node-ip>:9100"}[1m]) / rate(node_disk_writes_completed_total{instance="<node-ip>:9100"}[1m]) |
write latency per device: tenths of a second up to seconds, against milliseconds before |
node_disk_info{instance="<node-ip>:9100"} |
the serial of each device, which is the Hetzner volume id: match it to kubectl --context <context> get pv -o custom-columns=PV:.metadata.name,VOLUME:.spec.csi.volumeHandle to name the PVs |
Then compare the same node_disk_io_now and node_procs_blocked across all nodes, and read the table in First: one device, or a Hetzner network fault?. A slow node is usually its last column, one node's volumes and network stalling together: it recovers on its own, with no reboot and no force-delete.
These queries use the metrics the operator agent read for the 2026-11-22 incident; they were not run against a cluster for this page, and they parse with promtool (checked on 2026-11-21). The worked example is that incident on hetzner-mgmt (task #3589, incident report). The dry run of metallb-config failed at 01:22:18 UTC with the error above. The only MetalLB webhook pod ran on worker-2, which stayed Ready, and the webhook pod did not restart; only the Barman Cloud plugin on worker-2 exited once. worker-2's I/O pressure rose to 0.47 s/s, its node-exporter scrape took 6.72 s against ~0.1 s, node_procs_blocked was 1–2, and two of its volumes, sdb (gitea-database-pv) and sde (gitea-shared-storage-pv), had requests in flight with writes taking 0.16–3.2 s. The Kustomization's next retry, two minutes later, succeeded.
Roll forward: as for the node disruption: none once a server-side dry run (as in a one-off EOF) is admitted; the retry recovers it. Then find why the node stalled, as in step 3 of the roll forward above. If the node is still slow, wait: do not restart the webhook pod or touch its HelmRelease.
Roll back¶
Not applicable when the revision did not change the object, for a network error, an EOF and a timeout alike. Rolling back an unrelated upgrade changes nothing on the cluster and does not bring the webhook back.
Open questions¶
- What closes the connection in a one-off
EOF: a keep-alive race, a TLS handshake ending early, or something on the path. The cert-manager webhook logs at info level, and nothing else records a single connection (task #2356, 2026-11-02).
ArtifactFailed: source-controller unreachable during a node disruption¶
kustomize-controller downloads each source's artifact over HTTP from source-controller's Service. source-controller runs one replica (the flux2 chart 2.19.1 sets replicas: 1), so when its node stalls, or the pod restarts, the Service has no ready endpoint for a minute or two. Every Kustomization that reconciles in that window fails, and nothing is applied: the workloads keep running at the last applied revision. It is the same mechanism as an admission webhook unreachable during a node disruption, with source-controller as the single-replica controller. It clears on the next reconcile, so check first, and change nothing in Git once the Kustomizations are Ready again.
Since #2658, every Kustomization on hetzner-mgmt retries a failed reconcile after 2m instead of at its interval (Flux Kustomizations Retry Failures Sooner), so the failure should clear about 2 minutes after source-controller is back.
The worked example is the 2026-11-06 incident on hetzner-mgmt (tasks #2643 and #2645, incident report). worker-1 stalled under memory from about 23:13 to 23:18:17 UTC, source-controller was killed after a liveness failure at 23:18:20, and four Kustomizations reported ArtifactFailed from 23:18:33. All four reconciled on their own by 23:28:22, before #2658 shortened the retry.
Symptoms¶
- One or more Kustomizations report
ArtifactFailed, with an error like:
failed to download archive: GET http://source-controller.flux-system.svc.cluster.local./gitrepository/flux-system/gitea-platform/<sha>.tar.gz giving up after 10 attempt(s): ... dial tcp 10.96.150.192:80: connect: connection refused
Several Kustomizations fail within a minute or two, whatever their source.
- The revision in the error did not change the failing objects: the failure came on a periodic reconcile, or on an unrelated merge. A post-merge failure task can still name that revision, because it was the source's HEAD at the time.
- The source-controller pod restarted in the same minutes, and pods on its node restarted with it.
Read-only checks¶
These checks follow what the operator agent ran for #2643; the commands were not run against a cluster for this page. The pod label app=source-controller is the one the flux2 chart 2.19.1 sets (read from its templates/source-controller.yaml on 2026-11-06).
# The node of the source-controller pod, its restarts, and how its last container ended.
# A liveness kill shows exit 137 in the same minute as the first ArtifactFailed.
kubectl --context <context> -n flux-system get pods -o wide -l app=source-controller
kubectl --context <context> -n flux-system get pods -l app=source-controller -o json \
| jq -r '.items[] | .metadata.name as $pod | .status.containerStatuses[]?
| "\($pod) restarts=\(.restartCount) last=\(.lastState.terminated.finishedAt // "-") exit=\(.lastState.terminated.exitCode // "-")"'
kubectl --context <context> -n flux-system get events --field-selector involvedObject.name=<source-controller-pod>
# The node's events: NodeNotReady, then NodeReady, around the failure
kubectl --context <context> get events -A --field-selector involvedObject.kind=Node,involvedObject.name=<node>
# Has it cleared? ReconciliationSucceeded after the ArtifactFailed means yes.
flux --context <context> -n flux-system events --for Kustomization/<name>
# Did the revision change the object? Run in a clone of the repository the source points to.
git show --stat <revision>
It is this failure when the source-controller pod was restarted, or its node was NotReady, in the same minutes as the first ArtifactFailed, and the revision did not change the failing objects. To see what else restarted on the node, and whether it is still out, use the node checks in Admission webhook unreachable during a node disruption.
Roll forward¶
- Nothing to repair once the Kustomizations are Ready again. Check that nothing is left not Ready. Empty output means nothing is:
flux --context <context> get kustomizations -A --status-selector ready=false
flux --context <context> get helmreleases -A --status-selector ready=false
- Retry only a Kustomization that is still not Ready after
source-controlleris Ready again, once:
Do not retry while source-controller is not Ready: the download fails the same way. If it stays not Ready, follow the generic Flux freeze for the flux2 HelmRelease.
3. Then find why the node stalled, as its own fix with its own task, as in step 3 of the roll forward in Admission webhook unreachable during a node disruption. On 2026-11-06 it was memory on worker-1 (#2407, #2543, #2549). Write an incident report.
Roll back¶
None needed: the failed download applied nothing, and the revision did not change the objects.
Open questions¶
- Should
source-controllerbe kept off nodes that agent runs and CI jobs can squeeze, or get a priority class? Its one replica on worker-1 was restarted in both stalls of 2026-11-06 (15:48 and 23:18). Whether a second replica would help depends on how source-controller serves artifacts from more than one pod, which is not checked here (#2643 incident report).
flux2 self-upgrade fails with context canceled¶
A flux2 upgrade that changes the helm-controller Deployment makes helm-controller replace itself while it is still applying the release. The failed revision usually heals on its own within a minute, so check first, and change nothing when it has recovered. When it does not heal, the alert FluxNotReady fires after 10 minutes. The Flux page explains why; the 2026-10-25 incident is the worked example. It has happened on every change to the helm-controller Deployment so far: 2026-07-02, 2026-10-25, twice on 2026-11-07, and 2026-11-18, where it took 47 s because the same upgrade also replaced source-controller.
Symptoms¶
- HelmRelease
flux-system/flux2reportsUpgradeFailedwithHelm upgrade failed for release flux-system/flux2 with chart flux2@<version>: context canceled. Since #3458 this event no longer becomes a Taskbase task: the Flux Alerttaskbase-platform-flux2dropsflux2events whose message matchescontext canceled(exclusionList). The signal that it did not heal is the alertFluxNotReady, which raises an incident task; otherflux2failures, such as a values or CRD error, still become post-merge failure tasks. - A new helm-controller ReplicaSet was created during the upgrade, and the old helm-controller pod was killed in the same second as the failure.
- When the upgrade also replaces kustomize-controller, other Kustomizations can fail at the same time with
context canceledon their health check. That case has its own checks.
Read-only checks¶
The commands are the ones the operator ran for the 2026-10-25 incident. They were not run again for this page.
# Has it recovered? Look for a "deployed" revision on the chart version in Git, after the "failed" one.
helm --kube-context <context> -n flux-system history flux2 --max 10
grep -n 'version:' components/flux/base/helmrelease.yaml
# Is anything still not Ready? Empty output means nothing is.
flux --context <context> get helmreleases -A --status-selector ready=false
flux --context <context> get kustomizations -A --status-selector ready=false
# The self-replacement: a new helm-controller ReplicaSet, then "Killing" of the old pod
kubectl --context <context> -n flux-system get events --sort-by=.lastTimestamp | grep -E 'helm-controller|flux2'
# A new helm-controller pod holds the leader lease, and it logged "release not observed to be made for object"
kubectl --context <context> -n flux-system get lease helm-controller-leader-election
kubectl --context <context> -n flux-system logs deploy/helm-controller --since=1h | grep -E 'not observed|upgrade|in-sync'
On 2026-10-25, helm history showed revision 4 failed (context canceled) and revision 5 deployed on flux2-2.19.1, 16 s later.
Roll forward¶
- It has recovered: a
deployedrevision on the chart version in Git follows thefailedone, and bothready=falselists are empty. Change nothing on the cluster. Do not run a Helm rollback: it would replace helm-controller again in the same way. Write the incident report and close the task. - It has not recovered: the latest revision stays
failedorpending-upgrade, or the Flux controllers don't come back. Then it is a stuck upgrade: go to the generic Flux freeze. Its roll back is a Helm rollback to the last good revision, then a revert of the version bump in Git.
Roll back¶
None while it has recovered. For a stuck upgrade, follow the roll back in the generic Flux freeze.
Alert FluxNotReady¶
Severity: warning, incident. Fires when one of Flux's own objects has had Ready=False for 10 minutes: the HelmRelease flux-system/flux2, the Kustomization flux-system that applies it, or the cluster's root Kustomization (path ./cluster/<name>: hetzner-mgmt-cluster, webshop). The rule is in components/prometheus-stack/config/prometheus-rules.yaml, on gotk_resource_info from kube-state-metrics. A context canceled self-upgrade heals within a minute, so this alert means it did not: the failed revision was not followed by a deployed one, or Flux broke in another way, and changes in Git may no longer reach the cluster. Labels: customresource_kind, namespace, name.
Run the read-only checks of this section with the alert's cluster, and read the object's own condition:
kubectl --context <context> -n flux-system get <helmrelease|kustomization> <name> \
-o jsonpath='{range .status.conditions[*]}{.type}={.status} {.reason}: {.message}{"\n"}{end}'
flux2staysfailedorpending-upgrade, or the controllers don't come back: a stuck upgrade, go to the generic Flux freeze.- A Kustomization fails to build or apply (
BuildFailed,ReconciliationFailed): follow the triage order from that object; the fix is a pull request that repairs the manifest. - It is Ready again when you look: check that the alert no longer fires and change nothing, as for every incident.
Health check of another Kustomization canceled¶
kustomize-controller runs a Kustomization's health check inside the reconcile. When a flux2 upgrade changes the kustomize-controller Deployment (chart 2.20.0 changed its image to v1.10.1), the old pod is stopped, and the health check it is waiting on ends at once with context canceled instead of a timeout. Flux reports that as HealthCheckFailed, and Taskbase raises a post-merge failure task for it. The objects it waited on are not touched: the new controller reconciles again and waits for them. The 2026-11-18 incident is the worked example: harbor-preupgrade lost a 45-minute wait on its gate Job, and was Ready 7.5 minutes later with nothing changed.
The likely victims are the backup gates, the <component>-preupgrade Kustomizations on hetzner-mgmt (Harbor, Gitea, OpenBao, Mattermost, Keycloak and others; grep -rn 'name: .*-preupgrade$' cluster/ lists them). Their health checks wait on a gate Job for a long time (harbor-preupgrade allows timeout: 8h5m), so a flux2 merge can easily land during one.
Symptoms¶
- A Kustomization reports
HealthCheckFailedwithhealth check failed after <duration>: context canceled. The duration is how long it had waited, not itsspec.timeout. - In the same second, the flux-system events show the old kustomize-controller pod
Stopping container managerandstopped leading. Aflux2chart version was merged shortly before.
Read-only checks¶
The commands follow what the operator checked for the 2026-11-18 incident. They were not run again for this page. Replace <ks> with the Kustomization, and <namespace> and <job> with the Job in its spec.healthChecks.
# Has it recovered? Ready=True on a newer revision, with "Health check passed in ...".
# Empty lists mean nothing is not Ready.
flux --context <context> get kustomizations -A --status-selector ready=false
flux --context <context> get helmreleases -A --status-selector ready=false
kubectl --context <context> -n flux-system get kustomization <ks> \
-o jsonpath='{range .status.conditions[*]}{.type}={.status} {.message}{"\n"}{end}{.status.lastAppliedRevision}{"\n"}'
# The controller restart: the new kustomize-controller pod's age, the old pod's "Killing"
# and "stopped leading" in the same second as the failure, and the new leader
kubectl --context <context> -n flux-system get pods -o wide | grep kustomize-controller
kubectl --context <context> -n flux-system get events --sort-by=.lastTimestamp | grep -E 'kustomize-controller|<ks>'
kubectl --context <context> -n flux-system get lease kustomize-controller-leader-election
# Was the Job recreated? A creationTimestamp before the failure means the new controller kept
# the same Job. One after it means the new revision changed the Job, and a new gate run started.
kubectl --context <context> -n <namespace> get job <job> \
-o custom-columns=UID:.metadata.uid,CREATED:.metadata.creationTimestamp,SUCCEEDED:.status.succeeded,FAILED:.status.failed
# Did the revision that replaced the controller touch the component? Empty output means no.
git diff --stat <previous-revision> <flux2-revision> -- components/<component> cluster/<cluster>/<component>
# The gate's own result: the end of its log (Harbor: "Backup ... verified.")
kubectl --context <context> -n <namespace> logs job/<job> --all-containers --timestamps | tail -n 20
On 2026-11-18, Job harbor/harbor-preupgrade kept its uid and its creationTimestamp 18:25:25, the failure came at 19:10:46, and harbor-preupgrade reported Health check passed in 5m5.042606015s on main@sha1:ce536ba3 at 19:18:19.
Roll forward¶
- It has recovered: the next reconcile is Ready, and the Job it waited on succeeded. Change nothing on the cluster and write the incident report. Do not delete or recreate the gate Job: Flux would run a whole new gate, which takes another backup with the component's writers stopped (Harbor's core, jobservice and registry were at 0 for about 20 minutes on 2026-11-18).
- The Job is still running: the new controller waits on it within the Kustomization's
spec.timeout. Change nothing, and check again when the Job has ended. - The Job failed: it is a real gate failure, not this case. Follow the component's gate page (for Harbor, The upgrade gate, "On failure") and rule 4 of the rules of engagement.
- It does not become Ready for another reason: go back to the triage order with the new error.
Roll back¶
None. Nothing changed on the cluster: only the old controller's wait ended, and the gate Job kept running. A Helm rollback of flux2 would replace kustomize-controller again and cancel waits the same way.
Post-merge Job stuck on no match for platform in manifest¶
If an upgrade moved a gate or smoke Job to an image tag that has no linux/amd64 image, revert the tag in Git and wait for upstream. The tag exists, but its index lists no image the nodes can run: every hetzner-mgmt and webshop node is amd64 (Hetzner cx servers). The 2026-11-20 harbor-smoke incident is the worked example: Docker Hub published every postgres:19* tag with an empty index, and postgres:19.0-alpine reached harbor-smoke's collation container.
Symptoms¶
- The Job's Kustomization, such as
harbor-postupgrade, reportsHealthCheckFailedwithtimeout waiting for: [Job/<ns>/<job> status: 'InProgress']. Its next retry reportsfailed early due to stalled resources: [Job/<ns>/<job> status: 'Failed']. - The Job ended with
DeadlineExceeded, and its pod is gone. - The namespace's events show
Failed to pull image "<image>:<tag>": ... no match for platform in manifest: not found, thenImagePullBackOff, until the Job'sactiveDeadlineSeconds.
If the error is failed to resolve reference ... not found for a Harbor image, the tag itself is missing: use HelmRelease stalled on an image missing from Harbor.
The container that cannot pull runs nothing, so whatever it does on failure does not happen either. In harbor-smoke, collation runs after smoke has passed, so no rollback starts (Harbor rollback: the collation check). Containers before it have run, though: in a Job that stops a service first, check that the service is back before you wait for the revert.
Read-only checks¶
The cluster commands were run for harbor-smoke in the incident; they were not run again for this page.
# Why the Job ended (DeadlineExceeded), and that the rollback Job is still suspended
kubectl --context <context> -n <ns> get job <job> -o jsonpath='{.status.conditions}'
kubectl --context <context> -n <ns> get job <component>-rollback -o jsonpath='{.spec.suspend}'
# The pull error and the image it names
kubectl --context <context> -n <ns> get events | grep 'no match for platform'
# The nodes' architecture
kubectl --context <context> get nodes -L kubernetes.io/arch
Then read the platforms in the tag's index. For a Docker Hub image (library/ for official images such as postgres):
IMG=library/postgres TAG=19.0-alpine
TOKEN=$(curl -s "https://auth.docker.io/token?service=registry.docker.io&scope=repository:$IMG:pull" | jq -r .token)
curl -s -H "Authorization: Bearer $TOKEN" \
-H 'Accept: application/vnd.oci.image.index.v1+json' \
-H 'Accept: application/vnd.docker.distribution.manifest.list.v2+json' \
"https://registry-1.docker.io/v2/$IMG/manifests/$TAG" \
| jq -c '{mediaType, platforms: [.manifests[]? | .platform | select(.os != "unknown") | "\(.os)/\(.architecture)"]}'
Run while this page was written (task #3502), it printed for 19.0-alpine and then for the previous tag 18.7-alpine:
{"mediaType":"application/vnd.oci.image.index.v1+json","platforms":[]}
{"mediaType":"application/vnd.oci.image.index.v1+json","platforms":["linux/amd64","linux/arm","linux/arm","linux/arm64","linux/386","linux/ppc64le","linux/riscv64","linux/s390x"]}
The select drops the attestation entries (unknown/unknown). For a public quay.io image, use the same curl without the token against https://quay.io/v2/<org>/<repo>/manifests/<tag>; for openbao/openbao:2.7.2 it lists linux/amd64. A mediaType that is a single image manifest, not an index, has one platform: read it from the image's config. Where Docker is installed, docker buildx imagetools inspect <image>:<tag> lists the same platforms; it was not run for this page.
Roll back: revert the image in Git¶
- Open a pull request that puts the image back on the previous tag, and run the check above for that tag first: its index must list
linux/amd64. When the upgrade pull request changed nothing else, revert its merge commit. In the incident this was #1629. - Make no live write. The revert changes the Job's pod template, and the gate and smoke Jobs carry
kustomize.toolkit.fluxcd.io/force: Enabled(components/*/rollback/job.yaml,components/*/backup/job.yaml,components/*/preupgrade/job.yaml), so Flux deletes and recreates the Job on the first reconcile after the merge. A Job without the annotation is replaced as inKubeJobFailedfor a Job that Flux applies. -
After the merge, check that the recreated Job uses the old tag and completes, and that the Kustomization is Ready:
kubectl --context <context> -n <ns> get job <job> -o jsonpath='{.spec.template.spec.containers[*].image}{"\n"}' kubectl --context <context> -n <ns> wait --for=condition=complete job/<job> --timeout=60m flux --context <context> get kustomizations -A --status-selector ready=falseUse a
--timeoutof up to the Job'sactiveDeadlineSeconds. The last command must not list the Job's Kustomization.
Roll forward¶
Only to another tag whose index lists linux/amd64, if the upgrade needs one now. Do not open a pull request for the empty tag again: Renovate proposes it once more after the revert. That pull request's upgrade evidence records the tag's platforms, and it is ready to merge only once the index lists linux/amd64.
KubeJobFailed for a Job that Flux applies¶
The upstream KubeJobFailed runbook says to remove the failed Job. For a Job that Flux applies from Git, that helps only after the cause is fixed: Flux recreates the Job, and it fails again the same way. The dashboard-deployer incident is the worked example. The alert fires while a failed Job exists (kube_job_failed > 0), whoever made it.
Read-only checks¶
# Is the alert active, and for which Job? Through the Service proxy to Alertmanager;
# .labels.cluster must name the cluster of <context>:
AM=/api/v1/namespaces/monitoring/services/http:monitoring-kube-prometheus-alertmanager:9093/proxy
kubectl --context <context> get --raw "$AM/api/v2/alerts" \
| jq -c '.[] | select(.labels.alertname == "KubeJobFailed") | {cluster: .labels.cluster, namespace: .labels.namespace, job_name: .labels.job_name, state: .status.state}'
# Who owns the Job: labels, annotations and owner
kubectl --context <context> -n <namespace> get job <job> \
-o jsonpath='{.metadata.labels}{"\n"}{.metadata.annotations}{"\n"}{.metadata.ownerReferences}{"\n"}'
# Why it failed: the reason (BackoffLimitExceeded, DeadlineExceeded) and whether pods are left
kubectl --context <context> -n <namespace> get job <job> -o jsonpath='{.status}'
kubectl --context <context> -n <namespace> get pods -l job-name=<job>
# What changed in Git, and when Flux recreated it
git log -p -- <path of the Job manifest>
The owner decides what to do:
| The Job has | Owner | Go on with |
|---|---|---|
Label kustomize.toolkit.fluxcd.io/name |
the Flux Kustomization of that name, from a manifest in Git | Roll forward, below |
ownerReferences of kind CronJob |
the CronJob, which may itself be applied by Flux | CronJob-created Jobs |
Annotation helm.sh/hook |
a Helm hook of a HelmRelease | the generic Flux freeze: the HelmRelease's conditions and helm --kube-context <context> history show the failed hook. When Git already names the right version and the hook fails on data in the cluster, use Helm hook Job that fails on data in the cluster |
A Job that is a backup gate (<component>-preupgrade) has its own alert page in alert runbooks, for example OpenBaoPreupgradeGateFailed; start there.
No pods, no logs. A Job that ends BackoffLimitExceeded here keeps no pods, so kubectl logs has nothing to show. Reproduce the Job's call by hand instead, read-only, from the Job's own command in Git. Never print a secret: read it from the Secret the Job uses and pass it to curl on stdin with -K -. For the dashboard deployer, this is the call that showed the 401:
# Grafana runs on hetzner-mgmt only. The port-forward stops at the closing parenthesis.
(
kubectl --context admin@mgmt-cluster -n monitoring port-forward svc/monitoring-kube-prometheus-stack-grafana 23000:80 & PF=$!
trap 'kill $PF 2>/dev/null' EXIT
sleep 3; kill -0 $PF 2>/dev/null || exit 1 # port taken or no access: stop here
kubectl --context admin@mgmt-cluster -n monitoring get secret monitoring-kube-prometheus-stack-grafana -o jsonpath='{.data.admin-password}' \
| base64 -d | sed 's/^/user = "admin:/; s/$/"/' \
| curl -s -o /dev/null -w '%{http_code}\n' -K - http://127.0.0.1:23000/api/user
)
Only make calls that read (GET); the Job's own write is what replacing the Job does later. The sed line turns the password into a curl config line; a password that contains " or \ needs escaping first. The piping was checked against a local test server on 2026-10-24, not against the cluster.
Roll forward¶
- Fix the cause first. A wrong manifest is fixed in Git by a pull request. A credential that has drifted, such as a stored password that no longer matches its Secret, is fixed by a person: stop and raise an attention item. Repeat the read-only call from the checks; it must now succeed.
- Replace the Job. A Job's pod template cannot change, so a failed Job does not run again on its own. Either:
-
delete it and let Flux recreate it from Git:
-
or change the Job's spec in Git when the fix is there anyway. If the Job carries the annotation
kustomize.toolkit.fluxcd.io/force: enabled, as the dashboard deployer and the backup gate Jobs do, Flux deletes and recreates it on the change. That is how the curl bumpa1407ebrecreated the dashboard deployer. Without the annotation, delete the Job as above.
Deleting the Job deletes nothing else: it holds no data, and its pods are already gone. Check that with kubectl --context <context> get pods,pvc in its namespace first.
3. Check the result:
Then, through the Service proxy to Prometheus and Alertmanager on the same <context> (commands), the query kube_job_failed{namespace="<namespace>",job_name="<job>"} > 0 returns no series, and Alertmanager's /api/v2/alerts has no KubeJobFailed alert for the Job. Do not silence the alert to get there.
CronJob-created Jobs¶
A Job that a CronJob created, such as a backup or drill Job, is not recreated by Flux: the CronJob makes a new Job, under a new name, on its next schedule. Deleting the failed Job does not start a new run.
- A later run succeeding does not clear the alert. The CronJob keeps up to
failedJobsHistoryLimitfailed Jobs (1 or 3 in this repository), and a successful run does not remove them.KubeJobFailedfires until the failed Job is gone (Backups: failed drills). - First check for a newer success.
lastSuccessfulTimeinkubectl --context <context> -n <namespace> get cronjob <cronjob> -o yamlmust be later than the failed Job's failure time in itsstatus.conditions. Then the fix depends on the cause:- The cause needed a change in Git: fix it by pull request, wait for the next scheduled run to succeed, then delete the failed Job with
kubectl --context <context> -n <namespace> delete job <job>. The Mattermost file backup incident is the worked example. - The cause was a one-off window that is already over, such as a backup gate's stop window, a rollout, or a transient error from an external service that a later run no longer sees: the failure falls inside the window, and the record shows the window ended, for example in the gate Job's
status.completionTime, the scale events in the namespace,helm --kube-context <context> history, or a later run's log that reports the external call working again. Nothing in Git needs to change. Delete the failed Job, and record the window as the cause in the incident report. When the window can come back, as a backup gate's stop window does on every upgrade of its component, also create a follow-up task that keeps the Job from failing in it. The Gitea push mirror incident is the worked example; its follow-up is Taskbase task #1591. For an external error, the GitHub 500 incident is the worked example: GitHub answered one push of the push mirror withInternal Server Error, and the next run found the mirror healthy.
- The cause needed a change in Git: fix it by pull request, wait for the next scheduled run to succeed, then delete the failed Job with
- With no newer success, the cause is not fixed yet: go back to the read-only checks rather than delete the Job.
Roll back¶
None for the Job itself. When a version bump in Git caused the failure, revert it by pull request, as in the generic Flux freeze's roll back, then replace the Job as above.
Runner pods get "403 Access denied" from the gateway¶
Not an upgrade failure. It follows a backend's pod replacement, such as a backup gate scaling a component to 0 and back, or a migration. The incident report has the mechanism.
Symptoms¶
ProbeFailedwithcomponent="agent-runners"for one platform host, while the same host's ownProbe(frommonitoring) passes.- From a pod in
agent-runners:HTTP 403, bodyAccess denied, headerserver: envoy, and nox-envoy-upstream-service-time. The backend logs no request. - The runner restart-loops on its Keycloak login, or its clones fail with
remote: Access denied. Taskbase shows the runner offline.
First rule out a backend outage. This 403 has also been seen while the backend was down: in the 2026-10-28 incident, pods with an egress policy (the runners and the agent-runners probe) got it for part of a one-minute Gitea outage, while the monitoring probe, which has no egress policy, got 503. Both probes got 503 at first, so an outage does not always give a 403. Why the gateway answered 403 then is not established: the report has a hypothesis (Envoy kept the dead pod as its upstream), but no Envoy or Hubble record confirms it. Gitea never answers with this 403; it answers an anonymous clone with 401. So check whether the backend pod was restarting or not Ready at that time, and whether the monitoring probe for the same host got 503:
kubectl --context admin@mgmt-cluster -n <backend namespace> get pods -o wide # RESTARTS, AGE, and the lastState.terminated time
# The two probes for the same host, side by side (Prometheus):
# probe_http_status_code{instance=~"https://<host>.*"}
If the 403 came during the outage and ended once the backend was Ready again, treat it as a symptom of the outage: there is nothing to fix at the gateway. Work on why the backend went down instead, and do not roll back the client. The rest of this section covers a 403 that outlasts the backend's recovery.
Read-only checks¶
# Does the runner pod get the 403, and does a pod in another namespace get 200?
kubectl --context admin@mgmt-cluster -n agent-runners exec deploy/<runner> -c runner -- curl -sk -o /dev/null -w '%{http_code}\n' https://<host>/
# The verdict at the gateway: http-request DROPPED from the runner pod
hubble observe --from-namespace agent-runners --verdict DROPPED --last 50
# The backend's current identity, and whether the runner's policy selects it
kubectl --context admin@mgmt-cluster -n <backend namespace> get ciliumendpoints -o wide
kubectl --context admin@mgmt-cluster -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg policy selectors | grep -A3 <backend label>
Roll forward¶
- Check the Cilium version (
helm --kube-context admin@mgmt-cluster -n kube-system history cilium) and thatenable-envoy-configistruein thecilium-configConfigMap. Cilium before 1.18.12 refreshes the gateway's copy of the runner's policy, when a backend gets a new identity, only for pods with an Envoy redirect (cilium/cilium#46821). On such a version, add an empty HTTP rule (rules: {http: [{}]}) to every backend rule ofagent-runner-platform(cluster/<name>/agent-runners/namespace/cilium-network-policy.yaml) by pull request; it allows every request and gives the runner pods the redirect. From 1.18.12 on, with Envoy config enabled, the copy is refreshed for every pod, so the symptom there is a new bug: record the Hubble drops and thecilium-dbg policy selectorsoutput in the incident report. - To recover now, replace the runner pod; that rebuilds its policy. Wait for a run in progress to finish first (
kubectl --context admin@mgmt-cluster -n agent-runners rollout restart deployment <runner>; strategyRecreatewaits for it). - A new backend behind a platform host needs its own
toEndpointsrule on its HTTP port; see the agent-runner component README, "Network policy".
Roll back¶
None: replacing the runner pod changes no configuration. Do not remove the backend rules to "simplify" the policy; the gateway then refuses those hosts for good.
Ops agent cannot read its break-glass kubeconfig¶
The job sandbox (ADR-0006, Job sandbox) grants a run only the paths it lists. From agent-runner 0.5.31 (agent-runner task #2040), a runner labelled role=ops grants read-only the absolute KUBECONFIG entries that existed as regular files when it started; every other runner denies them.
Symptoms¶
In an ops run, kubectl, flux or helm fails with:
error loading config file "/break-glass/kubeconfig": open /break-glass/kubeconfig: permission denied
Read-only checks¶
The ops agent's own mac-mini context reads the pods of ops-agent (check 1 with kubectl --context mac-mini -n ops-agent in place of k -n ops-agent), but no Secrets, so a person runs the other k commands below as agent-ops on the Mac mini, with k() { limactl shell k3s sudo k3s kubectl "$@"; } from Ops agent on the Mac mini.
- The runner version:
k -n ops-agent get pods -o jsonpath='{.items[*].spec.containers[*].image}'andtagincluster/mac-mini/ops-agent/oci-repository.yaml. Before 0.5.31 there is no grant. - The label:
runner.labelsincluster/mac-mini/ops-agent/helm-release.yamlholdsrole=ops. - The file:
k -n ops-agent get secret ops-agent-break-glass -o jsonpath='{.data}' | jq 'keys'listskubeconfig(keys only, never the values), and the runner pod started after the key was there (k -n ops-agent get pod -o widefor its age, and the Secret'screationTimestamp). - A context that still fails after the grant names a certificate or exec-plugin file:
kubectl config view -o jsonpath='{.users[*].user}'(without--raw, so embedded credentials print asDATA+OMITTED) showsclient-certificate,client-keyorexecpaths. Those files are not granted.
Roll forward¶
- An older runner: move the ops agent to 0.5.31 or later by pull request (the rollout order is in agent-runner's
docs/investigations/2040-ops-kubeconfig.md). - A missing label: add
role=opsby pull request; it also selects the ops tasks. - A kubeconfig created or recreated after the pod started: once no run is in progress, replace the pod (
k -n ops-agent rollout restart deployment/ops-agent) so the sandbox is built with the file. - Certificate or exec-plugin paths: regenerate the kubeconfig with embedded credentials (
--embed-certs, as in Ops agent on the Mac mini); the owner does this, since it is the break-glass credential.
Roll back¶
None: do not widen the grant to the whole /break-glass directory, which also holds the GitHub token.
Pod stuck on a volume that stopped completing I/O¶
Not an upgrade failure. The block device of a pod's Hetzner volume stops completing I/O, so the processes that use it hang. Then kubelet cannot stop or restart the container, and a replacement pod cannot mount the volume. The fix is on the node or at Hetzner, which the agent cannot reach: it confirms the hang, may clear the pod's API object, and hands over to a person. It happened to OpenBao on worker-2 on 2026-11-03: #2362's report (pull request #1128) has the mechanism, and the storm report the recovery. That time the device resumed on its own after about 30 minutes, and the replacement pod then mounted the volume and started without help.
No alert fires on the device itself. You arrive through its effects: ProbeFailed or KubePodNotReady for the pod's service, and for OpenBao also ExternalSecretNotReady and a Flux freeze behind external-secrets-config.
First: one device, or a Hetzner network fault?¶
Check this before the steps below. If volumes on more than one node stall at the same time, together with DNS or pod-network timeouts, the fault is at Hetzner, not in one device. Hetzner volumes are network block storage, and pod traffic between nodes runs over Hetzner's private network, so a fault in Hetzner's network stops both. Do not force-delete pods or reboot nodes for it: the fault ends when Hetzner fixes it, and a reboot only adds an outage.
Tell the two cases apart in Prometheus, at the time the trouble began:
| Query | One hung device | Hetzner network fault | One node's volumes and network stall |
|---|---|---|---|
node_disk_io_now > 0 |
one attached volume (sdb or higher) on one node |
several attached volumes (sdb and up) on more than one node, while the local root disks (sda) stay idle |
one or more attached volumes on one node, while its sda and every other node's volumes stay idle |
node_procs_blocked |
above 0 on that node only | above 0 on several nodes at once | above 0 on that node; other nodes may follow briefly, after it, while their processes wait on it |
probe_dns_lookup_time_seconds |
normal, a few milliseconds | 5 s (the probe timeout) on every target: the prober's DNS failed, see ProbeFailed |
5 s on every target when a CoreDNS replica runs on that node |
| How long | until the device resumes, or the node is rebooted: 30 minutes on 2026-11-03 | until Hetzner fixes it: 10 minutes on 2026-11-04 | about a minute, then it recovers on its own |
Pods logging lookup <name> on 10.96.0.10:53 … i/o timeout, even for in-cluster names, point to a network fault or to a stalled node that runs a CoreDNS replica. These queries were not run when this subsection was written (2026-11-04); they use the metrics the incidents below were read from. To see where the CoreDNS replicas run: kubectl --context <context> -n kube-system get pods -l k8s-app=kube-dns -o wide (the operator agent ran it for the 2026-11-22 incident).
One node's volumes and network stall. Its pods also time out to the API server (context deadline exceeded on their lease or watch calls), calls into the node time out, such as an admission webhook on it, and even its node-exporter scrape takes seconds (scrape_duration_seconds). The node stays Ready. It is not a hung device: every attached volume of the node completes its writes again within the minute, and nothing on other nodes stays stuck. Treat it like a network fault: wait, with no reboot and no force-delete, then verify as in step 3 below. Hetzner volumes and pod traffic share the node's path to Hetzner's network, so a stall in that path, or in the VM itself, stops both; the cluster's record does not tell the two apart. A repeat on the same node points at its host: raise it for a person with the times.
For a Hetzner network fault:
- Check status.hetzner.com for nbg1, network and volumes. Hetzner may publish an incident only after it has ended: the 2026-11-04 fault (15:03–15:10) was published at 15:57.
- Wait. Do not force-delete pods, detach volumes or reboot nodes.
- Verify afterwards, as in step 5 of what a person does:
node_procs_blockedback to 0 on every node, the probes succeeding, andflux --context <context> get kustomizations -A --status-selector ready=falseshowing nothing. If one device still has requests in flight after the rest have recovered, continue with this section for that device.
If Prometheus's own volume (prometheus-pv, on worker-2 of hetzner-mgmt) is among the stalled ones, Prometheus records nothing and fires no alert during the fault. Read its data afterwards as Read a scrape gap describes: a range query hides the gap, rate(...[5m]) then reads as CPU climbing towards 100 % on every node, and count(up) drops only 5 minutes after the gap began.
Worked example: the 2026-11-04 Hetzner router fault (#2506). From 15:02 to 15:12 UTC every attached volume on worker-2 (sdb–sdg) and worker-3 (sdb, sdd, sdh) had requests in flight while sda stayed idle, node_procs_blocked was 7 and 6, every blackbox probe failed with a 5 s DNS lookup, and cluster DNS (10.96.0.10) timed out because both CoreDNS replicas ran on worker-3. Prometheus has no samples from 15:03:26 to 15:12:26. Everything recovered on its own when Hetzner fixed the router.
Worked example for one node's volumes and network: the 2026-11-22 worker-2 stall (#3589). From about 01:21:45 to 01:22:45 UTC worker-2's sdb and sde (Gitea's database and shared storage) had requests in flight with writes taking 0.16–3.2 s, while its sda and every other node's volumes were idle: the "one hung device" column. Yet every blackbox probe's DNS lookup hit 5 s, the "network fault" column, because one of the two CoreDNS replicas runs on worker-2. worker-2's cilium-operator timed out to the API server, and the API server's call to the MetalLB webhook on worker-2 timed out. Hetzner's status page listed no incident. Everything recovered on its own within a minute.
Symptoms¶
- The pod stays
RunningwithrestartCount0, while kubelet logsContainer <name> failed liveness probe, will be restartedagain and again. kubectl execfails withfailed to open /proc/<pid>/ns/ipc: No such file or directory: the container's init process is gone, but the runtime still holds the container.- A graceful delete leaves the pod
Terminatingwell past its grace period, with the eventStopping container <name>. - A replacement pod waits in
InitwithMountVolume.SetUp failed for volume "<pv>": rpc error: code = DeadlineExceeded, and the hcloud CSI node plugin on that node logspublishing volumefor the volume without a result. - Other pods on the node, including ones on other volumes, are fine, and the node is
Ready.
Read-only checks¶
Map the PV to a node and a device. These commands were not run when this section was written (2026-11-03); the incident runs used the same objects.
# The pod's PV, its Hetzner volume id, and the node it is attached to
kubectl --context <context> -n <namespace> get pvc <pvc> -o jsonpath='{.spec.volumeName}{"\n"}'
kubectl --context <context> get pv <pv> -o jsonpath='{.spec.csi.volumeHandle}{"\n"}'
kubectl --context <context> get volumeattachment -o custom-columns=PV:.spec.source.persistentVolumeName,NODE:.spec.nodeName,ATTACHED:.status.attached | grep <pv>
# The node's volumes, and its IP for the Prometheus queries below
kubectl --context <context> get node <node> -o jsonpath='{.status.volumesAttached}{"\n"}'
kubectl --context <context> get node <node> -o wide
# The CSI node plugin on that node: "publishing volume" for the volume id, with no result after it
kubectl --context <context> -n kube-system get pods -o wide --field-selector spec.nodeName=<node> | grep csi
kubectl --context <context> -n kube-system logs <hcloud-csi-node pod> --all-containers --since=1h | grep <volume id>
Then in Prometheus (through the Service proxy, on the same <context>). Reading the data after the fact, mind a gap in it: see Read a scrape gap. node-exporter's node_disk_info carries the Hetzner volume id as serial, which gives the device:
| Query | A hung device shows |
|---|---|
node_disk_info{instance="<node-ip>:9100",serial="<volume id>"} |
the device label, for example sdd |
node_disk_io_now{instance="<node-ip>:9100",device="<sdX>"} |
above 0 for minutes: requests in flight that never finish |
rate(node_disk_reads_completed_total{instance="<node-ip>:9100",device="<sdX>"}[2m]) + rate(node_disk_writes_completed_total{instance="<node-ip>:9100",device="<sdX>"}[2m]) |
0, where it was above 0 before |
rate(node_disk_io_time_seconds_total{instance="<node-ip>:9100",device="<sdX>"}[5m]) |
about 1: the device is busy all the time |
node_procs_blocked{instance="<node-ip>:9100"} |
above 0: processes in uninterruptible I/O |
On 2026-11-03 worker-2's sdd (serial="104432273", openbao-data-pv) showed 1–2 requests in flight, 0 completed ops/s (2.4–13.4 before), busy 1.0 and 4 blocked processes. The first three on the pod's device, while the node's other devices still complete I/O, mean the device is hung; node_procs_blocked covers the whole node and backs that up. If devices on other nodes stall at the same time, it is a Hetzner network fault instead. If the device completes I/O, this is not the failure: go back to the alert's runbook.
What the agent may do¶
- Force-delete the pod's API object,
kubectl --context <context> -n <namespace> delete pod <pod> --grace-period=0 --force, only when both hold: - the container's processes are gone:
kubectl --context <context> execfails with thesetnserror above; - nothing answers on the pod's IP and port (from another pod, for example
curl -m 5 http://<pod-ip>:<port>/).
Then no second writer is possible, and the controller can create the replacement. This only removes the API object: it does not fix the mount, and the replacement waits in Init until the device answers again. Log the command and the two checks in the run report.
- Never delete the PVC or PV, and never detach the volume (no VolumeAttachment delete, no detach at Hetzner). The volume holds the only copy of the data written since the last backup.
- Hand over to a person (rule 7 of the rules of engagement) with the PV, volume id, node, device, the Prometheus values, and every command run.
What a person does¶
Taskbase task #2370 is the worked example, for OpenBao on worker-2; its steps are the template. In order:
- Check whether the device has recovered on its own: the replacement pod is
Runningand Ready. If so, keep the evidence (step 2) and verify. -
Keep the evidence before any reboot. Talos keeps these logs in memory, so a reboot loses them:
-
Check the Hetzner side: status.hetzner.com (Volumes, nbg1), and the volume and the server in the Cloud console. If Hetzner reports a volume incident, waiting for it to end may be enough.
-
Reboot the node if the device does not recover. Never for a Hetzner network fault: wait for Hetzner instead. First weigh what else runs on it, above all single-instance databases: on 2026-11-03 worker-2 also ran
keycloak-db-1andtasks-prod-db-1, so a reboot took Keycloak logins and Taskbase down for a few minutes.kubectl --context <context> get pods -A -o wide --field-selector spec.nodeName=<node>lists them. -
Verify that the pod is Ready on the volume, its alert has resolved, and
flux --context <context> get kustomizations -A --status-selector ready=falseshows nothing. Attach the evidence files to the incident task.
The talosctl commands come from #2370 and were not run when this section was written.
Roll back¶
None: the agent changes no configuration here.
Worker stalled: a StatefulSet pod waits for its volume to detach¶
Not an upgrade failure. A worker stops reporting for a few minutes without a reboot, the taint manager evicts its pods, and a StatefulSet pod on a Hetzner volume is recreated on another node, where it waits for the volume to detach from the old one. The right action is to wait for the attach: the service comes back on its own a few minutes after the node does. It happened to Gitea's database on 2026-11-04 (incident report, task #2490):
- worker-3 ran short of memory under a CI job and stopped reporting from about 17:16:30 to 17:22:54 UTC, with no OOM kill and no reboot. Its pods went
NodeNotReady. - After the pods' 300 s
not-readytoleration ran out, the taint manager marked them for deletion (TaintManagerEviction … Marking for deletion). The kubelet came back in that window and stoppedgitea-postgresql-0anyway, so the pod was gone when the eviction was "cancelled". - The StatefulSet created a new
gitea-postgresql-0on worker-1. It waited onFailedAttachVolume … Volume is already exclusively attached to one node, waiting on detachfrom 17:22:58 to 17:29:32, about 6.5 minutes after worker-3 was back. Gitea was down 17:17–17:30 and recovered with no intervention.
You arrive through the service: ProbeFailed or KubePodNotReady for it. The eviction does not raise PodEvicted: that alert reports the kubelet's evictions for node pressure, which leave a Failed pod behind, while the taint manager deletes the pod.
Symptoms¶
- A node was
NotReadyfor more than 5 minutes and isReadyagain, or is about to be. - Events
TaintManagerEvictionfor pods on that node,Marking for deletion, and later a cancellation of that deletion for the pods still there. - A new pod of a StatefulSet is
PendingorContainerCreatingon another node withFailedAttachVolume … Volume is already exclusively attached to one node, waiting on detach. - The pod's PV is an
hcloud-volumesvolume (ReadWriteOnce, likegitea-database-pvincomponents/gitea/base/persistent-volumes.yaml).
Read-only checks¶
These commands follow what the operator agent ran for #2490; they were not run against a cluster when this section was written (2026-11-04). Take <node> from the old pod's events and <namespace>, <pod>, <pv> from the waiting pod.
# The node's conditions and when each last changed: Ready again, and since when
kubectl --context <context> get node <node> \
-o jsonpath='{range .status.conditions[*]}{.type} {.status} {.lastTransitionTime} {.reason}{"\n"}{end}'
kubectl --context <context> get node <node> -o wide # its InternalIP, for the Prometheus queries below
# The evictions on that node, and the waiting pod's events, oldest first
kubectl --context <context> get events -A --field-selector reason=TaintManagerEviction --sort-by=.lastTimestamp
kubectl --context <context> get events -A --field-selector reason=FailedAttachVolume --sort-by=.lastTimestamp
kubectl --context <context> -n <namespace> get events --field-selector involvedObject.name=<pod> --sort-by=.lastTimestamp
# The toleration that set the 300 s, and where the new pod runs
kubectl --context <context> -n <namespace> get pod <pod> \
-o jsonpath='{range .spec.tolerations[*]}{.key} {.effect} {.tolerationSeconds}{"\n"}{end}'
kubectl --context <context> -n <namespace> get pod <pod> -o wide
# Which node the volume is attached to now; it moves to the new node when the attach completes
kubectl --context <context> get volumeattachment \
-o custom-columns=PV:.spec.source.persistentVolumeName,NODE:.spec.nodeName,ATTACHED:.status.attached \
| grep <pv>
Then in Prometheus (through the Service proxy, on the same <context>), over the hour before the event:
| Query | A stalled node shows |
|---|---|
up{job="node-exporter",instance="<node-ip>:9100"} |
0, or no samples, for the minutes the node did not report |
node_memory_MemAvailable_bytes{instance="<node-ip>:9100"} |
falling before the gap; on 2026-11-04 from 2.7 GiB to 1.0 GiB in two minutes |
node_vmstat_oom_kill{instance="<node-ip>:9100"} |
unchanged: no OOM kill |
node_boot_time_seconds{instance="<node-ip>:9100"} |
unchanged: no reboot |
kube_node_status_condition{node="<node>",condition="Ready",status="true"} |
0 for the stall |
It is this failure when the old node is Ready again and the new pod's only problem is FailedAttachVolume … waiting on detach. If the old node stays NotReady, or comes back and the volume still does not complete I/O there, go to Pod stuck on a volume that stopped completing I/O.
If the node never went NotReady, and its pods ended with exit 137 Error and SandboxChanged within a few seconds instead of being evicted, it is not a stall: go to Pods SIGKILLed with their sandbox, no kernel OOM.
What the agent may do¶
- Wait for the attach. Watch the waiting pod until it is Running and Ready, then check that the service's alert has resolved and that
flux --context <context> get kustomizations -A --status-selector ready=falseshows nothing, or only shortDependencyNotReadyentries that clear (as on 2026-11-04). Record the times from the events in the run report. - Never delete the
VolumeAttachment, never detach the volume at Hetzner, and never delete the PVC or PV, the same rule as for a volume that stopped completing I/O. The volume holds the only copy of the data written since the last backup, and the attach completes on its own. - Then find why the node stalled, and treat that as its own fix with its own task. On 2026-11-04 it was the act runner's
dindmemory request being far below what it may use (#2498). The node's kernel and kubelet logs come from Talos, which the agent cannot read. - If the attach has not completed long after the old node is
Ready, hand over to a person (rule 7 of the rules of engagement) with the node's conditions, the events, theVolumeAttachmentand every command run.
Roll back¶
None: nothing changed in Git or in the cluster.
Open questions¶
- Why the detach took about 6.5 minutes after worker-3 was
Readyagain (17:22:54 to 17:29:32), and how long it can take. The record does not show which component held it; Kubernetes' attach-detach controller and the hcloud CSI controller logs were not read for #2490. So this section gives no time after which to stop waiting.
Pods SIGKILLed with their sandbox, no kernel OOM¶
Not an upgrade failure. Several pods on one node are killed within a few seconds, each with its whole pod sandbox, while the node stays Ready. The kubelet recreates them, and they come back on their own within a few minutes. The agent changes nothing on the node: it records the signature and the candidate cause, and checks that everything came back.
The candidate cause is Talos's userspace OOM controller, which kills the pod cgroup it ranks highest when the node runs short of memory (hetzner-mgmt: Talos's OOM controller). It is not confirmed: no one has read a node's OOM action log yet (#2546), and a restart of the cri service (containerd) is not ruled out by the cluster's record. Treat it as a candidate to check, not as the cause.
The worked example is worker-2 on 2026-11-04 (task #2540, incident report): an agent run grew to 3.3 GiB, and seven other pods were killed between 18:42:48 and 18:42:53 UTC, Prometheus, Grafana, tasks-prod-db-1, Gitea, cilium-kb9dd, the hcloud CSI controller and keycloak-db-1, nearly in the order of the controller's default ranking. worker-1 on 2026-10-28 had the same signature (report, #2048).
You arrive through the effects: ProbeFailed for Gitea or another service, a CNPG cluster restarting, a gap in Prometheus, or Flux Kustomizations not Ready for a few minutes. No alert names the kills.
Symptoms¶
- Several pods on one node end with exit code 137 and reason
Error, notOOMKilled, within a few seconds of each other. - Each of them gets a new sandbox: a
SandboxChangedevent and a newPodReadyToStartContainerstime. Events expire after an hour; the condition time stays. - The node stays
Ready. It does not stop reporting, and there is noTaintManagerEviction; that is Worker stalled. - Only some pods on the node are hit, the largest ones without a pod-level memory limit. On worker-2, 7 of 29 running pods; the agent run that used the memory was not touched.
node_vmstat_oom_killandnode_boot_time_secondsof the node do not change.
Read-only checks¶
These commands follow what the operator agent ran for #2540; they were not run against a cluster when this section was written (2026-11-04). The jq filters were checked against sample pod JSON on 2026-11-04. Take <node> from the killed pods.
# Kill times: every container's last termination on the node, oldest first.
# The signature is exit=137 reason=Error for several pods within seconds.
kubectl --context <context> get pods -A --field-selector spec.nodeName=<node> -o json \
| jq -r '.items[] | .metadata.namespace as $ns | .metadata.name as $pod
| .status.containerStatuses[]? | select(.lastState.terminated)
| "\(.lastState.terminated.finishedAt) \($ns)/\($pod) \(.name) exit=\(.lastState.terminated.exitCode) reason=\(.lastState.terminated.reason)"' \
| sort
# New sandboxes: each pod's PodReadyToStartContainers time. Killed pods show a time just after
# their kill; the pods that were spared keep an older one.
kubectl --context <context> get pods -A --field-selector spec.nodeName=<node> -o json \
| jq -r '.items[] | "\([.status.conditions[]? | select(.type == "PodReadyToStartContainers") | .lastTransitionTime][0] // "-") \(.metadata.namespace)/\(.metadata.name)"' \
| sort
kubectl --context <context> get events -A --field-selector reason=SandboxChanged
# QoS class and whether the pod has a pod-level memory.max: the kubelet sets one only when every
# container AND init container has a memory limit. factor is the pod's weight in Talos's default
# ranking (below): 0 for a pod with memory.max or a Guaranteed pod.
kubectl --context <context> get pods -A --field-selector spec.nodeName=<node> -o json \
| jq -r '.items[]
| ([.spec.containers[], (.spec.initContainers // [])[]] | all(.resources.limits.memory? != null)) as $max
| {"BestEffort": 1, "Burstable": 0.5, "Guaranteed": 0}[.status.qosClass] as $w
| "\(.metadata.namespace)/\(.metadata.name) qos=\(.status.qosClass) pod-memory.max=\($max) factor=\(if $max then 0 else $w end)"'
kubectl --context <context> get node <node> -o wide # its InternalIP, for the Prometheus queries below
Then in Prometheus (through the Service proxy, on the same <context>), over the 30 minutes before the first kill. Prometheus may be one of the pods killed, so expect a gap of a few minutes; read the last sample before it.
| Query | This failure shows |
|---|---|
node_memory_MemAvailable_bytes{instance="<node-ip>:9100"} |
falling just before the kills; on worker-2 from 3.6 GiB to 0.87 GiB |
node_vmstat_oom_kill{instance="<node-ip>:9100"} |
unchanged: no kernel OOM kill |
node_boot_time_seconds{instance="<node-ip>:9100"} |
unchanged: no reboot |
process_start_time_seconds{job="kubelet"} |
unchanged for the node's kubelet: no kubelet restart |
max by (namespace, pod) (container_memory_usage_bytes{container="", pod!=""}) / 2^20 and on (namespace, pod) kube_pod_info{node="<node>"} |
each pod cgroup's memory.current in MiB, the value the controller ranks by; one pod, often an agent or act runner, has grown by gigabytes |
Rank the candidates. Talos's default ranking (Talos v1.13.2, the version the nodes run) scores each pod cgroup as:
memory_max.hasValue() ? 0.0 :
{Besteffort: 1.0, Burstable: 0.5, Guaranteed: 0.0, Podruntime: 0.0, System: 0.0}[class] *
double(memory_current.orValue(0u))
For each pod, multiply its factor from the third jq filter by its MiB from the last Prometheus query, at the last sample before the first kill. Sort by score, highest first, and compare with the kill times. A kill order that follows the scores, with pods that score 0 spared however large they are, fits the OOM controller. Scores within a few points of each other may swap, as Gitea and tasks-prod-db-1 did on 2026-11-04.
The default applies while #2549 is open. Once #2549 has applied oom-config.yaml to the node, rank by that expression instead: every pod by its size, limited or not, so the pod that grew should be the first one killed.
Tell it from the look-alikes:
- Reason
OOMKilledand a risingnode_vmstat_oom_kill: the kernel killed a container at its limit. That is ContainerOOMKilled, not this. - The node was
NotReadyand its pods were evicted: Worker stalled. - Every pod on the node lost its sandbox at once, regardless of size: a
crirestart is more likely than the OOM controller. Only the node's logs settle it (below).
Confirming the cause: a person's step¶
The agent has no Talos access, so it cannot confirm the cause. A person with the hetzner-mgmt talosconfig reads the node's own record, as in #2546. Talos keeps the last 50 OOM actions in memory only, so a reboot loses them: ask for this soon. From terraform/environments/hetzner-mgmt-cluster/1-bootstrap:
T="talosctl --talosconfig ./talosconfig --endpoints 78.47.74.196"
# Each action names the cgroup it killed (kubepods/<class>/pod<uid>), its score and the trigger context.
$T -n <node-ip> get oomactions -o yaml
# The controller logs to the controller-runtime service log, not machined (Talos v1.13.2).
$T -n <node-ip> logs controller-runtime | grep -E 'OOM controller triggered|Sending SIGKILL to cgroup|victim processes'
# Rule a cri (containerd) restart in or out: its events show each start, with its time.
$T -n <node-ip> service cri
The commands come from #2546 and the OOM controller page; they were not run when this section was written. One oomactions entry per killed pod, at the kill times, confirms the controller. A cri start at the kill time, and no entries, point at a cri restart instead.
What the agent may do¶
- Nothing on the node. No
talosctl, no reboot, no change to the node's configuration. The agent has no Talos access, and the TalosOOMConfigis applied by the owner (#2549). - Let the normal restart run. Check that each killed pod is Running and Ready again, that the services' alerts have resolved, and that
flux --context <context> get kustomizations -A --status-selector ready=falseandflux --context <context> get helmreleases -A --status-selector ready=falseshow nothing, or only shortDependencyNotReadyentries that clear. - A CNPG or StatefulSet pod that does not come back follows the existing sections: Pod stuck on a volume that stopped completing I/O for a mount that times out, Worker stalled for a volume waiting to detach, and the CNPG alert runbooks for a cluster that stays unhealthy.
- Record in the run report: the kill times, the sandbox times, the memory and the ranking you computed, the pod that grew, and every command run. Ask a person for the node's logs as above, linking #2546 when it is still open, and write an incident report that gives the cause as a candidate until those logs confirm it.
Roll back¶
None: the agent changes no configuration here.
Open questions¶
- Whether the OOM controller caused the 2026-11-04 kills, or a
crirestart did. #2546 reads the node's logs; until then this section gives the controller as a candidate only. - Why worker-1's kills on 2026-10-28 came with 4.4 GB available, if they were the controller's (#2048).
Cluster down: what the Mac mini operator does¶
This runbook assumes a working Kubernetes API, a working pod network and Flux, and a Taskbase that queues the incident. A core upgrade (Cilium, Flux, MetalLB or hcloud-csi) can break one of these. Talos and Kubernetes upgrades are not the agent's: they stay manual, done by the owner, and are never routed to operator. The operational agent ops-agent runs outside the cluster, in the Lima VM k3s on the Mac mini, so it still works when that happens (ADR 0020):
- The watchdog probes, as a CronJob every minute next to the agent. It probes the kube API with a break-glass client certificate, not Keycloak. It also probes Taskbase and Gitea, and it reads Flux's
Readystate. It starts a local DR session Job, which needs no Taskbase, when either of these holds: - the API or Taskbase has been down for 5 minutes;
- a Flux root has been not Ready for 60 minutes.
- The session works the DR runbook. It opens a
drissue on the GitHub mirrorDunkRing/bootstrap-cluster, because Mattermost may be down. Then it works Disaster recovery from the Mac mini: the network add-ons, Flux itself, Git when Gitea is down, and Taskbase. A failure below Kubernetes (the API does not answer, nodes, Talos, the Hetzner network or firewall, volumes at Hetzner) it does not repair: it records the evidence in thedrissue and hands over to the owner. - The rules of engagement above still apply, with stricter ones on top:
- it deletes no volume, bucket or backup;
- it has no Terraform, Hetzner or Talos access (owner rule), and its only break-glass access is the admin kubeconfig the owner generates and renews;
- it does no Kubernetes minor downgrade;
- it rolls back to the last good Git revision first.
- When Taskbase is back, the run report becomes an incident task, and a normal
role=opsrun writes the incident report.
Pre-flight for CRD-bringing operators¶
Run this before merging an upgrade of any operator that brings CRDs, on top of the upgrade playbook. It catches every 2026-10-20 failure mode before Flux sees it.
| Operator | Where its CRDs come from in this repository | Helm CRD policy here |
|---|---|---|
| external-secrets | chart templates/crds/ (installCRDs: true): upgraded and rolled back with the release |
n/a (templated) |
| cert-manager | chart templates (crds.enabled: true, crds.keep: false) |
install/upgrade.crds: CreateReplace |
| cloudnative-pg | chart; check templated or crds/ with the command below |
not set (Flux default Create) |
| kube-prometheus-stack (prometheus-operator) | crds subchart, charts/crds/crds/ (a crds/ directory, none templated): upgraded with the release, not rolled back |
install/upgrade.crds: CreateReplace |
| metallb | chart; check as below | not set (Flux default Create) |
| cilium | not the chart (it has no CRDs): cilium-operator registers them at startup from YAML embedded in its binary, see the Cilium notes in steps 2 and 4 |
CreateReplace is set in cilium-config, but has no effect |
| flux | flux2 chart in components/flux/ |
CreateReplace |
| Gateway API | vendored manifests in components/gateway-system/crds/ (applied by kustomize-controller) |
n/a |
Flux applies CRDs from a chart's crds/ directory according to spec.install.crds and spec.upgrade.crds. Both default to Create, which creates missing CRDs but never updates existing ones (helm-controller HelmRelease spec, "Controlling the lifecycle of Custom Resource Definitions"). A chart that keeps its CRDs in crds/, with no policy set, therefore leaves the old CRDs in place on upgrade. Templated CRDs are always upgraded and rolled back with the release.
- Read the upstream upgrade notes of every release between
fromandto(playbook step 1). Look for: versions removed or no longer served, a change of storage version, a change of conversion strategy, and "upgrade to X first". - Find where the CRDs live in the target chart. Where
helmis installed:helm show crds <repo>/<chart> --version <to>listscrds/, andhelm template ... | grep -c 'kind: CustomResourceDefinition'counts all CRDs. Templated CRDs are the second count minus the first. The manifest CI renders both into<cluster>/crds/<kustomization>.yaml.
Cilium: the chart has no crds/ and no templated CRDs (helm pull cilium/cilium for 1.18.4, 1.18.16, 1.19.10 and 1.20.2, read 2026-10-25), so the manifest CI renders none. cilium-operator registers the CRDs of the enabled features (13 on hetzner-mgmt) at startup from pkg/k8s/apis/cilium.io/client/crds/<version>/<plural>.yaml in cilium/cilium at the release tag. It updates a live CRD only when the CRD's io.cilium.k8s.crd.schema.version label is older than its own (CustomResourceDefinitionSchemaVersion in pkg/k8s/apis/cilium.io/register.go: 1.31.11 in 1.18.4, 1.31.12 in 1.18.16, 1.32.7 in 1.19.10; the check is needsUpdateV1 in pkg/k8s/apis/crdhelpers/register.go). List the live CRDs and fetch the target files:
kubectl --context <context> get crd -l io.cilium.k8s.crd.schema.version -L io.cilium.k8s.crd.schema.version
TAG=v1.18.16 # the target release tag
mkdir -p /tmp/cilium-crds && cd /tmp/cilium-crds
for name in $(kubectl --context <context> get crd -l io.cilium.k8s.crd.schema.version -o name); do
plural=${name#*/}; plural=${plural%%.*}
for v in v2 v2alpha1; do
curl -fsSL -o "$plural.yaml" \
"https://raw.githubusercontent.com/cilium/cilium/$TAG/pkg/k8s/apis/cilium.io/client/crds/$v/$plural.yaml" 2>/dev/null && break
done
done
Steps 3 and 4 use these files as the target. A Helm rollback does not touch Cilium's CRDs, and the old operator does not downgrade a CRD whose label is newer, so for Cilium the rollback check in step 3 is only about storage versions.
3. Compare live and target versions. Run the storedVersions read-only check above against the live cluster, and read the target's spec.versions and spec.conversion from the render:
- Every version in live storedVersions must be in the target's spec.versions; otherwise the upgrade is rejected. Migrate first.
- Every version the manifests in Git use must be served by the target. grep -rn '<group>/<version>' components cluster.
- Rollback check: if the target's storage version is not in the old chart's spec.versions, Helm's automatic rollback will fail once the upgrade starts. Write "rollback = roll forward only" into the upgrade evidence. If a real rollback is needed, split the upgrade so that a middle version serves both.
- If the conversion strategy changes (Webhook ↔ None), plan for the webhook trap. Moving to None is safe only when the served versions share one schema.
4. Dry-run the CRDs against the live cluster (operator agent, or a person with access):
kubectl --context <context> apply --server-side --dry-run=server --force-conflicts --field-manager=preflight \
-f /tmp/render/head/hetzner-mgmt/crds/<kustomization>.yaml
For Cilium, dry-run the files from step 2 instead: -f /tmp/cilium-crds/.
This runs the API server's CRD validation, including the storedVersions and webhookClientConfig rules, without changing anything. It catches the storedVersions rejection and the webhookClientConfig rule before the merge, not after it.
5. Check conditions before and after: NamesAccepted=True and Established=True on every CRD of the group (the NamesAccepted check above).
6. Record it all in the pull request's Upgrade evidence comment: the version table (served, storage, conversion) for from and to, the live storedVersions, the dry-run result, and which way rollback goes.
Land a demo release bump¶
Who: the operator persona lands every demo release bump (owner, 2026-11-11, #2835). Each release of eloro/webshop-platform makes release.yaml there open a chore(demo) pull request on the branch chore/demo-image-tag that raises image.tag in deploy/demo/helmrelease.yaml. Merging it rolls the new image out on the demo shop shop-demo on webshop and starts staging-gate.yaml, which on green publishes the charts webshop and webshop-admin and @eloro/webshop-sdk of that tag for all shops (design 06 §4.5 there). No reviewer merges these pull requests; the operator does, after the steps below. The details of the gate and the demo shop are in that repository's deploy/demo/README.md.
- Is the range migration-bearing? Compare the demo's running tag (
image.tagonmain) with the new one. A range isstatefulwhen a release in it adds or changes a file ininternal/db/migrationsthat is risky by design 06 §6.6 (DROP, a table rewrite, a data change the old version cannot recreate), when it raises River (github.com/riverqueue/riveringo.mod, which brings its own migrations), or whenchart/webshop/Chart.yamlcarries the annotationwebshop.skatzi.com/backup-gate: required:Equal lists, the same River version and no annotation: leaveR=$GITEA_URL/api/v1/repos/eloro/webshop-platform; H="Authorization: token $GITEA_TOKEN" for ref in <old> <new>; do curl -s -H "$H" "$R/contents/internal/db/migrations?ref=$ref" | jq -r '.[] | .name + " " + .sha' | md5sum curl -s -H "$H" "$R/raw/go.mod?ref=$ref" | grep riverqueue/river done curl -s -H "$H" "$R/raw/chart/webshop/Chart.yaml?ref=<new>" | grep -A3 annotationsshop-demo-preupgradeas it is (CNPG: the demo shop's gate). When the lists differ, read each added or changed migration file against design 06 §6.6: when every one is expand-only, the range staysstandardand the gate stays as it is too. A risky migration, a River raise or the annotation makes the rangestateful: pair the bump with a pull request here that movestarget_versionto the new tag, and merge the bump only afterpreupgrade-demoshows that tag with alastSuccessafter that merge, as that section says. - Will the post-upgrade seed pass? The chart's
seedhook (shop seed --profile ci) fails when a release adds a ci fixture whose id a live row already holds. Since v1.137.13 (#2818) fixtures keep ids 1–9999 and the shop's own rows start at 10000, so this applies only to a range that starts below v1.137.13. If it does, see Helm hook Job that fails on data in the cluster. - Merge the pull request once its CI is green, through the Gitea API (
POST .../pulls/<n>/merge,"Do": "merge"). Note the time and the merge commit. - Watch the rollout on
webshop, with--context webshopon every command. The Kustomizationshop-demoapplies the new revision once its dependencies are Ready; a platform revision rolling throughprometheus-stackandflaggerat the same time only delays it.Then check the synthetic checkout through the Prometheus Service proxy (Read Alertmanager and Prometheus on a cluster): the newflux --context webshop get kustomizations shop-demo flux --context webshop get helmreleases -n shop-demo # Helm upgrade succeeded ... with chart webshop@0.1.0+<merge commit> helm --kube-context webshop -n shop-demo history shop --max 3 # the newest revision deployed kubectl --context webshop -n shop-demo get canaries # web and frontend: Progressing, then Succeededworkerpod'sshop_synthetic_checkout_successis0, with…_checks_total0, until its first check (up to 5 minutes), then1, with…_consecutive_failuresat0. A new worker that reports0after its first check is a failure: workShopSyntheticCheckoutFailingby its runbook. - Watch the staging gate (
staging-gate.yaml, the push run on the merge commit) to its end, about an hour: the rollout step, the journeys, a 30-minute soak without ashop-demoalert, then the jobschartandsdk. Green: check that the charts and the SDK of the tag are published (thechartandsdkjob logs). Red: nothing is published, and the gate raises its own Taskbase task naming the failed journeys. Stop there and report; do not rerun the gate or publish by hand until the cause is known. A gate that ran out of time while the rollout was still going on (#2815) can be rerun byworkflow_dispatchonmainonce the rollout has finished. - Record in the task: the range checked in step 1 and its result, the merge time, the Helm revision, the canaries, the synthetic checkout value, and the gate run with its result. A bump that lands cleanly needs no incident report; one that needed recovery writes does.