Runbook
Management cluster lost
Symptoms
Section titled “Symptoms”- pk-metal status
- Exit status 1. The management cluster does not answer.
- The Talos nodes of the management cluster
- They answer, but etcd does not run or has no quorum.
- Alert
PkMetalMetricsAbsent: Prometheus did not scrape the manager for 10 minutes. No other pk-metal alert can fire then.
Diagnose
Section titled “Diagnose”PkMetalMetricsAbsent also fires when only the manager stopped. Find the case before you change anything.
-
Ask the API server of the management cluster.
Terminal window kubectl -n pk-metal get pods,endpoints -
Read the result.
Result Case What to do The API server does not answer You lost the management cluster Continue with Fix. The manager pod is not RunningThe manager stopped Read its log: kubectl -n pk-metal logs deploy/pk-metal-manager --previous.The pod runs, the Service has no endpoints The pod is not ready kubectl -n pk-metal describe pod -l app.kubernetes.io/component=manager.The pod runs and has endpoints Prometheus cannot scrape it Check the ServiceMonitor and the metrics reader role. See Monitor the fleet.
Impact
Section titled “Impact”The operator, its records and its view of the machines are gone. The workload clusters continue to run. Only the snapshots in the S3 bucket hold the old state.
Before you start
Section titled “Before you start”- You have the objects in git: the secrets bundle Secret, the TalosCluster, the TalosNodes, the Assets.
- You have the talosconfig of the management cluster from your records.
- You have an age identity for the snapshots.
-
Start kind on a workstation and install the operator, as for a new site.
-
Add the restore mark to the TalosCluster before you apply it. Then the operator in kind does not bootstrap an empty cluster.
metadata:name: mgmtannotations:os.platform-kit.org/restore-pending: "true" -
Apply the objects from git.
-
Download the newest snapshot from the bucket with your S3 client. Decrypt it.
Terminal window pk-metal backup decrypt --in mgmt.db.age --identity ~/.config/age/keys.txt -o mgmt.db -
On each control plane that still runs etcd, wipe its etcd data.
Terminal window talosctl -n 192.0.2.12 reset --graceful=false --reboot --system-labels-to-wipe=EPHEMERAL -
On one control plane, start etcd from the snapshot.
Terminal window talosctl -n 192.0.2.11 bootstrap --recover-from=./mgmt.db -
Delete the plain snapshot.
Terminal window rm mgmt.db -
When the cluster shows
Bootstrapped=True, remove the mark.Terminal window kubectl annotate taloscluster mgmt os.platform-kit.org/restore-pending- -
Scale the operator in kind to zero.
-
Make sure that the operator in the restored cluster runs.
Verify
Section titled “Verify”pk-metal --kubeconfig mgmt.kubeconfig status shows the fleet as it was at the snapshot time.
Related
Section titled “Related”- Back up etcd: always use an
s3sink for this cluster. - Pivot the operator, Bootstrap refused