1. What is Kubernetes primarily used for?
A) Database management
B) Orchestration of containerized applications
C) File system management
D) Cloud storage optimization
Answer: B) Orchestration of containerized applications
2. Which component of Kubernetes is responsible for maintaining the desired state
of the cluster?
A) Kubelet
B) Kube-Proxy
C) Controller Manager
D) API Server
Answer: C) Controller Manager
3. In Kubernetes, what is a "Pod"?
A) A single container instance
B) A group of one or more containers with shared storage/network
C) A set of nodes in a cluster
D) A network interface
Answer: B) A group of one or more containers with shared storage/network
4. What is the primary function of the "etcd" in Kubernetes?
A) Storing configuration data
B) Scheduling workloads
C) Networking between Pods
D) Monitoring resource usage
Answer: A) Storing configuration data
5. What is a Kubernetes "Service"?
A) A network proxy for database access
B) A mechanism for exposing a set of Pods as a network service
C) A predefined container runtime
D) An internal database system
Answer: B) A mechanism for exposing a set of Pods as a network service
6. Which Kubernetes object is responsible for ensuring a specified number of Pod
replicas are running?
A) StatefulSet
B) Deployment
C) ReplicaSet
D) ConfigMap
Answer: C) ReplicaSet
7. What is the default container runtime for Kubernetes?
A) Docker
B) Podman
C) containerd
D) CRI-O
Answer: C) containerd
8. What is the primary function of the "kubectl" command?
A) Managing Docker images
B) Managing Kubernetes clusters
C) Monitoring system logs
D) Configuring API servers
Answer: B) Managing Kubernetes clusters
9. What is the difference between a Deployment and a StatefulSet in Kubernetes?
A) Deployments manage Pods, while StatefulSets manage nodes.
B) StatefulSets maintain identity and order, while Deployments do not.
C) Deployments are for databases, and StatefulSets are for web servers.
D) StatefulSets are stateless, and Deployments are stateful.
Answer: B) StatefulSets maintain identity and order, while Deployments do not.
10. What is the purpose of a Kubernetes Namespace?
A) To limit resource usage
B) To provide isolation between different parts of a cluster
C) To manage the lifecycle of Pods
D) To deploy containerized applications
Answer: B) To provide isolation between different parts of a cluster
11. Which of the following is NOT a Kubernetes controller?
A) ReplicaSet
B) DaemonSet
C) CronJob
D) ConfigMap
Answer: D) ConfigMap
12. What does "Horizontal Pod Autoscaler (HPA)" do?
A) Scales Pods horizontally based on CPU or memory usage
B) Scales Pods vertically by increasing resource limits
C) Automatically deploys updates to Pods
D) Balances traffic between Pods
Answer: A) Scales Pods horizontally based on CPU or memory usage
13. Which Kubernetes component is responsible for scheduling Pods to nodes?
A) Kubelet
B) Scheduler
C) Controller Manager
D) API Server
Answer: B) Scheduler
14. In Kubernetes, what is a Node?
A) A virtual machine in the cloud
B) A single machine or server in the cluster
C) A container managed by Kubernetes
D) A network proxy for service discovery
Answer: B) A single machine or server in the cluster
15. What is the role of the Kubernetes API Server?
A) Managing Pod replicas
B) Exposing the Kubernetes API for communication
C) Monitoring resource usage
D) Providing storage solutions
Answer: B) Exposing the Kubernetes API for communication
16. What is the purpose of a ConfigMap in Kubernetes?
A) Store sensitive data like passwords
B) Store non-sensitive configuration data in key-value pairs
C) Schedule Pods on specific nodes
D) Define storage volumes for containers
Answer: B) Store non-sensitive configuration data in key-value pairs
17. Which command is used to create a Kubernetes deployment?
A) kubectl create deployment
B) kubectl create pod
C) kubectl apply deployment
D) kubectl set replicas
Answer: A) kubectl create deployment
18. How does Kubernetes perform load balancing?
A) Through the Node Controller
B) By using Services to distribute traffic across Pods
C) By scaling nodes automatically
D) Using Kubernetes Scheduler
Answer: B) By using Services to distribute traffic across Pods
19. What type of Kubernetes Service allows access from outside the cluster?
A) ClusterIP
B) NodePort
C) LoadBalancer
D) ExternalName
Answer: C) LoadBalancer
20. Which resource in Kubernetes defines how containers in a Pod are restarted?
A) Deployment
B) PodSpec
C) ReplicationController
D) RestartPolicy
Answer: D) RestartPolicy
21. What is the default networking model in Kubernetes?
A) Overlay network
B) Flat network with unique IP for each Pod
C) Virtual LAN for Pods
D) Host-only networking
Answer: B) Flat network with unique IP for each Pod
22. What is a Kubernetes Volume?
A) A container image
B) A persistent or ephemeral storage used by containers in a Pod
C) A network interface for Pods
D) A configuration management tool
Answer: B) A persistent or ephemeral storage used by containers in a Pod
23. Which object is used to inject sensitive data into Kubernetes Pods?
A) ConfigMap
B) Secret
C) Volume
D) Namespace
Answer: B) Secret
24. What is the role of a DaemonSet in Kubernetes?
A) To run a copy of a Pod on every node in the cluster
B) To schedule Pods on specific nodes
C) To ensure Pod autoscaling
D) To store logs
Answer: A) To run a copy of a Pod on every node in the cluster
25. Which of the following is NOT a feature of Kubernetes?
A) Container orchestration
B) Resource monitoring
C) Continuous Integration (CI)
D) Self-healing
Answer: C) Continuous Integration (CI)
26. What is the primary use of Kubernetes Labels?
A) Defining network policies
B) Organizing and selecting Kubernetes resources
C) Creating persistent volumes
D) Monitoring Pod health
Answer: B) Organizing and selecting Kubernetes resources
27. How does Kubernetes achieve high availability?
A) By replicating the control plane across multiple nodes
B) By using StatefulSets
C) By creating one large node in the cluster
D) Through manual configurations
Answer: A) By replicating the control plane across multiple nodes
28. What does a Kubernetes StatefulSet provide?
A) Stateless Pod scaling
B) Unique, persistent network identifiers and storage for Pods
C) Automated Pod scaling based on resource usage
D) Shared storage for Pods
Answer: B) Unique, persistent network identifiers and storage for Pods
29. Which of the following Kubernetes commands is used to view Pods in a namespace?
A) kubectl get nodes
B) kubectl get pods
C) kubectl describe pods
D) kubectl list namespace
Answer: B) kubectl get pods
30. What does the Horizontal Pod Autoscaler (HPA) NOT scale based on?
A) CPU utilization
B) Memory utilization
C) Custom metrics
D) Number of nodes
Answer: D) Number of nodes
31. Which file format is used for Kubernetes configurations?
A) JSON or YAML
B) XML
C) INI
D) TOML
Answer: A) JSON or YAML
32. What is the difference between ClusterIP and NodePort services in Kubernetes?
A) ClusterIP exposes services externally; NodePort exposes services internally.
B) ClusterIP exposes services internally; NodePort exposes services externally.
C) Both expose services externally.
D) Both expose services only to Pods in the cluster.
Answer: B) ClusterIP exposes services internally; NodePort exposes services
externally.
33. What does Kubernetes use to manage container runtime?
A) CRI (Container Runtime Interface)
B) Docker API
C) Virtual Machines
D) Etcd
Answer: A) CRI (Container Runtime Interface)
34. What is a ReplicaSet in Kubernetes?
A) Ensures a specified number of Pod replicas are running at any time
B) Manages DNS for Pods
C) Schedules jobs at a specified time
D) Provides persistent storage
Answer: A) Ensures a specified number of Pod replicas are running at any time
35. Which Kubernetes object specifies which Pods are allowed to communicate with
each other?
A) NetworkPolicy
B) ConfigMap
C) Secret
D) Deployment
Answer: A) NetworkPolicy