70 lines
1.2 KiB
YAML
70 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
labels:
|
|
service: nginx
|
|
name: nginx
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
service: nginx
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
service: nginx
|
|
spec:
|
|
containers:
|
|
- image: nginx
|
|
name: nginx
|
|
ports:
|
|
- containerPort: 8080
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /www/static
|
|
name: nginx-claim0
|
|
- mountPath: /usr/src/app/static
|
|
name: web-data
|
|
restartPolicy: Always
|
|
volumes:
|
|
- name: nginx-claim0
|
|
persistentVolumeClaim:
|
|
claimName: nginx-claim0
|
|
- name: web-data
|
|
persistentVolumeClaim:
|
|
claimName: web-data
|
|
status: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
labels:
|
|
service: nginx
|
|
name: nginx
|
|
spec:
|
|
ports:
|
|
- name: "8080"
|
|
port: 8080
|
|
targetPort: 8080
|
|
selector:
|
|
service: nginx
|
|
status:
|
|
loadBalancer: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
creationTimestamp: null
|
|
labels:
|
|
service: nginx-claim0
|
|
name: nginx-claim0
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 100Mi
|
|
status: {}
|