Kubernetes MCQs with answers Page - 18

Here, you will find a collection of MCQ questions on Kubernetes. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Admin • 828.03K Points
Coach

Q. What is a taint in Kubernetes?

  • (A) A marker to prevent scheduling on a node unless tolerated
  • (B) An outdated pod
  • (C) A failed liveness check
  • (D) A pod termination signal

A

Admin • 828.03K Points
Coach

Q. Which option is used to get logs from a specific container in a pod?

  • (A) kubectl logs <pod-name> --container <container-name>
  • (B) kubectl container logs <pod-name>
  • (C) kubectl describe container <container-name>
  • (D) kubectl get logs --pod <pod-name>

A

Admin • 828.03K Points
Coach

Q. What does `kubectl apply -f` do?

  • (A) Deletes a resource
  • (B) Rolls out a deployment
  • (C) Creates or updates a resource using a config file
  • (D) Scales a pod

A

Admin • 828.03K Points
Coach

Q. Which command allows real-time monitoring of pod logs?

  • (A) kubectl get logs
  • (B) kubectl tail logs
  • (C) kubectl logs -f
  • (D) kubectl stream logs

A

Admin • 828.03K Points
Coach

Q. Which resource is used for storing cluster-wide configuration data?

  • (A) ConfigMap
  • (B) Secret
  • (C) etcd
  • (D) Deployment

A

Admin • 828.03K Points
Coach

Q. How can you prevent a pod from being scheduled on a specific node?

  • (A) Using resource limits
  • (B) By applying a taint to the node
  • (C) By setting an annotation
  • (D) By scaling down replicas

A

Admin • 828.03K Points
Coach

Q. What does the `status.phase` field represent in a pod's status?

  • (A) The number of containers
  • (B) The restart count
  • (C) The current lifecycle stage of the pod
  • (D) The last applied configuration

A

Admin • 828.03K Points
Coach

Q. What is the default imagePullPolicy if you use `:latest` tag in image?

  • (A) IfNotPresent
  • (B) Always
  • (C) Never
  • (D) Auto

A

Admin • 828.03K Points
Coach

Q. How does Kubernetes know when to recreate a pod?

  • (A) Using pod logs
  • (B) Through liveness probes
  • (C) Via service selectors
  • (D) Via readiness probes

A

Admin • 828.03K Points
Coach

Q. Which command lets you edit an existing Kubernetes resource interactively?

  • (A) kubectl change
  • (B) kubectl patch
  • (C) kubectl edit
  • (D) kubectl modify

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