DEV Community

Cover image for Mastering Kubernetes with kubectl wait
Cloud Native Engineer
Cloud Native Engineer

Posted on Originally published at enix.io

Mastering Kubernetes with kubectl wait

Unlock the full power of Kubernetes with the simple yet powerful kubectl wait command!

Key points:

  • ⏰ Waiting for Resource Deletion: Use --for=delete to wait until a resource is deleted
  • ✅ Waiting for a Condition: Use --for=condition to wait for a resource to transition to a specific state
  • 📅 Waiting for a Pod to be Ready: Use --for=condition=Ready to wait for a Pod to be ready
  • đŸšĢ The Case of Services: Services do not have conditions, use polling to check endpoint creation
  • â„šī¸ Scheduling with initContainers: Use initContainers to execute tasks before main containers

Read more at: https://enix.io/en/blog/kubernetes-tips-tricks-kubectl-wait/

Top comments (0)