Skip to content

Instantly share code, notes, and snippets.

@mattmattox
Last active November 1, 2019 20:28
Show Gist options
  • Save mattmattox/297414f19b47ac7a721f85952a9dc63d to your computer and use it in GitHub Desktop.
Save mattmattox/297414f19b47ac7a721f85952a9dc63d to your computer and use it in GitHub Desktop.
Oneliners to enable debug logging on Rancher 2.0
#!/bin/bash
KUBECONFIG=~/.kube/config
for POD in $(kubectl --kubeconfig $KUBECONFIG get pods -n cattle-system -l app=rancher --no-headers | awk '{print $1}');
do
kubectl --kubeconfig $KUBECONFIG exec -n cattle-system $POD -- loglevel --set debug
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment