forked from SuhaniArora/jenkins-container_kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webserver.yml
48 lines (48 loc) · 885 Bytes
/
webserver.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
46
47
48
apiVersion: v1
kind: Service
metadata:
name: webserver-httpd
labels:
app: httpd
spec:
ports:
- nodePort: 30002
port: 80
targetPort: 80
selector:
app: httpd
tier: web
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: httpd-web
labels:
app: httpd
spec:
selector:
matchLabels:
app: httpd
tier: web
strategy:
type: Recreate
template:
metadata:
labels:
app: httpd
tier: web
spec:
containers:
- image: vimal13/apache-webserver-php
name: httpd-web
ports:
- containerPort: 80
name: httpd-web
volumeMounts:
- name: httpd-web-persistent-storage
mountPath: /var/www/html
volumes:
- name: httpd-web-persistent-storage
persistentVolumeClaim:
claimName: httpdweb1-pv-claim