github.com/Racer159/jackal@v0.32.7-0.20240401174413-0bd2339e4f2e/docs/2-the-jackal-cli/100-cli-commands/jackal_tools_wait-for.md (about) 1 # jackal tools wait-for 2 <!-- Auto-generated by hack/gen-cli-docs.sh --> 3 4 Waits for a given Kubernetes resource to be ready 5 6 ## Synopsis 7 8 By default Jackal will wait for all Kubernetes resources to be ready before completion of a component during a deployment. 9 This command can be used to wait for a Kubernetes resources to exist and be ready that may be created by a Gitops tool or a Kubernetes operator. 10 You can also wait for arbitrary network endpoints using REST or TCP checks. 11 12 13 14 ``` 15 jackal tools wait-for { KIND | PROTOCOL } { NAME | SELECTOR | URI } { CONDITION | HTTP_CODE } [flags] 16 ``` 17 18 ## Examples 19 20 ``` 21 22 # Wait for Kubernetes resources: 23 $ jackal tools wait-for pod my-pod-name ready -n default # wait for pod my-pod-name in namespace default to be ready 24 $ jackal tools wait-for p cool-pod-name ready -n cool # wait for pod (using p alias) cool-pod-name in namespace cool to be ready 25 $ jackal tools wait-for deployment podinfo available -n podinfo # wait for deployment podinfo in namespace podinfo to be available 26 $ jackal tools wait-for pod app=podinfo ready -n podinfo # wait for pod with label app=podinfo in namespace podinfo to be ready 27 $ jackal tools wait-for svc jackal-docker-registry exists -n jackal # wait for service jackal-docker-registry in namespace jackal to exist 28 $ jackal tools wait-for svc jackal-docker-registry -n jackal # same as above, except exists is the default condition 29 $ jackal tools wait-for crd addons.k3s.cattle.io # wait for crd addons.k3s.cattle.io to exist 30 $ jackal tools wait-for sts test-sts '{.status.availableReplicas}'=23 # wait for statefulset test-sts to have 23 available replicas 31 32 # Wait for network endpoints: 33 $ jackal tools wait-for http localhost:8080 200 # wait for a 200 response from http://localhost:8080 34 $ jackal tools wait-for tcp localhost:8080 # wait for a connection to be established on localhost:8080 35 $ jackal tools wait-for https 1.1.1.1 200 # wait for a 200 response from https://1.1.1.1 36 $ jackal tools wait-for http google.com # wait for any 2xx response from http://google.com 37 $ jackal tools wait-for http google.com success # wait for any 2xx response from http://google.com 38 39 ``` 40 41 ## Options 42 43 ``` 44 -h, --help help for wait-for 45 -n, --namespace string Specify the namespace of the resources to wait for. 46 --no-progress Disable fancy UI progress bars, spinners, logos, etc 47 --timeout string Specify the timeout duration for the wait command. (default "5m") 48 ``` 49 50 ## SEE ALSO 51 52 * [jackal tools](jackal_tools.md) - Collection of additional tools to make airgap easier