Wait on Resource Status for Applied Configuration

    Istio’s mesh configuration is declarative, which means that you define a configuration and Istio propagates the changes through the mesh over time. As a result, your command might attempt to use your service mesh before the relevant resources are ready.

    In Istio 1.6 and later, you can use the command to have more control over the way that Istio applies configuration changes to the mesh. To make this possible, the kubectl wait command monitors the of the resource’s status, which Istio updates as it propagates configuration changes.

    Wait for resource readiness

    You can apply a change and then wait for completion. For example, to wait for a virtual service, use the following commands:

    Zip

    1. $ kubectl apply -f @samples/httpbin/httpbin.yaml@

    When you use the kubectl wait command in a script, the return code will be for success, or a non-zero value for time out.

    For more information about usage and syntax, see the kubectl wait command.