oc rsh command returns "pods <podname> not found" error though the pod exists
Issue
oc rsh
command returns "pods podname not found" error as shown below even though the pod does exist.
$ oc rsh prometheus-k8s-0 -n openshift-monitoring
Error from server (NotFound): pods "prometheus-k8s-0" not found
$ oc get pod -n openshift-monitoring | grep prometheus
prometheus-adapter-746d7c4485-7s5r8 1/1 Running 0 2d1h
prometheus-adapter-746d7c4485-zzbgm 1/1 Running 0 2d1h
prometheus-k8s-0 7/7 Running 1 28m
prometheus-k8s-1 7/7 Running 1 28m
prometheus-operator-599d68ffbf-vgqtk 2/2 Running 1 3d1h
Environment
- Red Hat OpenShift Container Platform (RHOCP)
- 4.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.