Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kubectl wait: add page #15441

Merged
merged 3 commits into from
Jan 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions pages/common/kubectl-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# kubectl wait

> Wait for resource(s) to reach a certain state.
> More information: <https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait>.

- Wait for a deployment to become available:

`kubectl wait --for=condition=available deployment/{{deployment_name}}`

- Wait for all pods with a certain [l]abel to be ready:

`kubectl wait --for=condition=ready pod -l {{label_key}}={{label_value}}`

- Wait for a pod to be deleted:

`kubectl wait --for=delete pod {{pod_name}}`

- Wait for a job to complete, within 120 seconds (if the condition isn't met on time, the exit status will be unsuccessful):

`kubectl wait --for=condition=complete job/{{job_name}} --timeout 120s`
Loading