MCQs on Security in AKS | Securing AKS Clusters and Applications

Security in Azure Kubernetes Service (AKS) is critical to maintaining the integrity of your cloud applications. This chapter focuses on key topics such as identity management, role-based access control, network security, and securing containers and pods within AKS.


Identity and Access Management with Azure Active Directory (AAD)

  1. What is Azure Active Directory (AAD) primarily used for in AKS?
    a) Container registry management
    b) Authentication and identity management
    c) Network policy enforcement
    d) Application monitoring
  2. Which of the following is a key benefit of integrating Azure AD with AKS?
    a) Multi-tenant access management
    b) Automated scaling of nodes
    c) Container vulnerability scanning
    d) Simplified networking
  3. What is required to use Azure AD integration with AKS?
    a) Azure Active Directory Premium
    b) A Service Principal
    c) A Kubernetes Operator
    d) A public IP address
  4. How does Azure AD integration improve security in AKS?
    a) Through role-based access control
    b) By providing node scaling
    c) By scanning images
    d) By encrypting data at rest
  5. Which Azure AD authentication method is used by AKS to authenticate API requests?
    a) Managed identity
    b) Service principal
    c) Personal Access Tokens (PATs)
    d) OAuth tokens

Role-based Access Control (RBAC) in AKS

  1. What is the purpose of Role-Based Access Control (RBAC) in AKS?
    a) To scale the Kubernetes nodes automatically
    b) To define user permissions to resources
    c) To monitor the health of pods
    d) To configure network policies
  2. In RBAC, what does a “Role” define?
    a) The resource that users can access
    b) A set of permissions within a specific namespace
    c) The type of container image to be deployed
    d) The cloud storage used by the service
  3. What is the default RBAC role for a user in AKS?
    a) Reader
    b) Contributor
    c) Owner
    d) No access
  4. What does the “ClusterRole” in AKS apply to?
    a) A specific pod within a namespace
    b) A set of permissions across all namespaces in the cluster
    c) Permissions for Azure Active Directory users
    d) Only the control plane resources
  5. How can a user be granted access to an AKS cluster?
    a) By using a personal authentication key
    b) By associating them with an Azure AD group
    c) By assigning them a Service Principal
    d) Through automatic encryption

Network Security and Policies (Azure Network Policies, Network Security Groups)

  1. What is the primary role of Azure Network Security Groups (NSGs) in AKS?
    a) To manage container images
    b) To control inbound and outbound traffic
    c) To scale Kubernetes pods
    d) To monitor application performance
  2. Which of the following is a feature of Azure Network Policies in AKS?
    a) Limits the number of nodes
    b) Defines network traffic rules for pods
    c) Assigns roles to users
    d) Automatically updates container versions
  3. How do Azure Network Security Groups (NSGs) improve security in AKS?
    a) By filtering traffic based on IP and port
    b) By automatically scaling AKS nodes
    c) By encrypting container communication
    d) By monitoring user logins
  4. Which of the following can be defined by Azure Network Policies?
    a) IP address range and port filtering
    b) Access control roles for users
    c) Encryption keys for containers
    d) Metrics for container health
  5. What feature does an Azure Network Policy allow to be set for pods?
    a) Image version management
    b) Pod-to-pod communication control
    c) Cluster node scaling
    d) Resource allocation for services

Securing Containers and Images (Azure Container Registry)

  1. What is the function of Azure Container Registry (ACR) in AKS security?
    a) To store encrypted keys
    b) To manage container images and secrets
    c) To monitor network traffic
    d) To assign RBAC roles
  2. Which feature of Azure Container Registry helps secure container images?
    a) Automated scaling
    b) Image scanning for vulnerabilities
    c) Kubernetes orchestration
    d) Auto-patching of containers
  3. How can Azure Container Registry (ACR) ensure that only secure images are used?
    a) By scanning for known vulnerabilities
    b) By managing container logs
    c) By controlling user permissions
    d) By limiting IP addresses
  4. Which action must be taken before using private container images from ACR in AKS?
    a) Enable TLS encryption
    b) Configure network policies
    c) Authenticate AKS with ACR
    d) Set up Service Principals
  5. What does Azure Container Registry support to improve image security?
    a) Role-based access control for images
    b) SSL termination for containers
    c) Automated patch management
    d) Network segmentation

Pod Security and Network Policies

  1. What is the purpose of Pod Security Policies (PSP) in AKS?
    a) To manage container registry settings
    b) To define security controls for running pods
    c) To encrypt pod traffic
    d) To control container scaling
  2. Which action is restricted by a Pod Security Policy (PSP) in AKS?
    a) Pod-to-pod communication
    b) Access to Kubernetes control plane
    c) Usage of privileged containers
    d) Network traffic monitoring
  3. Which of the following can be controlled by network policies in AKS?
    a) Pod communication within a namespace
    b) Cluster-wide access to the control plane
    c) Container registry access
    d) Pod resource limits
  4. How can network policies in AKS improve security?
    a) By preventing unauthorized pod-to-pod communication
    b) By automatically scaling the application
    c) By updating the image versions
    d) By encrypting network traffic
  5. What is the default behavior for pod-to-pod communication in AKS if no network policy is applied?
    a) Blocked
    b) Restricted to specific namespaces
    c) Open (unrestricted)
    d) Secured by default
  6. Which Azure service can enforce network policies on Kubernetes workloads?
    a) Azure Firewall
    b) Azure DDoS Protection
    c) Azure Network Policies
    d) Azure Key Vault
  7. What is the primary use of Kubernetes Network Policies in AKS?
    a) To manage container scaling
    b) To define how pods interact with each other
    c) To monitor container health
    d) To configure Azure Active Directory
  8. How are pod security controls typically implemented in AKS?
    a) By using Kubernetes namespaces
    b) Through Network Security Groups
    c) With Pod Security Policies
    d) By integrating with Azure AD
  9. Which protocol is commonly used in securing pod-to-pod communications in AKS?
    a) HTTPS
    b) TCP
    c) SSH
    d) IPSec
  10. What is a common method for enforcing security policies for containers in AKS?
    a) Regular patch updates
    b) Using Azure Security Center for image scanning
    c) Limiting access to control plane resources
    d) Scaling pods automatically

Answer Key

QnoAnswer
1b) Authentication and identity management
2a) Multi-tenant access management
3b) A Service Principal
4a) Through role-based access control
5b) Service principal
6b) To define user permissions to resources
7b) A set of permissions within a specific namespace
8d) No access
9b) A set of permissions across all namespaces in the cluster
10b) By associating them with an Azure AD group
11b) To control inbound and outbound traffic
12b) Defines network traffic rules for pods
13a) By filtering traffic based on IP and port
14a) IP address range and port filtering
15b) Pod-to-pod communication control
16b) To manage container images and secrets
17b) Image scanning for vulnerabilities
18a) By scanning for known vulnerabilities
19c) Authenticate AKS with ACR
20a) Role-based access control for images
21b) To define security controls for running pods
22c) Usage of privileged containers
23a) Pod communication within a namespace
24a) By preventing unauthorized pod-to-pod communication
25c) Open (unrestricted)
26c) Azure Network Policies
27b) To define how pods interact with each other
28c) With Pod Security Policies
29d) IPSec
30b) Using Azure Security Center for image scanning

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top