OpenShift · oc CLI interview questions

18 real OpenShift · oc CLI questions from the MLOps & Integration bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.

1. What does oc login --token=… --server=… do?

Junior
  1. A.create a Route that exposes the api Service externally
  2. B.open a remote shell into the running Pod api-1
  3. C.create an app from source using S2I with the python builder image
  4. D.authenticate the oc client to an OpenShift API server
Reveal the answer + AI explanation — free account

3. Which statement is correct?

Junior
  1. A.oc login --token=… --server=… — list the Routes (public URLs) in the current project
  2. B.oc login --token=… --server=… — create a Route that exposes the api Service externally
  3. C.oc login --token=… --server=… — create an app from source using S2I with the python builder image
  4. D.oc login --token=… --server=… — authenticate the oc client to an OpenShift API server
Reveal the answer + AI explanation — free account

4. What does oc project ml-prod do?

Junior
  1. A.list the Routes (public URLs) in the current project
  2. B.create a Route that exposes the api Service externally
  3. C.open a remote shell into the running Pod api-1
  4. D.switch the current context to the ml-prod project
Reveal the answer + AI explanation — free account

6. Which statement is correct?

Junior
  1. A.oc project ml-prod — list the Routes (public URLs) in the current project
  2. B.oc project ml-prod — create an app from source using S2I with the python builder image
  3. C.oc project ml-prod — switch the current context to the ml-prod project
  4. D.oc project ml-prod — open a remote shell into the running Pod api-1
Reveal the answer + AI explanation — free account

7. What does oc get routes do?

Junior
  1. A.authenticate the oc client to an OpenShift API server
  2. B.list the Routes (public URLs) in the current project
  3. C.switch the current context to the ml-prod project
  4. D.create a Route that exposes the api Service externally
Reveal the answer + AI explanation — free account

9. Which statement is correct?

Junior
  1. A.oc get routes — open a remote shell into the running Pod api-1
  2. B.oc get routes — create an app from source using S2I with the python builder image
  3. C.oc get routes — list the Routes (public URLs) in the current project
  4. D.oc get routes — create a Route that exposes the api Service externally
Reveal the answer + AI explanation — free account

10. What does oc new-app python:3.11~https://repo.git do?

Mid
  1. A.create a Route that exposes the api Service externally
  2. B.create an app from source using S2I with the python builder image
  3. C.authenticate the oc client to an OpenShift API server
  4. D.open a remote shell into the running Pod api-1
Reveal the answer + AI explanation — free account

12. Which statement is correct?

Mid
  1. A.oc new-app python:3.11~https://repo.git — open a remote shell into the running Pod api-1
  2. B.oc new-app python:3.11~https://repo.git — create a Route that exposes the api Service externally
  3. C.oc new-app python:3.11~https://repo.git — list the Routes (public URLs) in the current project
  4. D.oc new-app python:3.11~https://repo.git — create an app from source using S2I with the python builder image
Reveal the answer + AI explanation — free account

13. What does oc expose svc/api do?

Mid
  1. A.authenticate the oc client to an OpenShift API server
  2. B.open a remote shell into the running Pod api-1
  3. C.create an app from source using S2I with the python builder image
  4. D.create a Route that exposes the api Service externally
Reveal the answer + AI explanation — free account

15. Which statement is correct?

Mid
  1. A.oc expose svc/api — authenticate the oc client to an OpenShift API server
  2. B.oc expose svc/api — create an app from source using S2I with the python builder image
  3. C.oc expose svc/api — create a Route that exposes the api Service externally
  4. D.oc expose svc/api — list the Routes (public URLs) in the current project
Reveal the answer + AI explanation — free account

16. What does oc rsh api-1 do?

Mid
  1. A.open a remote shell into the running Pod api-1
  2. B.list the Routes (public URLs) in the current project
  3. C.create an app from source using S2I with the python builder image
  4. D.switch the current context to the ml-prod project
Reveal the answer + AI explanation — free account

18. Which statement is correct?

Mid
  1. A.oc rsh api-1 — authenticate the oc client to an OpenShift API server
  2. B.oc rsh api-1 — open a remote shell into the running Pod api-1
  3. C.oc rsh api-1 — create a Route that exposes the api Service externally
  4. D.oc rsh api-1 — switch the current context to the ml-prod project
Reveal the answer + AI explanation — free account

Free to start

Answers, AI explanations, and a scored voice mock interview

Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take one full AI mock interview — scored like a real panel.

Practice OpenShift · oc CLI free