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: