kubernetes deployment define env for different stages code example
Example: kubernetes deployment environment variables
apiVersion: apps/v1
kind: Deployment
metadata:
name: envar-demo
spec:
replicas: 1
template:
spec:
containers:
- name: envar-demo-container
image: gcr.io/google-samples/node-hello:1.0
env:
- name: DEMO_GREETING
value: "Hello from the environment"
- name: DEMO_FAREWELL
value: "Such a sweet sorrow"