OpenShift · oc CLI interview questions

18 OpenShift · oc CLI questions from the MLOps & Integration bank, written for Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd.

Free to start: the 2-minute IT readiness check — six questions and a result.

Take the free IT readiness check

or take a mock interview set up for this area

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

Answer + AI explanation with Pro

2. Which command will authenticate the oc client to an OpenShift API server?

Junior
  1. A.oc login --token=… --server=…
  2. B.oc rsh api-1
  3. C.oc get routes
  4. D.oc expose svc/api

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

5. Which command will switch the current context to the ml-prod project?

Junior
  1. A.oc new-app python:3.11~https://repo.git
  2. B.oc rsh api-1
  3. C.oc get routes
  4. D.oc project ml-prod

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

8. Which command will list the Routes (public URLs) in the current project?

Junior
  1. A.oc rsh api-1
  2. B.oc expose svc/api
  3. C.oc get routes
  4. D.oc new-app python:3.11~https://repo.git

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

11. Which command will create an app from source using S2I with the python builder image?

Mid
  1. A.oc rsh api-1
  2. B.oc get routes
  3. C.oc new-app python:3.11~https://repo.git
  4. D.oc project ml-prod

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

14. Which command will create a Route that exposes the api Service externally?

Mid
  1. A.oc new-app python:3.11~https://repo.git
  2. B.oc project ml-prod
  3. C.oc expose svc/api
  4. D.oc get routes

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

17. Which command will open a remote shell into the running Pod api-1?

Mid
  1. A.oc expose svc/api
  2. B.oc get routes
  3. C.oc new-app python:3.11~https://repo.git
  4. D.oc rsh api-1

Answer + AI explanation with Pro

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

Answer + AI explanation with Pro

Free to start

Start with a free readiness check

Sign up free for the 2-minute IT readiness check and a scored result. Answers, explanations and the AI tutor on every OpenShift · oc CLI question come with Pro.

Take the free IT readiness check

or take a mock interview set up for this area

24,000+ questions & coding problemsSoftware & IT16,274 questionsGovernment jobs26 examsAptitudenew questions every timeAI practice interviewwith feedback65 topics to practiseMechanical1,149 questionsGATE ME9 papersEngineering Mathematics381 questions2-minute checkfreeDSA Problems1,422Civil1,005 questionsGATE CE9 papersCS Fundamentals1,209 questionsYour scores6 skillsSystem Design25Electrical / EEE1,047 questionsGATE EE9 papersRun your codeC++ · Java · PythonLow-Level Design144Electronics & Comm.975 questionsGATE EC9 papersAI help on every questionFull-Stack6,282Chemical1,005 questionsGATE CH9 papersAI whiteboardsystem designWork abroadEurope · remote · transfersESE ME1 paperGATE practice papers2019–2026ESE CE1 paperDate alertsbefore the last dateESE EE1 paperBehavioural courseHR round practiceESE ET1 paperResume optimizerProSSC JE ME1 paperApplication trackerSSC JE CE1 paperCompany-wise prepSSC JE EE1 paperRole roadmapsRRB JE1 subjectPriced in ₹UPI · cardsISRO SC1 paperGATE CS9 papersIBPS SO IT1 paperUGC NET CS1 paperSSC CGL26 papersIBPS PO26 papersRRB NTPC26 papersSSC CHSL26 papersIBPS Clerk26 papersSBI Clerk26 papersRRB Group D26 papersSSC CPO26 papersSSC GD26 papers