Skip to content

Instantly share code, notes, and snippets.

@Mirage20
Created October 31, 2019 11:15
Show Gist options
  • Select an option

  • Save Mirage20/0b2d3f555dc8b6f89717b30994506d22 to your computer and use it in GitHub Desktop.

Select an option

Save Mirage20/0b2d3f555dc8b6f89717b30994506d22 to your computer and use it in GitHub Desktop.
Todo Service - Microservice Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: todos
version: v1.0.0
name: todos-deployment
spec:
replicas: 1
selector:
matchLabels:
app: todos
version: v1.0.0
template:
metadata:
labels:
app: todos
version: v1.0.0
spec:
containers:
- env:
- name: PORT
value: "8080"
- name: DATABASE_HOST
value: todos-mysql-db-service
- name: DATABASE_PORT
value: "3306"
- name: DATABASE_CREDENTIALS_PATH
value: /credentials
- name: DATABASE_NAME
value: todos_db
image: docker.io/mirage20/samples-todoapp-todos:latest
name: todos
ports:
- containerPort: 8080
protocol: TCP
volumeMounts:
- mountPath: /credentials
name: db-credentials
volumes:
- name: db-credentials
secret:
secretName: todos-db-credentials
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment