Troubleshooting OpenShift Flashcards
Display the list of nodes in a cluster
oc get nodes
Displays the current CPU and memory usage of each node
oc adm top nodes
Displays the resources used by a node
oc describe node my-node-name
Show the cluster version
oc get clusterversion
Show elaborated details about the cluster status
oc describe clusterversion
List all cluster operators
oc get clusteroperators
View crio logs on a given node
oc adm node-logs -u crio my-node-name
View kubelet logs on a given node
oc adm node-logs -u kubelet my-node-name
View all journal logs on a given node
oc adm node-logs my-node-name
Login into a node and check if kubelete is running
oc debug node/my-node-name
chroot /host
systemctl is-active kubelet
Login into a node and show low-level information about all local containers running on the node
oc debug node/my-node-name
chroot /host
crictl ps
Display a pod logs
oc logs my-pod-name
Display a container logs
oc logs my-pod-name -c my-container-name
Run a given deployment as root
oc debug deployment/my-deployment-name –as-root
Change a pod log level to shows max amount of information
oc get pods –loglevel 10