Skip to content

CICD-150 · Check Pod readiness ​

Encyclopedia · Kubernetes fundamentals · All snippets

Previous · CICD-149 · Next · CICD-151

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites isolated Kubernetes namespace, kubectl and reviewed manifests.
  • Platforms kubernetes, local-lab.

2. Copy the snippet ​

bash
kubectl -n staging wait pod -l app=web --for=condition=Ready --timeout=120s

3. How it works ​

Waiting for Ready observes the selected Pod conditions. A broad label selector can include an old revision, so verify which Pods belong to the candidate.

4. Verify the result ​

Ensure label selects only the intended release if old Pods exist.

Validation syntax-validated (Bash parse). Status definitions.