Ingress setup for devtron installation
After Devtron is installed, Devtron is accessible through service devtron-service. If you want to access devtron through ingress, edit devtron-service and change the loadbalancer to ClusterIP. You can do this using kubectl patch command like :
1
kubectl patch -n devtroncd svc devtron-service -p '{"spec": {"ports": [{"port": 80,"targetPort": "devtron","protocol": "TCP","name": "devtron"}],"type": "ClusterIP","selector": {"app": "devtron"}}}'
Copied!
After that create ingress by applying the ingress yaml file. You can use this yaml file to create ingress to access devtron:
1
apiVersion: networking.k8s.io/v1
2
kind: Ingress
3
metadata:
4
labels:
5
app: devtron
6
release: devtron
7
name: devtron-ingress
8
spec:
9
ingressClassName: nginx
10
rules:
11
- http:
12
paths:
13
- backend:
14
service:
15
name: devtron-service
16
port:
17
number: 80
18
path: /orchestrator
19
pathType: ImplementationSpecific
20
- backend:
21
service:
22
name: devtron-service
23
port:
24
number: 80
25
path: /dashboard
26
pathType: ImplementationSpecific
27
- backend:
28
service:
29
name: devtron-service
30
port:
31
number: 80
32
path: /grafana
33
pathType: ImplementationSpecific
Copied!
You can access devtron from any host after applying this yaml. For k8s versions <1.19, apply this yaml:
1
apiVersion: extensions/v1beta1
2
kind: Ingress
3
metadata:
4
labels:
5
app: devtron
6
release: devtron
7
name: devtron-ingress
8
spec:
9
rules:
10
- http:
11
paths:
12
- backend:
13
serviceName: devtron-service
14
servicePort: 80
15
path: /orchestrator
16
- backend:
17
serviceName: devtron-service
18
servicePort: 80
19
path: /dashboard
20
- backend:
21
service:
22
name: devtron-service
23
port:
24
number: 80
25
path: /grafana
26
pathType: ImplementationSpecific
Copied!
Optionally you also can access devtron through a specific host like :
1
apiVersion: networking.k8s.io/v1
2
kind: Ingress
3
metadata:
4
labels:
5
app: devtron
6
release: devtron
7
name: devtron-ingress
8
spec:
9
ingressClassName: nginx
10
rules:
11
- http:
12
paths:
13
- backend:
14
service:
15
name: devtron-service
16
port:
17
number: 80
18
host: devtron.example.com
19
path: /orchestrator
20
pathType: ImplementationSpecific
21
- backend:
22
service:
23
name: devtron-service
24
port:
25
number: 80
26
Host: devtron.example.com
27
path: /dashboard
28
pathType: ImplementationSpecific
29
- backend:
30
service:
31
name: devtron-service
32
port:
33
number: 80
34
path: /grafana
35
pathType: ImplementationSpecific
Copied!
Export as PDF
Copy link