Chapter 3. Configuration

The domain “configuration” of the curriculum covers advanced concepts used to configure a Pod. This chapter will discuss all relevant Kubernetes primitives and their purpose with the help of a concrete use case.

As demonstrated in the previous chapter, controlling runtime behavior using environment variables is common practice. Having to deal with a long list of environment variables by defining them for individual containers can quickly become tedious, especially if you want to reuse some of those key-value pairs across a set of Pods. ConfigMaps and Secrets help with centralizing configuration data and can be injected into containers.

Furthermore, this chapter discusses security and resource consumption concerns. You can define a security context to define privilege and access control settings. Every namespace can limit the amount of resources like CPU and memory available to Pods. At the end of the chapter, you will understand how to create and inspect a ResourceQuota and how to set minimum and maximum resource boundaries for a Pod. Finally, we’ll touch on the configuration needed to assign a Service Account to a Pod.

Note

This chapter will use the concept of a Volume. Reference Chapter 8 for more information if you’re not familiar with Kubernetes’ persistent storage options.

At a high level, this chapter covers the following concepts:

  • ConfigMap

  • Secret

  • Volume

  • Security Context

  • Resource Boundaries

  • ResourceQuota

  • Service Account

Defining ...

Get Certified Kubernetes Application Developer (CKAD) Study Guide 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.