kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch16/todo-list/web.yaml

49 lines
808 B
YAML
Raw Permalink Normal View History

apiVersion: v1
kind: Service
metadata:
name: todo-web
spec:
type: LoadBalancer
ports:
- port: 8019
targetPort: 80
selector:
app: todo-web
---
apiVersion: v1
kind: ConfigMap
metadata:
name: todo-web-config
data:
config.json: |-
{
"Database" : {
"Provider" : "Sqlite"
}
}
---
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
volumeMounts:
- name: config
mountPath: "/app/config"
readOnly: true
volumes:
- name: config
configMap:
name: todo-web-config