Kubernetes Patterns Environment Variable-Based Configuration: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 12: Line 12:
* Dockerfile [[Dockerfile#ENV|<code>ENV</code> directive]].
* Dockerfile [[Dockerfile#ENV|<code>ENV</code> directive]].
* As [[Dockerfile#Env_Override|command line override]] when running the container.
* As [[Dockerfile#Env_Override|command line override]] when running the container.
* As hardcoded environment variable values in Kubernetes Pod, <code[[Kubernetes_Pod_Manifest#env|spec.containers[*].env]]</code>, Deployment or ReplicaSet manifest files.

Revision as of 18:55, 28 February 2024

External

Internal

Overview

Environment variables are universally supported and suited for configuration values that are small in size. Every operating systems allows definition of environment variable, and every programming language allows easy access to these environment variables.

As long as the application is coded to expect configuration as environment variables, the actual values of those environment variables can be provided in different layers: