Skip to content

Instantly share code, notes, and snippets.

@dkeightley
Created March 15, 2020 00:42
Show Gist options
  • Save dkeightley/b7fdec9125f7de8785008d04f2130565 to your computer and use it in GitHub Desktop.
Save dkeightley/b7fdec9125f7de8785008d04f2130565 to your computer and use it in GitHub Desktop.
Set Rancher Pod loglevel
LEVEL=info # change to debug, etc.
for rancherpod in `kubectl get pods -n cattle-system -l app=rancher --template '{{range.items}}{{.metadata.name}}{{"\n"}}{{end}}'`
do
echo $rancherpod
kubectl exec -n cattle-system $rancherpod -- loglevel --set $LEVEL
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment