2024-08-01 22:03:05 +08:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s.kuboard.cn/name: test
|
|
|
|
name: test
|
|
|
|
spec:
|
|
|
|
replicas: 2
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
k8s.kuboard.cn/name: test
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
k8s.kuboard.cn/name: test
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- image: '10.9.12.201/xingdian/nginx:v1'
|
|
|
|
imagePullPolicy: IfNotPresent
|
|
|
|
name: nginx
|
|
|
|
ports:
|
|
|
|
- containerPort: 80
|
|
|
|
protocol: TCP
|
|
|
|
volumeMounts:
|
|
|
|
- mountPath: /usr/share/nginx/html
|
|
|
|
name: volume-wc3pi
|
|
|
|
restartPolicy: Always
|
|
|
|
terminationGracePeriodSeconds: 30
|
|
|
|
volumes:
|
|
|
|
- name: volume-wc3pi
|
|
|
|
nfs:
|
|
|
|
path: /data/test
|
|
|
|
server: 10.9.12.250
|
|
|
|
|