53 lines
1.1 KiB
YAML
53 lines
1.1 KiB
YAML
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: todo-web
|
||
|
spec:
|
||
|
ports:
|
||
|
- port: 8081
|
||
|
targetPort: 80
|
||
|
selector:
|
||
|
app: todo-web
|
||
|
type: LoadBalancer
|
||
|
---
|
||
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: todo-web
|
||
|
spec:
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: todo-web
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: todo-web
|
||
|
spec:
|
||
|
containers:
|
||
|
- name: web
|
||
|
image: kiamol/ch04-todo-list
|
||
|
env:
|
||
|
- name: ASPNETCORE_ENVIRONMENT
|
||
|
value: Test
|
||
|
volumeMounts:
|
||
|
- name: config
|
||
|
mountPath: "/app/config"
|
||
|
readOnly: true
|
||
|
- name: secret
|
||
|
mountPath: "/app/secrets"
|
||
|
readOnly: true
|
||
|
volumes:
|
||
|
- name: config
|
||
|
configMap:
|
||
|
name: todo-web-config
|
||
|
items:
|
||
|
- key: config.json
|
||
|
path: config.json
|
||
|
- name: secret
|
||
|
secret:
|
||
|
secretName: todo-web-secret
|
||
|
defaultMode: 0400
|
||
|
items:
|
||
|
- key: secrets.json
|
||
|
path: secrets.json
|