Learn how to deploy, manage, and scale applications on Azure Kubernetes Service (AKS). This guide covers key topics like creating Kubernetes deployments, using Helm charts, managing secrets, and more.
MCQs on AKS and Kubernetes
Section 1: Creating and Managing Kubernetes Deployments
What is the main purpose of a Kubernetes Deployment in AKS?
A) To expose a service externally
B) To manage the lifecycle of a set of Pods
C) To configure persistent storage
D) To monitor the health of the cluster
Which command is used to create a deployment in Kubernetes?
A) kubectl create pod
B) kubectl create deployment
C) kubectl apply deployment
D) kubectl deploy
How can you scale the number of replicas in a Kubernetes Deployment?
A) By using kubectl scale command
B) By editing the pod configuration manually
C) By using the Kubernetes dashboard
D) By creating a new namespace
In Kubernetes, what is the role of the ReplicaSet?
A) It defines the resources available for Pods
B) It ensures that a specified number of Pods are running at any given time
C) It configures networking for the cluster
D) It manages the persistent storage of Pods
Which file is typically used to define a Kubernetes Deployment in YAML format?
A) deployment.yaml
B) service.yaml
C) configmap.yaml
D) ingress.yaml
Section 2: Exposing Services with Load Balancers and Ingress Controllers
What is the purpose of a Load Balancer in AKS?
A) To manage Pods in a Kubernetes cluster
B) To expose an application to the external network
C) To manage persistent storage
D) To monitor Pod health
How does a Kubernetes Ingress Controller differ from a Load Balancer?
A) It controls the number of replicas for Pods
B) It provides HTTP routing for services based on host or path
C) It automatically scales applications
D) It configures secret management
Which of the following Ingress Controllers is often used with AKS?
A) Nginx Ingress Controller
B) Apache Ingress Controller
C) HAProxy Ingress Controller
D) Traefik Ingress Controller
What type of IP address is typically assigned to a Load Balancer in AKS?
A) Static Public IP
B) Dynamic Private IP
C) Reserved DNS name
D) Static Private IP
In AKS, what is an Ingress resource?
A) A method to expose services externally
B) A controller that handles scaling
C) A network policy for internal traffic
D) A YAML file for creating Pods
Section 3: Managing Secrets and Configuration with ConfigMaps and Secrets
What is a ConfigMap used for in Kubernetes?
A) Storing encrypted data
B) Storing non-sensitive configuration data
C) Storing persistent storage settings
D) Storing networking configurations
How are Secrets different from ConfigMaps in Kubernetes?
A) Secrets are for sensitive data, ConfigMaps are for non-sensitive data
B) Secrets can only be used by Admins
C) Secrets store external dependencies
D) Secrets require persistent storage
What is the purpose of Kubernetes’ Secret Management system?
A) To store login credentials and sensitive data securely
B) To monitor application health
C) To deploy applications securely
D) To create resource limits for Pods
How can a Secret be referenced in a Kubernetes Deployment YAML file?
A) Using the secrets section under spec
B) By mounting it as a volume
C) By defining an environment variable
D) All of the above
Which command is used to create a Secret in Kubernetes?
A) kubectl create configmap
B) kubectl create secret
C) kubectl apply secret
D) kubectl deploy secret
Section 4: Persistent Storage in AKS with Azure Disks and Azure Files
What is the primary use of Azure Disks in AKS?
A) To provide temporary storage for Pods
B) To store large amounts of data persistently
C) To configure networking for Pods
D) To manage Kubernetes configuration
Which type of Azure Disk is suitable for high-performance workloads?
A) Standard HDD
B) Standard SSD
C) Premium SSD
D) Azure Blob Storage
What is the main difference between Azure Disks and Azure Files in AKS?
A) Azure Disks are for persistent storage, Azure Files are for network shares
B) Azure Files are more secure than Azure Disks
C) Azure Disks cannot be used in AKS
D) Azure Files are cheaper than Azure Disks
How can you create persistent storage for Pods in AKS using Azure Disks?
A) By using a PersistentVolume (PV) and PersistentVolumeClaim (PVC)
B) By using an Ingress controller
C) By using a ConfigMap
D) By mounting a load balancer
What type of storage is used for shared access in AKS?
A) Azure Blob Storage
B) Azure Files
C) Azure Managed Disks
D) Azure Storage Queues
Section 5: Helm Charts for Managing Kubernetes Applications
What is Helm used for in Kubernetes?
A) Deploying applications
B) Managing Kubernetes configurations
C) Storing persistent data
D) Automating networking configuration
What is a Helm Chart?
A) A set of YAML files for deploying applications
B) A script for managing Kubernetes clusters
C) A command-line tool for scaling Pods
D) A storage volume configuration for AKS
Which of the following is a valid command to install a Helm chart in Kubernetes?
A) helm install [chart-name]
B) kubectl helm install [chart-name]
C) helm deploy [chart-name]
D) kubectl deploy [chart-name]
In Helm, what is the purpose of values.yaml file?
A) To define the application’s configuration settings
B) To store Kubernetes secrets
C) To manage network traffic
D) To scale Pods dynamically
What is the main advantage of using Helm Charts for managing Kubernetes applications?
A) Simplifies the deployment process and makes applications portable
B) Provides automatic scaling for applications
C) Improves Kubernetes networking security
D) Reduces the need for persistent storage
How do you upgrade a Helm release in Kubernetes?
A) helm upgrade [release-name] [chart-name]
B) kubectl upgrade helm [release-name]
C) helm update [chart-name]
D) kubectl apply [chart-name]
What command is used to search for Helm charts?
A) helm find
B) helm search
C) kubectl helm
D) kubectl search
Which of the following is NOT a key component of a Helm chart?
A) Chart.yaml
B) Templates
C) values.yaml
D) configmap.yaml
What is the role of the “templates” directory in a Helm Chart?
A) To store the application’s Kubernetes manifest files
B) To store the secrets for the application
C) To configure persistent storage
D) To define networking rules for the application
Which Helm command is used to list the installed releases?
A) helm list
B) kubectl helm list
C) helm show
D) kubectl get releases
Answer Key
Qno
Answer
1
B) To manage the lifecycle of a set of Pods
2
B) kubectl create deployment
3
A) By using kubectl scale command
4
B) It ensures that a specified number of Pods are running at any given time
5
A) deployment.yaml
6
B) To expose an application to the external network
7
B) It provides HTTP routing for services based on host or path
8
A) Nginx Ingress Controller
9
A) Static Public IP
10
A) A method to expose services externally
11
B) Storing non-sensitive configuration data
12
A) Secrets are for sensitive data, ConfigMaps are for non-sensitive data
13
A) To store login credentials and sensitive data securely
14
D) All of the above
15
B) kubectl create secret
16
B) To store large amounts of data persistently
17
C) Premium SSD
18
A) Azure Disks are for persistent storage, Azure Files are for network shares
19
A) By using a PersistentVolume (PV) and PersistentVolumeClaim (PVC)
20
B) Azure Files
21
A) Deploying applications
22
A) A set of YAML files for deploying applications
23
A) helm install [chart-name]
24
A) To define the application’s configuration settings
25
A) Simplifies the deployment process and makes applications portable
26
A) helm upgrade [release-name] [chart-name]
27
B) helm search
28
D) configmap.yaml
29
A) To store the application’s Kubernetes manifest files