Kubernetes ConfigMaps Volume Mount issue Kubernetes ConfigMaps Volume Mount issue kubernetes kubernetes

Kubernetes ConfigMaps Volume Mount issue


In your case this should fit well:

apiVersion: v1kind: Podmetadata:  name: test-webspec:  containers:    - name: test-web      image: docker.io/hello-world      volumeMounts:      - name: config-volume-1        mountPath: /usr/test1      - name: config-volume-2        mountPath: /usr/test2  volumes:    - name: config-volume-1      configMap:        name: test-config-map        items:        - key: application.properties           path: test-web    - name: config-volume-2      configMap:        name: test-config-map        items:        - key: test.xml          path: test-web/configs/test_config  restartPolicy: Never

Reference is at: https://kubernetes.io/docs/tasks/configure-pod-container/configure-pod-configmap/