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

Figure 11-21. Creating and listing a ConfigMap storing key/value pairs

Next, consume the ConfigMap in a pod. Create a volume of type ConfigMap from the nginx-cert

ConfigMap. Mount the volume in the pod at some directory cert from which the certificate can be retrieved,

such as /etc/config/.

---

apiVersion: v1

kind: Pod

metadata:

name: configmap-volume

spec:

containers:

-

image: nginx

name: nginx

volumeMounts:

-

275

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

Saved successfully!

Ooh no, something went wrong!