What is the Downward API?
IntermediateConceptConfiguration & Storage
Answer
It exposes Pod and container metadata to the container without calling the API, as env vars or files: Pod name, namespace, IP, labels, annotations, node name, and resource requests/limits.
env:
- name: POD_NAME
valueFrom: { fieldRef: { fieldPath: metadata.name } }
- name: MEM_LIMIT
valueFrom: { resourceFieldRef: { containerName: app, resource: limits.memory } }
More on Configuration & Storage
What is a ConfigMap and how can a Pod consume it?BeginnerWhat is a Secret and is it secure by default?BeginnerWhat are the common Secret types?BeginnerWhat is a Volume and how does it differ from a container filesystem?BeginnerWhat is `emptyDir` and when is it used?BeginnerWhat are PersistentVolume (PV), PersistentVolumeClaim (PVC) and StorageClass?Beginner