Kubernetes MCQs with answers Page - 16

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. Which command lists all namespaces in a cluster?

  • (A) kubectl list namespaces
  • (B) kubectl get ns
  • (C) kubectl show namespaces
  • (D) kubectl describe all-namespaces

A

Admin • 828.03K Points
Coach

Q. What is the function of a Kubernetes Ingress?

  • (A) Provides internal DNS resolution
  • (B) Manages persistent storage
  • (C) Manages external access to services via HTTP/HTTPS
  • (D) Manages logging and monitoring

A

Admin • 828.03K Points
Coach

Q. Which field is mandatory in a Kubernetes pod specification?

  • (A) name
  • (B) labels
  • (C) containers
  • (D) annotations

A

Admin • 828.03K Points
Coach

Q. Which command is used to update a deployment's container image?

  • (A) kubectl update image
  • (B) kubectl set image deployment/my-deploy
  • (C) kubectl replace image
  • (D) kubectl image change

A

Admin • 828.03K Points
Coach

Q. What type of service exposes an internal DNS name that maps to an external name?

  • (A) NodePort
  • (B) ClusterIP
  • (C) ExternalName
  • (D) LoadBalancer

A

Admin • 828.03K Points
Coach

Q. What is the effect of setting `replicas: 0` in a Deployment?

  • (A) Deletes the deployment
  • (B) Scales the deployment to zero pods
  • (C) Pauses the deployment
  • (D) Deletes all services

A

Admin • 828.03K Points
Coach

Q. Which Kubernetes command gives a detailed view of pod lifecycle events?

  • (A) kubectl log pod
  • (B) kubectl get pod
  • (C) kubectl describe pod
  • (D) kubectl events pod

A

Admin • 828.03K Points
Coach

Q. What does the readiness probe determine in a Kubernetes pod?

  • (A) When to restart the container
  • (B) If the container should be scheduled
  • (C) If the container is ready to serve traffic
  • (D) If the container is writing logs

A

Admin • 828.03K Points
Coach

Q. Which command deletes a specific ConfigMap?

  • (A) kubectl delete configmap <name>
  • (B) kubectl remove cm <name>
  • (C) kubectl erase configmap <name>
  • (D) kubectl delete config <name>

A

Admin • 828.03K Points
Coach

Q. Which resource is used to define default memory and CPU limits for pods in a namespace?

  • (A) ResourceQuota
  • (B) LimitRange
  • (C) ConfigMap
  • (D) PodTemplate

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