OpenShift Day 2 Operations - Part 3

  • 05 Nov, 2025

Retrieving OpenShift Cluster Logs

Logs are invaluable for understanding the state of your OpenShift cluster and diagnosing problems. OpenShift provides several ways to access these logs efficiently:

Get node logs

Display node journal:

oc adm node-logs <node>

Tail 10 lines from node journal:

oc adm node-logs --tail=10 <node>

Get kubelet journal logs only:

oc adm node-logs -u kubelet.service <node>

Grep kernel word on node journal:

oc adm node-logs --grep=kernel <node>

List /var/log contents:

oc adm node-logs --path=/ <node>

Get /var/log/audit/audit.log from node:

oc adm node-logs --path=audit/audit.log <node>

Pod Logs

Pod logs provide insights into application behavior.

  • Retrieve logs for a specific pod:
oc logs <pod-name> -n <namespace>
  • For pods with multiple containers, specify the container name:
oc logs <pod-name> -c <container-name> -n <namespace>
  • Stream logs in real-time:
oc logs -f <pod-name> -n <namespace>

Related Posts

OpenShift Day 2 Operations - Part 2

  • 19 Aug, 2025

“Day 2” operations refer to everything that happens after the cluster is installed, which could be a lot or a little, depending on how you plan to use the cluster. Effective troubleshooting and monit

OpenShift Day 2 Operations - Part 2Read More

OpenShift Day 2 Operations - Part 1

  • 29 Jul, 2025

“Day 2” operations refer to everything that happens after the cluster is installed, which could be a lot or a little, depending on how you plan to use the cluster. Verifying the Health of Your OpenS

OpenShift Day 2 Operations - Part 1Read More

Exploring Kubernetes Startup Scaling

  • 26 Jun, 2025

Kubernetes has long been a cornerstone for managing containerized workloads, and its continuous evolution keeps it at the forefront of cloud-native technologies. One of the exciting advancements in re

Exploring Kubernetes Startup ScalingRead More