This commit is contained in:
2024-02-20 17:15:27 +08:00
committed by huty
parent 6706e1a633
commit 34158042ad
1529 changed files with 177765 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: todo-web
labels:
kiamol: ch20
spec:
ports:
- port: 8020
targetPort: 80
selector:
app: todo-list
component: web
type: LoadBalancer

View File

@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: todo-web
labels:
kiamol: ch20
spec:
selector:
matchLabels:
app: todo-list
component: web
template:
metadata:
labels:
app: todo-list
component: web
spec:
containers:
- name: web
image: kiamol/ch20-todo-list
volumeMounts:
- name: config
mountPath: "/app/config"
readOnly: true
- name: secret
mountPath: "/app/secrets"
readOnly: true
volumes:
- name: config
configMap:
name: todo-list-config
items:
- key: config.json
path: config.json
- name: secret
secret:
secretName: todo-list-secret
defaultMode: 0400
items:
- key: secrets.json
path: secrets.json