-
Notifications
You must be signed in to change notification settings - Fork 2
/
deployment.yml
66 lines (64 loc) · 1.24 KB
/
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
apiVersion: v1
kind: Pod
metadata:
name: tunnel
labels:
app: tunneling-label
spec:
nodeName: node1
containers:
- name: tunnel
image: tarjei400/einsteinrosen
imagePullPolicy: Always
ports:
- name: api
containerPort: 3000
- name: http
containerPort: 80
- name: ssh-svc-port
containerPort: 4444
---
kind: Service
apiVersion: v1
metadata:
name: tunnel
spec:
selector:
app: tunneling-label
ports:
- port: 3000
name: api-svc-port
targetPort: api
- port: 80
name: http-svc-port
targetPort: http
- port: 30022
name: ssh-svc-port
protocol: TCP
targetPort: 4444
nodePort: 30022
type: NodePort
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: tunnel
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: "nginx"
spec:
backend:
serviceName: tunnel
servicePort: 80
rules:
- host: '*.tunnel.necronia.com'
http:
paths:
- path: /port
backend:
serviceName: tunnel
servicePort: 3000
- path: /
backend:
serviceName: tunnel
servicePort: 80