Access the MicroShift node locally
Use the following procedure to access the MicroShift node locally by using a kubeconfig file.
Prerequisites
-
You installed the OpenShift CLI (
oc).
Procedure
-
Optional: to create a
~/.kube/folder if your Red Hat Enterprise Linux (RHEL) machine does not have one, run the following command:$ mkdir -p ~/.kube/ -
Copy the generated local access
kubeconfigfile to the~/.kube/directory by running the following command:$ sudo cat /var/lib/microshift/resources/kubeadmin/kubeconfig > ~/.kube/config -
Update the permissions on your
~/.kube/configfile by running the following command:$ chmod go-r ~/.kube/config
Verification
-
Verify that MicroShift is running by entering the following command:
$ oc get pods -AExample outputNAMESPACE NAME READY STATUS RESTARTS AGE default i-06166fbb376f14a8bus-west-2computeinternal-debug-qtwcr 1/1 Running 0 46m kube-system csi-snapshot-controller-5c6586d546-lprv4 1/1 Running 0 51m openshift-dns dns-default-45jl7 2/2 Running 0 50m openshift-dns node-resolver-7wmzf 1/1 Running 0 51m openshift-ingress router-default-78b86fbf9d-qvj9s 1/1 Running 0 51m openshift-ovn-kubernetes ovnkube-master-5rfhh 4/4 Running 0 51m openshift-ovn-kubernetes ovnkube-node-gcnt6 1/1 Running 0 51m openshift-service-ca service-ca-bf5b7c9f8-pn6rk 1/1 Running 0 51m openshift-storage topolvm-controller-549f7fbdd5-7vrmv 5/5 Running 0 51m openshift-storage topolvm-node-rht2m 3/3 Running 0 50mThis example output shows a basic MicroShift installation. If you installed optional RPMs, the status of pods running those services is displayed in the output.