May 2018
Intermediate to advanced
554 pages
13h 51m
English
Projected volume is a way to group multiple volume sources into the same mount point. Currently, it supports Secrets, ConfigMap, and downwardAPI.
The following is an example of how we group the examples of Secrets and ConfigMaps that we used in this chapter:
// using projected volume# cat 2-7-5_projected_volume.yamlapiVersion: v1kind: Podmetadata: name: projected-volume-examplespec: containers: - name: container-tes image: ubuntu command: ["/bin/sh", "-c", "while : ;do cat /projected-volume/configmap && cat /projected-volume/token; sleep 10; done"] volumeMounts: - name: projected-volume mountPath: "/projected-volume" volumes: - name: projected-volume projected: sources: - secret: name: access-token ...
Read now
Unlock full access