diff --git a/recipes/newrelic/infrastructure/kubernetes.yml b/recipes/newrelic/infrastructure/kubernetes.yml index 29a3e73e1..7276dba7e 100644 --- a/recipes/newrelic/infrastructure/kubernetes.yml +++ b/recipes/newrelic/infrastructure/kubernetes.yml @@ -434,8 +434,8 @@ install: $SUDO $KUBECTL apply -f newrelic-k8s.yml fi - # Wait on nrk8s-kubelet pod to be running - POD_NAME="nrk8s-kubelet" + # Check for 'nrk8s-kubelet-node-scraper' pod presence first, otherwise default to former pod name 'nrk8s-kubelet' + POD_NAME=$(test $($SUDO $KUBECTL get pods -o wide -n $NR_CLI_NAMESPACE | grep 'nrk8s-kubelet-node-scraper' | wc -l | sed 's/ //g') -gt 0 && echo 'nrk8s-kubelet-node-scraper' || echo 'nrk8s-kubelet') echo "Running ${POD_NAME} status check attempt..." MAX_RETRIES=150