This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
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?
ConfigMap, because it stores configuration data
Secret, because it stores sensitive values and keeps credentials out of source control
PersistentVolumeClaim, because it provides storage for application data
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?
Create a ConfigMap with the settings and reference the keys using configMapKeyRef in the Deployment
Store the values in a Secret and mount it as a volume
Hardcode the values in the Deployment manifest and update the manifest when settings change
You create a PersistentVolumeClaim in your AKS cluster. What happens when you apply the PVC manifest?
You must manually create an Azure Disk in the Azure portal before the PVC can bind
AKS uses the specified StorageClass to automatically provision Azure storage that backs the PVC
The PVC remains unbound until you create a matching PersistentVolume manifest
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?
valueFrom with secretKeyRef
Volumes with secret type
configMapKeyRef pointing to the Secret name
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?
Mount the ConfigMap as environment variables because all applications can read environment variables
Mount the ConfigMap as files using a volume so the JSON file appears on disk where the application expects it
Store the JSON content in a Secret and use secretKeyRef to inject it as an environment variable
You must answer all questions before checking your work.
Was this page helpful?
Need help with this topic?
Want to try using Ask Learn to clarify or guide you through this topic?