Bird
0
0

Given this pod volume mount snippet, what file content will appear inside the container at /etc/config/app.properties if the ConfigMap app-config has a key app.properties with value mode=production?

medium📝 Command Output Q13 of 15
Kubernetes - ConfigMaps
Given this pod volume mount snippet, what file content will appear inside the container at /etc/config/app.properties if the ConfigMap app-config has a key app.properties with value mode=production?
volumes:
  - name: config-volume
    configMap:
      name: app-config
containers:
  - name: app
    image: myapp
    volumeMounts:
      - name: config-volume
        mountPath: /etc/config
        readOnly: true
AA directory named app.properties with no content
BNo file created because mountPath is a directory
CA file named app.properties with content 'mode=production'
DA file named app.properties with content 'mode=development'
Step-by-Step Solution
Solution:
  1. Step 1: Understand ConfigMap key to file mapping

    Each key in ConfigMap becomes a file with that name and its value as content.
  2. Step 2: Check mountPath and file presence

    Mounting at /etc/config creates files inside that directory, including app.properties with content mode=production.
  3. Final Answer:

    A file named app.properties with content 'mode=production' -> Option C
  4. Quick Check:

    ConfigMap key = filename, value = file content [OK]
Quick Trick: ConfigMap keys become files with their values inside mountPath [OK]
Common Mistakes:
  • Thinking mountPath must be a file, not directory
  • Assuming file content changes without ConfigMap update
  • Confusing file name with directory

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes