Using loop to wait for nginx controller to print its status
This commit is contained in:
@@ -88,9 +88,15 @@ main() {
|
||||
# kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml
|
||||
kubectl apply -fhttps://raw.githubusercontent.com/kubernetes/ingress-nginx/12150e318b972a03fb49d827e6cabb8ef62247ef/deploy/static/provider/kind/deploy.yaml
|
||||
sleep 5 # hold 5 sec so that the pods can be created
|
||||
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=420s
|
||||
#kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=420s
|
||||
|
||||
while [[ $(kubectl get pods --namespace ingress-nginx --selector=app.kubernetes.io/component=controller -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]];
|
||||
do
|
||||
echo "waiting for nginx controller pod to be ready" && sleep 1;
|
||||
kubectl get --namespace ingress-nginx pod --selector=app.kubernetes.io/component=controller -o yaml
|
||||
done
|
||||
|
||||
|
||||
|
||||
# This creates the service account, role, and role binding necessary for Spring Cloud k8s apps
|
||||
kubectl apply -f ./permissions.yaml
|
||||
|
||||
Reference in New Issue
Block a user