-
Notifications
You must be signed in to change notification settings - Fork 0
/
jenkins.yaml
54 lines (54 loc) · 1.06 KB
/
jenkins.yaml
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
apiVersion: apps/v1
kind: Deployment
metadata:
name: jenkins-deployment
labels:
app: jenkins
spec:
replicas: 1
selector:
matchLabels:
app: jenkins
template:
metadata:
labels:
app: jenkins
spec:
containers:
- name: jenkins
image: anguda/jenkins:automatic-setup
env:
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
- name: JENKINS_ADMIN_ID
value: admin
- name: JENKINS_ADMIN_PASSWORD
value: admin
- name: JENKINS_URL
value: "http://$(HOST_IP):31050"
ports:
- containerPort: 8080
name: master
- containerPort: 50000
name: slave
---
apiVersion: v1
kind: Service
metadata:
name: jenkins-service
spec:
selector:
app: jenkins
ports:
- protocol: TCP
port: 8080
targetPort: 8080
nodePort: 31050
name: master
- port: 50000
targetPort: 50000
nodePort: 31051
name: slave
type: NodePort