© Deepak Vohra 2017

Deepak Vohra, Kubernetes Management Design Patterns, 10.1007/978-1-4842-2598-1_11

11. Using ConfigMaps

Deepak Vohra

(1)White Rock, British Columbia, Canada

In Chapter 10 and some earlier chapters, we used the spec: containers: env: field to specify an environment variable for the Docker image mysql for the MySQL database.

Problem

Consider the use case that some environment variables such as username and password for a database are to be used in multiple replication controller or pod definition files. The username and password value would need to be specified in each of the definition files. And if the username and password were to change, all the definition files would need to be updated as well, which could be very tedious. Alternatively, ...

Get Kubernetes Management Design Patterns: With Docker, CoreOS Linux, and Other Platforms now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.