I need to include kubectl logs -f <pod> in a script, but since it's continuously running in my script it's not executing the next line of the script. Is there a way to exit the printing log once there are no more logs printing in the log file?
kubectl logs -f $POD $KUBECONF
while true;
do
kubectl exec $POD $KUBECONF --test -f /path/to/file