-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kubectl: add page for
wait
subcommand
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# kubectl wait | ||
|
||
> Waits for a resource 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` |