-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeployment.yml
45 lines (45 loc) · 893 Bytes
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nginx-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 512M
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: nginx-static
spec:
template:
metadata:
labels:
app: nginx-static
spec:
volumes:
- name: nginx-static-storage
persistentVolumeClaim:
claimName: nginx-pvc
containers:
- image: docker.io/snimmagadda/nginx-pvc-example:latest
name: nginx-pvc-example
ports:
- containerPort: 8081
name: serve
volumeMounts:
- name: nginx-static-storage
mountPath: /var/www/static
---
apiVersion: v1
kind: Service
metadata:
name: nginx-static-svc
spec:
type: ClusterIP
ports:
- port: 8081
selector:
app: nginx-static