File: proc_getting-shell-access-to-the-openshift-cluster.adoc

package info (click to toggle)
golang-github-crc-org-crc 2.34.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,548 kB
  • sloc: sh: 398; makefile: 326; javascript: 40
file content (25 lines) | stat: -rw-r--r-- 951 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
= Getting shell access to the {openshift} cluster

To access the cluster for troubleshooting or debugging purposes, follow this procedure.

[NOTE]
====
Direct access to the {ocp} cluster is not needed for regular use and is strongly discouraged.
====

.Prerequisites
* Enable {openshift} CLI ([command]`oc`) access to the cluster and log in as the `kubeadmin` user.
For detailed steps, see link:{crc-gsg-url}#accessing-the-openshift-cluster-with-oc_gsg[Accessing the {openshift} cluster with the {openshift} CLI].

.Procedure
. Run the [command]`oc get nodes` command to identify the desired node.
The output will be similar to this:
+
[subs="+quotes,attributes",options="nowrap"]
----
$ oc get nodes
NAME                 STATUS   ROLES           AGE    VERSION
crc-shdl4-master-0   Ready    master,worker   7d7h   v1.14.6+7e13ab9a7
----

. Run [command]`oc debug nodes/_<node>_` where `_<node>_` is the name of the node printed in the previous step.