Hi @Mumshad Mannambeth @Tej_Singh_Rana Posting it again for the confirmation & what exam expects for below question -
• Create a ConfigMap named first-config containing the key/value pair: key1/value1
• start a pod named nginx-config containing a single container using the nginx image, and mount the key you just created into the pod under directory /var/a/path
For this question , what would be the correct answer ?
Provide items seperately to get the value of key1 & how do we make mountPath. Is below correct ?
volumeMounts: - name: config-vol mountPath: /var/a volumes: - name: config-vol configMap: name: first-config items: - key: key1 path: path
No need to provide items seperately.
volumeMounts: - name: config-vol mountPath: /var/a/path volumes: - name: config-vol configMap: name: first-config