user1227670
user1227670

Reputation: 19

oc get deployment is returning No resources found

"oc get deployment" command is returning "No resources Found" as the result.

Even if I put an option of assigning or defining the namespace using -n as the option to above command, I am getting the same result.

Whereas, I am getting the correct result of oc get pods command.

Meanwhile, the oc version is oc - v3.6.0 kubernetes - v1.6.1

openshift - v3.11.380

Upvotes: 0

Views: 1220

Answers (2)

Ron Megini
Ron Megini

Reputation: 31

There are other objects that create pods such as statefulset or deamonset. Because it is OpenShift, my feeling is that the pods created by a deploymentconfig which is popular way to create applications.

Anyway, you can make sure which object is the owner of the pods by looking into the pod annotation. This command should work:

oc get pod -o yaml <podname> | grep ownerReference -A 6

Upvotes: 1

Fred F.
Fred F.

Reputation: 46

Check, if you connect to the correct kubernetes environment, (especially if you're running more than one). If that is correct, I guess, either you don't have any deployments at all, or the deployments are in a different namespace than you think. Try out listing all deployments: oc get deployments -A

Upvotes: 1

Related Questions