⎈ k8s knowledge compiler

Downward API [glossary]deterministic

A mechanism to expose Pod and container field values to code running in a container.

architectureapiextensibility

Kubernetes' mechanism to expose Pod and container field values to code running in a container.

It is sometimes useful for a container to have information about itself, without needing to make changes to the container code that directly couple it to Kubernetes.

The Kubernetes downward API allows containers to consume information about themselves or their context in a Kubernetes cluster. Applications in containers can have access to that information, without the application needing to act as a client of the Kubernetes API.

There are two ways to expose Pod and container fields to a running container:

  • using [environment variables](/docs/tasks/inject-data-application/environment-variable-expose-pod-information/)
  • using [a `downwardAPI` volume](/docs/tasks/inject-data-application/downward-api-volume-expose-pod-information/)

Together, these two ways of exposing Pod and container fields are called the _downward API_.

Sources

reference/glossary/downward-api.md · docA mechanism to expose Pod and container field values to code running in a container.

Related (4)

references Volumesdownward API conf=1
references PodHostIPsdownward API conf=1
prerequisite_of ConfigMapai-suggested prerequisite conf=0.7
prerequisite_of Secretai-suggested prerequisite conf=0.7

← all Docs