Multiple-choice questions on Kubernetes along with their answers:
1.Question: What is Kubernetes?
A) Database management system
B) Container orchestration platform
C) Web server
D) Virtualization tool
Answer: B) Container orchestration platform
2. Question: What is the primary purpose of Kubernetes?
A) Network security
B) Load balancing
C) Container orchestration
D) Data storage
Answer: C) Container orchestration
3. Question: In Kubernetes, what is a Pod?
A) Single container
B) Network configuration
C) Cluster management
D) Persistent storage
Answer: A) Single container
4. Question: Which YAML file is used to define Kubernetes deployments?
A) kubeconfig.yaml
B) deployment.yaml
C) cluster.yaml
D) manifest.yaml
Answer: B) deployment.yaml
5. Question: What is the purpose of a Kubernetes Service?
A) Data backup
B) Load balancing and service discovery
C) Container deployment
D) Persistent storage
Answer: B) Load balancing and service discovery
6. Question: What is the role of the Kubernetes Master in a cluster?
A) Manages containerized applications
B) Runs user workloads
C) Controls and monitors the cluster
D) Provides storage for containers
Answer: C) Controls and monitors the cluster
7. Question: Which command is used to create a Kubernetes deployment from a YAML file?
A) kubectl deploy
B) kubectl apply
C) kubectl start
D) kubectl create
Answer: B) kubectl apply
8. Question: What is the purpose of the Kubernetes etcd?
A) Container registry
B) Distributed key-value store
C) Load balancer
D) Networking plugin
Answer: B) Distributed key-value store
9. Question: What is the main benefit of using Kubernetes for container orchestration?
A) Improved security
B) Simplified networking
C) Efficient resource utilization and scaling
D) Enhanced container isolation
Answer: C) Efficient resource utilization and scaling
10. Question: How does Kubernetes handle container failures within a Pod?
A) Automatic restart
B) Manual intervention required
C) Logs the failure and continues
D) Deletes the entire Pod
Answer: A) Automatic restart
Question 51) What is the primary purpose of Kubernetes?
A) Managing virtual machines
B) Running distributed applications
C) Monitoring network traffic
D) Creating mobile applications
Answer: B) Running distributed applications
Question 52) In Kubernetes, what is a Pod?
A) A unit of storage
B) A group of containers
C) A virtual machine instance
D) A network protocol
Answer: B) A group of containers
Question 52) What is the Kubernetes component responsible for container scheduling?
A) kube-scheduler
B) kube-apiserver
C) kube-controller-manager
D) kubelet
Answer: A) kube-scheduler
Question 53) Which Kubernetes object defines how containers should run in a Pod?
A) Deployment
B) Service
C) Namespace
D) DaemonSet
Answer: A) Deployment
Question 54) What is the primary function of a Kubernetes Service?
A) Load balancing and service discovery
B) Container storage management
C) Container orchestration
D) Container security
Answer: A) Load balancing and service discovery
Question 55): What Kubernetes resource allows you to automatically scale the number of Pods based on CPU or memory usage?
A) Deployment
B) StatefulSet
C) HorizontalPodAutoscaler
D) Job
Answer: C) HorizontalPodAutoscaler
Question 56): How does Kubernetes manage persistent storage for containers?
A) Using local storage on each node
B) Through Kubernetes PersistentVolumes
C) By storing data within container images
D) By attaching external hard drives to each container
Answer: B) Through Kubernetes PersistentVolumes
Question 57): Which Kubernetes component is responsible for container health monitoring and restarting?
A) kube-scheduler
B) kube-proxy
C) kubelet
D) kube-controller-manager
Answer: C) kubelet
Question 57: What is Kubernetes?
A) A programming language
B) An open-source container orchestration platform
C) A cloud service provider
D) A database management system
Answer: B) An open-source container orchestration platform
Question 58:What is the primary purpose of Kubernetes?
A) Managing virtual machines
B) Running distributed applications
C) Monitoring network traffic
D) Creating mobile applications
Answer: B) Running distributed applications
Question 59:In Kubernetes, what is a Pod?
A) A unit of storage
B) A group of containers
C) A virtual machine instance
D) A network protocol
Answer: B) A group of containers
Question 60:What is the Kubernetes component responsible for container scheduling?
A) kube-scheduler
B) kube-apiserver
C) kube-controller-manager
D) kubelet
Answer: A) kube-scheduler
Question 61: Which Kubernetes object defines how containers should run in a Pod?
A) Deployment
B) Service
C) Namespace
D) DaemonSet
Answer: A) Deployment
Question 62: What Kubernetes resource allows you to automatically scale the number of Pods based on CPU or memory usage?
A) Deployment
B) StatefulSet
C) HorizontalPodAutoscaler
D) Job
Answer: C) HorizontalPodAutoscaler
Question 63: Which Kubernetes component is responsible for container health monitoring and restarting?
A) kube-scheduler
B) kube-proxy
C) kubelet
D) kube-controller-manager
Answer: C) kubelet
Question 64: What Kubernetes feature allows you to roll back to a previous version of a Deployment?
A) kubectl undo
B) kubectl rollback
C) kubectl revert
D) kubectl history
Answer: B) kubectl rollback
Question 65: Which Kubernetes object allows you to group resources and control access to those resources?
A) ClusterRole
B) RoleBinding
C) ServiceAccount
D) PodSecurityPolicy
Answer: A) ClusterRole
Question 66: What Kubernetes resource allows you to control the amount of CPU and memory resources a container can use?
A) LimitRange
B) ResourceQuota
C) HorizontalPodAutoscaler
D) PodSecurityPolicy
Answer: B) ResourceQuota
Question 67: Which Kubernetes component handles DNS resolution within a cluster?
A) kube-scheduler
B) kube-proxy
C) kubelet
D) kube-dns
Answer: D) kube-dns
Question 68:What Kubernetes object allows you to store sensitive information such as passwords and API keys?
A) Secret
B) ConfigMap
C) PersistentVolume
D) PersistentVolumeClaim
Answer: A) Secret
Question 69: What Kubernetes feature allows you to update a running application with zero downtime?
A) RollingUpdate strategy
B) Recreate strategy
C) Blue/Green deployment
D) Canary deployment
Answer: A) RollingUpdate strategy
Question 70: Which command can you use to create a Kubernetes Pod from a YAML file?
A) kubectl create pod
B) kubectl apply -f
C) kubectl run pod
D) kubectl generate pod
Answer: B) kubectl apply -f
Question 71: What Kubernetes resource allows you to control which nodes Pods are scheduled on?
A) PodAffinity
B) PodAntiAffinity
C) NodeSelector
D) Taints and tolerations
Answer: C) NodeSelector
Question 72: What Kubernetes feature allows you to expose a set of Pods to the internet?
A) Service
B) Ingress
C) Endpoint
D) PodDisruptionBudget
Answer: B) Ingress
Question 73: Which Kubernetes component is responsible for authenticating and authorizing API requests?
A) kube-apiserver
B) kube-scheduler
C) kube-controller-manager
D) kubelet
Answer: A) kube-apiserver
Question 74: What Kubernetes resource allows you to control which Pods are allowed to communicate with each other?
A) NetworkPolicy
B) PodSecurityPolicy
C) Service
D) Ingress
Answer: A) NetworkPolicy
Question 75:hat is the purpose of a Kubernetes Ingress?
A) To manage access to a cluster from external networks
B) To control which Pods are allowed to communicate with each other
C) To provide access to logs generated by Pods
D) To monitor and manage network traffic within the cluster
Answer: A) To manage access to a cluster from external networks
Question 76ich Kubernetes resource allows you to group Pods and apply certain operations to them collectively?
A) Deployment
B) ReplicaSet
C) Job
D) StatefulSet
Answer: B) ReplicaSet
Question 77How does Kubernetes ensure high availability of applications?
A) By automatically restarting failed Pods
B) By replicating Pods across multiple nodes
C) By using load balancers to distribute traffic
D) All of the above
Answer: D) All of the above
Question 78: at Kubernetes feature allows you to configure how much CPU and memory each container can use?
A) ResourceQuota
B) PodSecurityPolicy
C) LimitRange
D) HorizontalPodAutoscaler
Answer: C) LimitRange
Question 79 hich Kubernetes object is used to store configuration data in key-value pairs?
A) Secret
B) ConfigMap
C) PersistentVolume
D) PersistentVolumeClaim
Answer: B) ConfigMap
Question 80: What is the purpose of a Kubernetes Job?
A) To ensure that a specified number of Pods are running at all times
B) To run a single instance of a Pod on every node in the cluster
C) To run a task to completion and then exit
D) To manage a group of related Pods as a single unit
Answer: C) To run a task to completion and then exit
Question 81: ow does Kubernetes manage container images?
A) By storing images within the Kubernetes API server
B) By pulling images from a centralized image registry
C) By embedding images directly within Kubernetes manifests
D) By storing images on each node's local filesystem
Answer: B) By pulling images from a centralized image registry
Question 82: What Kubernetes feature allows you to update the configuration of a running application without restarting it?
A) RollingUpdate
B) Recreate
C) Blue/Green deployment
D) Canary deployment
Answer: A) RollingUpdate
Question 83: hat Kubernetes component is responsible for maintaining the desired state of the cluster's resources?
A) kube-scheduler
B) kube-proxy
C) kube-controller-manager
D) kubelet
Answer: C) kube-controller-manager
Question 84: ow does Kubernetes handle container security?
A) By isolating containers using virtualization
B) By automatically applying security patches to containers
C) By running containers with restricted privileges
D) By encrypting data stored within containers
Answer: C) By running containers with restricted privileges
Question 85: Which Kubernetes resource allows you to specify which Pods should be terminated first during resource contention?
A) PodAffinity
B) PodAntiAffinity
C) NodeSelector
D) PriorityClass
Answer: D) PriorityClass
Question 86: What Kubernetes object allows you to group related Pods and manage their lifecycle as a single unit?
A) Deployment
B) ReplicaSet
C) StatefulSet
D) DaemonSet
Answer: A) Deployment
Question 87: How does Kubernetes handle container networking between Pods in the same node?
A) By using host networking
B) By using overlay networks
C) By using container-to-container communication
D) By using port forwarding
Answer: C) By using container-to-container communication
Question 88: What Kubernetes resource allows you to define how a container should be started, stopped, and monitored?
A) ConfigMap
B) Service
C) Deployment
D) PodSecurityPolicy
Answer: C) Deployment
Question 89: What Kubernetes feature allows you to limit the rate of traffic to a service?
A) NetworkPolicy
B) Ingress
C) Service
D) PodDisruptionBudget
Answer: C) Service
Question 90:Which Kubernetes component is responsible for managing networking rules on each node?
A) kube-scheduler
B) kube-proxy
C) kubelet
D) kube-controller-manager
Answer: B) kube-proxy
Question 91:What Kubernetes object allows you to manage a group of related Pods that have a similar lifecycle?
A) Deployment
B) StatefulSet
C) Job
D) CronJob
Answer: B) StatefulSet
Question 91: How does Kubernetes handle container resource allocation?
A) By allocating resources based on container requests
B) By evenly distributing resources among all containers
C) By allowing containers to request resources dynamically
D) By restricting resource usage for certain containers
Answer: A) By allocating resources based on container requests
Question 92: What Kubernetes feature allows you to run a specific task at a specified time?
A) Job
B) StatefulSet
C) CronJob
D) Deployment
Answer: C) CronJob
Question 93: Which Kubernetes object is used to manage external access to services in a cluster?
A) Service
B) Ingress
C) Endpoint
D) PodDisruptionBudget
Answer: B) Ingress
Question 94: What is the purpose of a Kubernetes Volume?
A) To provide persistent storage for containers
B) To store container logs
C) To manage container networking
D) To monitor container health
Answer: A) To provide persistent storage for containers
Question 95: What Kubernetes resource allows you to store and manage secrets such as passwords, OAuth tokens, and SSH keys?
A) ConfigMap
B) Secret
C) Service
D) PersistentVolume
Answer: B) Secret
Question 95: How does Kubernetes handle container networking across multiple nodes in a cluster?
A) By using host networking
B) By creating a virtual overlay network
C) By configuring each container with a unique IP address
D) By exposing container ports to the host machine
Answer: B) By creating a virtual overlay network
Question 96: What Kubernetes feature allows you to perform a gradual rollout of a new version of an application?
A) RollingUpdate
B) Recreate
C) Blue/Green deployment
D) Canary deployment
Answer: D) Canary deployment
Question 97: What Kubernetes feature allows you to restrict access to resources based on IP addresses or other attributes?
A) NetworkPolicy
B) PodSecurityPolicy
C) RoleBinding
D) ServiceAccount
Answer: A) NetworkPolicy
Question 98: What Kubernetes resource allows you to manage a group of related Pods that need to be run on specific nodes?
A) Deployment
B) ReplicaSet
C) DaemonSet
D) StatefulSet
Answer: C) DaemonSet
Question 98: What Kubernetes feature allows you to update a running application with zero downtime?
A) RollingUpdate strategy
B) Recreate strategy
C) Blue/Green deployment
D) Canary deployment
Answer: A) RollingUpdate strategy
Question 99: What is the Kubernetes component responsible for container scheduling?
A) kube-scheduler
B) kube-apiserver
C) kube-controller-manager
D) kubelet
Answer: A) kube-scheduler
Interview questions on Kubernetes along with their answers
https://parmeshwarjadhao.blogspot.com/2024/01/multiple-choice-questions-on-kubernetes.html
Kubernetes #MCQChallenge #100Days100MCQs DevOps ContinuousLearning
TechCommunity #LinkedInChallenge #devopsideas #devopscommunity #kubernetesIdeas #kubernetescommunity #docker
Comments
Post a Comment