Created
April 24, 2020 07:37
-
-
Save bikram20/6b19164a0f5437ee1df3d5ffd8a0bc85 to your computer and use it in GitHub Desktop.
OCP debug commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Excellent site - https://openshift.tips/ | |
# Tail 10 lines for journal log of the node. Various options. | |
oc adm node-log <nodename> --tail=10 | |
oc adm node-logs ip-10-0-137-133.us-west-2.compute.internal --tail=10 -u kubelet.service | |
oc adm node-logs ip-10-0-137-133.us-west-2.compute.internal --tail=10 --grep=calico | |
# Path is w.r.t. /var/log | |
oc adm node-logs ip-10-0-137-133.us-west-2.compute.internal --tail=10 --path=calico/log | |
# To get a shell | |
oc debug node/ip-10-0-137-133.us-west-2.compute.internal | |
# Use chroot /host to run host commands e.g. iptable. | |
# To review kube-proxy, start with kubernetes default service under KUBE-SERVICES in nat table on any node | |
iptables -t nat -L KUBE-SERVICES -nv | |
# To run debug tools e.g. tcpdump | |
oc debug node/ip-10-0-149-62.us-west-2.compute.internal --image=rhel7/rhel-tools | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using calicoctl:
Instead of alias, you can use:
export CALICO_DATASTORE_TYPE=kubernetes; export KUBECONFIG=<pathtokubeconfig>