Kubernetes · kubectl interview questions

21 Kubernetes · kubectl 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 kubectl get pods -n ml do?

Junior
  1. A.list all Pods in the ml namespace
  2. B.show detailed state and recent events for the Pod named api
  3. C.create or update resources to match the declared YAML manifest
  4. D.stream logs from a Pod managed by the api Deployment

Answer + AI explanation with Pro

2. Which command will list all Pods in the ml namespace?

Junior
  1. A.kubectl get pods -n ml
  2. B.kubectl port-forward svc/api 8080:80
  3. C.kubectl rollout restart deploy/api
  4. D.kubectl describe pod api

Answer + AI explanation with Pro

3. Which statement is correct?

Junior
  1. A.kubectl get pods -n ml — list all Pods in the ml namespace
  2. B.kubectl get pods -n ml — show detailed state and recent events for the Pod named api
  3. C.kubectl get pods -n ml — trigger a rolling restart of the api Deployment's Pods
  4. D.kubectl get pods -n ml — create or update resources to match the declared YAML manifest

Answer + AI explanation with Pro

4. What does kubectl describe pod api do?

Junior
  1. A.stream logs from a Pod managed by the api Deployment
  2. B.list all Pods in the ml namespace
  3. C.show detailed state and recent events for the Pod named api
  4. D.change the api Deployment to run five Pod replicas

Answer + AI explanation with Pro

5. Which command will show detailed state and recent events for the Pod named api?

Junior
  1. A.kubectl apply -f manifest.yaml
  2. B.kubectl rollout restart deploy/api
  3. C.kubectl port-forward svc/api 8080:80
  4. D.kubectl describe pod api

Answer + AI explanation with Pro

6. Which statement is correct?

Junior
  1. A.kubectl describe pod api — show detailed state and recent events for the Pod named api
  2. B.kubectl describe pod api — create or update resources to match the declared YAML manifest
  3. C.kubectl describe pod api — change the api Deployment to run five Pod replicas
  4. D.kubectl describe pod api — stream logs from a Pod managed by the api Deployment

Answer + AI explanation with Pro

7. What does kubectl logs -f deploy/api do?

Junior
  1. A.list all Pods in the ml namespace
  2. B.create or update resources to match the declared YAML manifest
  3. C.change the api Deployment to run five Pod replicas
  4. D.stream logs from a Pod managed by the api Deployment

Answer + AI explanation with Pro

8. Which command will stream logs from a Pod managed by the api Deployment?

Junior
  1. A.kubectl apply -f manifest.yaml
  2. B.kubectl logs -f deploy/api
  3. C.kubectl describe pod api
  4. D.kubectl rollout restart deploy/api

Answer + AI explanation with Pro

9. Which statement is correct?

Junior
  1. A.kubectl logs -f deploy/api — tunnel local port 8080 to port 80 of the api Service for debugging
  2. B.kubectl logs -f deploy/api — stream logs from a Pod managed by the api Deployment
  3. C.kubectl logs -f deploy/api — list all Pods in the ml namespace
  4. D.kubectl logs -f deploy/api — create or update resources to match the declared YAML manifest

Answer + AI explanation with Pro

10. What does kubectl apply -f manifest.yaml do?

Mid
  1. A.create or update resources to match the declared YAML manifest
  2. B.show detailed state and recent events for the Pod named api
  3. C.stream logs from a Pod managed by the api Deployment
  4. D.tunnel local port 8080 to port 80 of the api Service for debugging

Answer + AI explanation with Pro

11. Which command will create or update resources to match the declared YAML manifest?

Mid
  1. A.kubectl port-forward svc/api 8080:80
  2. B.kubectl apply -f manifest.yaml
  3. C.kubectl rollout restart deploy/api
  4. D.kubectl logs -f deploy/api

Answer + AI explanation with Pro

12. Which statement is correct?

