新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: todo-proxy-lab-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: todo-proxy-lab
|
||||
labels:
|
||||
app: todo-proxy-lab
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: todo-proxy-lab
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: todo-proxy-lab
|
||||
spec:
|
||||
containers:
|
||||
- image: nginx:1.17-alpine
|
||||
name: nginx
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: config
|
||||
mountPath: "/etc/nginx/"
|
||||
readOnly: true
|
||||
- name: cache-volume
|
||||
mountPath: /data/nginx/cache
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: todo-proxy-lab-configmap
|
||||
- name: cache-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: todo-proxy-lab-pvc
|
||||
@@ -0,0 +1,39 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: todo-web-lab-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 200Mi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: todo-web-lab
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: todo-web-lab
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: todo-web-lab
|
||||
spec:
|
||||
containers:
|
||||
- name: web
|
||||
image: kiamol/ch04-todo-list
|
||||
env:
|
||||
- name: Database__Provider
|
||||
value: Sqlite
|
||||
- name: ConnectionStrings__ToDoDb
|
||||
value: "Filename=/data/todo-list-lab.db"
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /data
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: todo-web-lab-pvc
|
||||
Reference in New Issue
Block a user