configMapKeyRef : name : random-generator-config key : pattern Dependency of a ConfigMap to be present A similar concept to ConfigMaps are Secrets, which offer a slightly more secure way of distributing environment-specific configurations to a container. 1  The way to con‐ sume a Secret is the same as it is for ConfigMap consumption, and it introduces the same kind of dependency from a container to a namespace. While the creation of ConfigMap and Secret objects are simple admin tasks we have to perform, cluster nodes provide storage and port numbers. Some of these depen‐ dencies limit where a Pod gets scheduled (if anywhere at all), and other dependencies may prevent the Pod from starting up. When designing your containerized applica‐ tions with such dependencies, always consider the runtime constraints they will cre‐ ate later. Specifying container dependencies such as ConfigMap, Secret, and volumes is straightforward. We need some more thinking and experimentation for figuring out the resources requirements of a container. Compute resources in the context of Kubernetes are defined as something that can be requested by, allocated to, and con‐ sumed from a container. The resources are categorized as  compressible  (i.e., can be throttled, such as CPU, or network bandwidth) and  incompressible  (i.e., cannot be throttled, such as memory). Making the distinction between compressible and incompressible resources is impor‐ tant. If your containers consume too many compressible resources such as CPU, they are throttled, but if they use too many incompressible resources (such as memory), they are killed (as there is no other way to ask an application to release allocated memory). Based on the nature and the implementation details of your application, you have to specify the minimum amount of resources that are needed (called  requests ) and the maximum amount it can grow up to (the  limits ). Every container definition can specify the amount of CPU and memory it needs in the form of a request and limit. At a high level, the concept of  requests / limits  is similar to soft/hard limits. For example, similarly, we define heap size for a Java application by using the  -Xms  and  - Xmx  command-line options. Resource Profiles 1 We talk more about Secret security in Chapter 19,  Configuration Resource . 18  |  Chapter 2: Predictable Demands