Mid
  1. A.kubectl apply -f manifest.yaml — trigger a rolling restart of the api Deployment's Pods
  2. B.kubectl apply -f manifest.yaml — tunnel local port 8080 to port 80 of the api Service for debugging
  3. C.kubectl apply -f manifest.yaml — change the api Deployment to run five Pod replicas
  4. D.kubectl apply -f manifest.yaml — create or update resources to match the declared YAML manifest

Answer + AI explanation with Pro

13. What does kubectl rollout restart deploy/api do?

Mid
  1. A.tunnel local port 8080 to port 80 of the api Service for debugging
  2. B.trigger a rolling restart of the api Deployment's Pods
  3. C.change the api Deployment to run five Pod replicas
  4. D.show detailed state and recent events for the Pod named api

Answer + AI explanation with Pro

14. Which command will trigger a rolling restart of the api Deployment's Pods?

Mid
  1. A.kubectl rollout restart deploy/api
  2. B.kubectl apply -f manifest.yaml
  3. C.kubectl logs -f deploy/api
  4. D.kubectl port-forward svc/api 8080:80

Answer + AI explanation with Pro

15. Which statement is correct?

Mid
  1. A.kubectl rollout restart deploy/api — stream logs from a Pod managed by the api Deployment
  2. B.kubectl rollout restart deploy/api — show detailed state and recent events for the Pod named api
  3. C.kubectl rollout restart deploy/api — create or update resources to match the declared YAML manifest
  4. D.kubectl rollout restart deploy/api — trigger a rolling restart of the api Deployment's Pods

Answer + AI explanation with Pro

16. What does kubectl scale deploy/api --replicas=5 do?

Mid
  1. A.list all Pods in the ml namespace
  2. B.tunnel local port 8080 to port 80 of the api Service for debugging
  3. C.change the api Deployment to run five Pod replicas
  4. D.trigger a rolling restart of the api Deployment's Pods

Answer + AI explanation with Pro

17. Which command will change the api Deployment to run five Pod replicas?

Mid
  1. A.kubectl describe pod api
  2. B.kubectl scale deploy/api --replicas=5
  3. C.kubectl get pods -n ml
  4. D.kubectl rollout restart deploy/api

Answer + AI explanation with Pro

18. Which statement is correct?

Mid
  1. A.kubectl scale deploy/api --replicas=5 — trigger a rolling restart of the api Deployment's Pods
  2. B.kubectl scale deploy/api --replicas=5 — tunnel local port 8080 to port 80 of the api Service for debugging
  3. C.kubectl scale deploy/api --replicas=5 — change the api Deployment to run five Pod replicas
  4. D.kubectl scale deploy/api --replicas=5 — list all Pods in the ml namespace

Answer + AI explanation with Pro

19. What does kubectl port-forward svc/api 8080:80 do?

Senior
  1. A.list all Pods in the ml namespace
  2. B.tunnel local port 8080 to port 80 of the api Service for debugging
  3. C.create or update resources to match the declared YAML manifest
  4. D.change the api Deployment to run five Pod replicas

Answer + AI explanation with Pro

20. Which command will tunnel local port 8080 to port 80 of the api Service for debugging?

Senior
  1. A.kubectl apply -f manifest.yaml
  2. B.kubectl port-forward svc/api 8080:80
  3. C.kubectl rollout restart deploy/api
  4. D.kubectl scale deploy/api --replicas=5

Answer + AI explanation with Pro

21. Which statement is correct?

Senior
  1. A.kubectl port-forward svc/api 8080:80 — stream logs from a Pod managed by the api Deployment
  2. B.kubectl port-forward svc/api 8080:80 — create or update resources to match the declared YAML manifest
  3. C.kubectl port-forward svc/api 8080:80 — tunnel local port 8080 to port 80 of the api Service for debugging
  4. D.kubectl port-forward svc/api 8080:80 — change the api Deployment to run five Pod replicas

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 Kubernetes · kubectl 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