|
| 1 | +### YamlMime:ModuleUnit |
| 2 | +uid: learn.wwl.configure-apps-azure-kubernetes-service.module-assessment |
| 3 | +title: Module assessment |
| 4 | +metadata: |
| 5 | + title: Module Assessment |
| 6 | + description: Module assessment |
| 7 | + ms.date: 12/16/2025 |
| 8 | + author: jeffkoms |
| 9 | + ms.author: jeffko |
| 10 | + ms.topic: unit |
| 11 | +azureSandbox: false |
| 12 | +durationInMinutes: 5 |
| 13 | +content: | |
| 14 | +quiz: |
| 15 | + questions: |
| 16 | + - content: "You need to store a database connection string for your application running on AKS. The connection string contains a password and shouldn't be visible in your source code repository. Which Kubernetes resource should you use?" |
| 17 | + choices: |
| 18 | + - content: "ConfigMap, because it stores configuration data" |
| 19 | + isCorrect: false |
| 20 | + explanation: "ConfigMaps are designed for nonsensitive configuration. While they keep data out of container images, they shouldn't be used for credentials or passwords." |
| 21 | + - content: "Secret, because it stores sensitive values and keeps credentials out of source control" |
| 22 | + isCorrect: true |
| 23 | + explanation: "Secrets are the correct choice for storing sensitive values like connection strings with passwords. They keep credentials out of source control and can be protected with RBAC policies." |
| 24 | + - content: "PersistentVolumeClaim, because it provides storage for application data" |
| 25 | + isCorrect: false |
| 26 | + explanation: "PersistentVolumeClaims provide durable filesystem storage, not a mechanism for storing and injecting credentials into Pods." |
| 27 | + - content: "Your AI application reads feature flags and service endpoints from environment variables. You want to update these settings without rebuilding your container image. How should you inject these nonsensitive values into your Pods?" |
| 28 | + choices: |
| 29 | + - content: "Create a ConfigMap with the settings and reference the keys using configMapKeyRef in the Deployment" |
| 30 | + isCorrect: true |
| 31 | + explanation: "ConfigMaps are designed for nonsensitive configuration. Using configMapKeyRef lets you inject values as environment variables and update them without rebuilding images." |
| 32 | + - content: "Store the values in a Secret and mount it as a volume" |
| 33 | + isCorrect: false |
| 34 | + explanation: "While this would work technically, Secrets are intended for sensitive data. ConfigMaps are the appropriate resource for nonsensitive configuration like feature flags." |
| 35 | + - content: "Hardcode the values in the Deployment manifest and update the manifest when settings change" |
| 36 | + isCorrect: false |
| 37 | + explanation: "Hardcoding values in the Deployment manifest couples configuration to the deployment definition. ConfigMaps let you change settings independently of the Deployment." |
| 38 | + - content: "You create a PersistentVolumeClaim in your AKS cluster. What happens when you apply the PVC manifest?" |
| 39 | + choices: |
| 40 | + - content: "You must manually create an Azure Disk in the Azure portal before the PVC can bind" |
| 41 | + isCorrect: false |
| 42 | + explanation: "AKS StorageClasses handle dynamic provisioning automatically. You don't need to manually create Azure storage resources." |
| 43 | + - content: "AKS uses the specified StorageClass to automatically provision Azure storage that backs the PVC" |
| 44 | + isCorrect: true |
| 45 | + explanation: "AKS includes preconfigured StorageClasses that dynamically provision Azure Disk or Azure Files resources when you create a PVC. No manual storage creation is required." |
| 46 | + - content: "The PVC remains unbound until you create a matching PersistentVolume manifest" |
| 47 | + isCorrect: false |
| 48 | + explanation: "With dynamic provisioning through StorageClasses, you don't need to manually create PersistentVolume manifests. AKS creates them automatically." |
| 49 | + - content: "Your application needs to access API keys stored in a Kubernetes Secret. You want to make the keys available as environment variables in the container. Which field should you use in the Deployment manifest to reference the Secret?" |
| 50 | + choices: |
| 51 | + - content: "valueFrom with secretKeyRef" |
| 52 | + isCorrect: true |
| 53 | + explanation: "The valueFrom field with secretKeyRef is the correct way to inject Secret values as environment variables. This resolves the Secret key at Pod start time." |
| 54 | + - content: "Volumes with secret type" |
| 55 | + isCorrect: false |
| 56 | + explanation: "This approach mounts the Secret as files in the container filesystem, not as environment variables. Use this when your application reads secrets from files." |
| 57 | + - content: "configMapKeyRef pointing to the Secret name" |
| 58 | + isCorrect: false |
| 59 | + explanation: "configMapKeyRef is used to reference ConfigMaps, not Secrets. You must use secretKeyRef to reference Secret keys." |
| 60 | + - content: "You need to decide between mounting a ConfigMap as environment variables or as files. Your application reads a JSON configuration file at startup. Which approach should you choose?" |
| 61 | + choices: |
| 62 | + - content: "Mount the ConfigMap as environment variables because all applications can read environment variables" |
| 63 | + isCorrect: false |
| 64 | + explanation: "While applications can read environment variables, this approach doesn't provide a JSON file on disk. The application expects a file, not environment variables." |
| 65 | + - content: "Mount the ConfigMap as files using a volume so the JSON file appears on disk where the application expects it" |
| 66 | + isCorrect: true |
| 67 | + explanation: "When an application expects configuration files on disk, mount the ConfigMap as a volume. Each key becomes a file in the mount directory." |
| 68 | + - content: "Store the JSON content in a Secret and use secretKeyRef to inject it as an environment variable" |
| 69 | + isCorrect: false |
| 70 | + explanation: "This approach doesn't match the requirement. The application needs a file on disk, not an environment variable. Also, Secrets are for sensitive data, and this appears to be nonsensitive configuration." |
0 commit comments