oc Debug Node Examples¶
Introduction¶
oc debug node starts a privileged debug pod on a node. Use it for node-level inspection, then chroot to /host when you need host tools.
When You Need This Command¶
Use this command when you need to inspect, change, or verify OpenShift resources from the terminal without relying on the web console.
Syntax¶
oc <command> <resource> [name] -n <project>
Practical Examples¶
oc debug node/worker-1
chroot /host
crictl ps
exit
Example output:
Starting pod/worker-1-debug ...
To use host binaries, run `chroot /host`
Verification¶
oc get pods -A --field-selector spec.nodeName=worker-1
oc debug node/worker-1
Common Mistakes¶
- Leaving debug pods running.
- Changing host files during an inspection session.
- Using node debug for application-level problems first.
Production Notes¶
Run read-only commands first, check the active project, and prefer declarative manifests for repeatable changes.
Quick Checklist¶
- Confirm the active project.
- Inspect the exact object named in the error.
- Read recent events.
- Apply one focused fix.
- Verify status after the change.
Related Guides¶
Summary¶
oc Debug Node Examples is most useful when paired with verification. Check the project, run the command against the intended object, and confirm the resulting OpenShift state.