Kubernetes · Arazzo Workflow
Kubernetes Quarantine a Failing Pod for Inspection
Version 1.0.0
Relabel a misbehaving pod out of its service and ReplicaSet, then capture its logs while it stays alive.
View Spec
View on GitHub
AutomationCloud NativeCNCFContainersDeploymentOpen SourceOrchestrationScalingArazzoWorkflows
Provider
Workflows
quarantine-pod
Relabel a pod out of its controller's selector so it survives for debugging.
Reads the failing pod and its spec, replaces it with labels that no longer match the controller selector, lists the app's pods to confirm a replacement was scheduled, and reads the quarantined pod's log for diagnosis.
1
readFailingPod
getNamespacedPod
Read the pod to capture its node, phase, and resourceVersion before the relabel, and to record the labels that currently bind it to its owner.
2
applyQuarantineLabels
replaceNamespacedPod
Replace the pod with labels that no longer match the controller's selector. The ReplicaSet treats the pod as gone and creates a replacement, while this pod keeps running for inspection. The node assignment is preserved so the pod is not rescheduled.
3
confirmReplacement
listNamespacedPods
List the pods still matching the app selector to confirm the controller scheduled a healthy replacement for the pod that was labelled away.
4
captureQuarantineLog
readNamespacedPodLog
Read the quarantined pod's log now that it is out of rotation and no longer under time pressure from the controller.