-
Notifications
You must be signed in to change notification settings - Fork 3
/
jenk-kube.yml
64 lines (63 loc) · 1.14 KB
/
jenk-kube.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jenk-kube-container-pvc
labels:
app: container
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
---
---
apiVersion: v1
kind: Service
metadata:
name: jenk-kube-svc
labels:
app: container
spec:
ports:
- nodePort: 30000
port: 8080
targetPort: 8080
selector:
app: container
env: redhat
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jenk-kube-dep
labels:
app: container
spec:
selector:
matchLabels:
app: container
env: redhat
strategy:
type: Recreate
template:
metadata:
labels:
app: container
env: redhat
spec:
containers:
- image: suhani15/jenk-kube:v1
name: jenk-kube-deploy
ports:
- containerPort: 8080
name: jenk-kube-dep
volumeMounts:
- name: jenk-kube-deploy-persistent-storage
mountPath: /root/projects/jenkins/
volumes:
- name: jenk-kube-deploy-persistent-storage
persistentVolumeClaim:
claimName: jenk-kube-container-pvc