Closed sonishi85 closed 5 years ago
set -e
-e Exit immediately if a command exits with a non-zero status.
Your nslookup foo.bar
is a non-zero exit and so set -e
exits before the if
loop runs
ok, my bad. Forgot I had added that switch and have been staring at this for too long. Thanks @wglambert
Sorry for another nslookup question but..I am using bbox 1.28.4 image as a K8s initContainer. Whenever I make a call to nslookup that fails, the container exits before I can check the return code.
The pod ends up in a crash backoff state. The log from the failed init container:
Never executes the next line after nslookup foo.bar. Am I missing something obvious here?