Add Environment VariablesΒΆ
ProblemΒΆ
Applications frequently rely on environment variables for runtime configuration.
These values must be injected into containers at runtime.
Step 1 β Define Environment VariablesΒΆ
Update container configuration.
deployment.yaml
Full example:
containers:
- name: app
image: nginx
env:
- name: APP_ENV
value: production
- name: LOG_LEVEL
value: info
Step 2 β Apply DeploymentΒΆ
Run:
Step 3 β Verify VariablesΒΆ
Enter container.
Check:
Expected: