19.06.2021 Views

148422597X Kubernetes Management Design Patterns [Vohra 2017-01-29] {E559F6BB}

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 11 ■ Using ConfigMaps

mountPath: /etc/config/cert

name: config-volume

readOnly: true

volumes:

-

configMap:

name: nginx-cert

name: config-volume

The pod definition file is shown in the vi editor in Figure 11-22.

Figure 11-22. Pod consuming a ConfigMap in a volume mount

Create a pod from the definition file and list the pods as shown in Figure 11-23.

Figure 11-23. Creating and listing a pod

Describe the pod to list the volume of type ConfigMap as shown in Figure 11-24.

276

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!