Welcome to the Linux Foundation Forum!

Missing semicolon in bash loop in exercise 3.3

Options
styledaniel
styledaniel Posts: 2
edited November 2021 in LFD259 Class Forum

The loop in step 7 in exercise 3.3 will not work as is, one should add ; after the list of items and after the command:

for name in try1-9588f99f-99kr2 try1-9588f99f-c7xzx try1-9588f99f-fxhpl try1-9588f99f-q7ghm try1-9588f99f-qxwqm; \ 
do \
kubectl exec $name -- touch /tmp/healthy; \
done

Same goes for step 12:

for name in $(kubectl get pod -l app=try1 -o name);
do
kubectl exec $name -c simpleapp -- touch /tmp/healthy;
done

Categories

Upcoming Training