ssh_kubectl_recover
Run one allowlisted STATE-CHANGING kubectl command inside an Ankra-provisioned cluster (Hetzner, OVH, UpCloud, DigitalOcean or Scaleway) from a control-plane node over SSH-via-bastion, for recovering a cluster whose in-cluster ankra-agent is offline and which therefore cannot be reached any other way. Verbs, and when each is the right one: rollout_restart (the agent Deployment exists and looks healthy to its ReplicaSet but never checks in - the usual fix); rollout_undo (the agent self-upgraded and the new revision never checked in - roll back to the revision that worked); delete_pod (one named pod is stuck Terminating, or is bound to a node that is gone, so the ReplicaSet will not replace it); cordon and uncordon (stop scheduling onto a sick node, or allow it again). This is an allowlist, not a shell: it cannot exec, apply, patch, scale, drain or delete anything other than exactly one named pod, and it accepts no label selector on the delete path, so a mistaken confirmation costs at most one pod. Call ssh_kubectl_read FIRST to confirm what is actually broken - restarting a rollout that is failing to pull an image just repeats the failure. This changes a production cluster and requires confirmation. Not available for imported or managed-Kubernetes clusters, nor (yet) Proxmox/HPE Morpheus.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Workload type for the rollout verbs: deployments, daemonsets or statefulsets. Must be omitted for delete_pod, which always acts on a pod; optional for cordon and uncordon (always a node). | |
| name | Yes | Required. The workload name for the rollout verbs, the pod name for delete_pod, or the node name for cordon/uncordon. | |
| verb | Yes | Which recovery action to take. rollout_restart rolls the workload's pods; rollout_undo reverts it to its previous revision; delete_pod removes exactly one named pod so its controller recreates it; cordon/uncordon stop or resume scheduling onto a node. | |
| node_id | No | UUID of the control-plane node to run the command on (from list_cluster_nodes). Optional: a healthy control-plane node is chosen automatically. | |
| namespace | No | Namespace of the workload or pod. Not used by cordon/uncordon. | |
| node_name | No | Exact name of the control-plane node to run the command on. Alternative to node_id. | |
| cluster_id | No | UUID of the cluster. Optional when a cluster is selected. | |
| cluster_name | No | Exact name of the cluster. Optional when a cluster is selected. |