APP_PORT in this example.
You can also use Helm values to customize your application’s configuration for each environment you wish to create.
DB_USER, DB_PASS, DB_HOST, and DB_PORT are set dynamically during each deployment.apiVersion: apps/v1
kind: Deployment
metadata:
name: acme-api-deployment
spec:
replicas: 3
selector:
matchLabels:
app: acme-api
template:
metadata:
labels:
app: acme-api
spec:
containers:
- name: api-container
image: public.ecr.aws/ach42q1u/acme-api:1.0.0
ports:
- containerPort: 8080
env:
- name: APP_PORT
value: '8080'
- name: DB_USER
value: '{{ .Values.db.user }}'
- name: DB_PASS
value: '{{ .Values.db.pass }}'
- name: DB_HOST
value: '{{ .Values.db.host }}'
- name: DB_PORT
value: '{{ .Values.db.port }}'
APP_PORT in this example.
You can also use Helm values to customize your application’s configuration for each environment you wish to create.
db:
host: postgres-service
user: postgres
pass: postgres
port: 5432
DB_USER, DB_PASS, DB_HOST, and DB_PORT are set dynamically during each deployment.Was this page helpful?