Skip to content

Commit 0e16daf

Browse files
authored
Revamped + Restructured Ingress Setup Doc (#5798)
1 parent 654ba93 commit 0e16daf

File tree

1 file changed

+78
-21
lines changed

1 file changed

+78
-21
lines changed

docs/setup/install/ingress-setup.md

Lines changed: 78 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,33 @@
11
# Ingress Setup
22

3-
## Enable Ingress During Installation
3+
## Introduction
44

5-
To configure Ingress for a Helm chart during installation or upgrade, you can use the `--set` flag to specify the desired Ingress settings. Below is a guide on how to add Ingress, including optional labels, annotations, and TLS settings.
5+
If you wish to use [Ingress](https://kubernetes.io/docs/concepts/services-networking/ingress/) as a means to access the Devtron services available in your cluster, you can configure it either during the installation or after the installation of Devtron.
66

7-
### Basic Ingress Configuration
7+
Refer the section relevant to you:
8+
* [During Devtron Installation](#enabling-ingress-during-devtron-installation)
9+
* [After Devtron Installation](#configuring-ingress-after-devtron-installation)
10+
11+
If you have successfully configured Ingress, refer [Post Ingress Setup](#enable-https-for-devtron).
12+
13+
---
14+
15+
## Enabling Ingress during Devtron Installation
16+
17+
If you are installing Devtron, you can enable Ingress either via [set flag](#using-set-flag) or by using [values.yaml](#using-valuesyaml) to specify the desired Ingress settings.
18+
19+
### Using set flag
20+
21+
You can use the `--set` flag to specify the desired Ingress settings.
22+
23+
Here, we have added 5 configurations you can perform depending on your requirements:
24+
* [Only Basic Configuration](#only-basic-configuration)
25+
* [Configuration Including Labels](#configuration-including-labels)
26+
* [Configuration Including Annotations](#configuration-including-annotations)
27+
* [Configuration Including TLS Settings](#configuration-including-tls-settings)
28+
* [Comprehensive Configuration](#comprehensive-configuration)
29+
30+
#### Only Basic Configuration
831

932
To enable Ingress and set basic parameters, use the following command:
1033

@@ -15,7 +38,7 @@ helm install devtron devtron/devtron-operator -n devtroncd \
1538
--set components.devtron.ingress.host=devtron.example.com
1639
```
1740

18-
### Adding Labels
41+
#### Configuration Including Labels
1942

2043
To add labels to the Ingress resource, use the following command:
2144

@@ -27,7 +50,7 @@ helm install devtron devtron/devtron-operator -n devtroncd \
2750
--set components.devtron.ingress.labels.env=production
2851
```
2952

30-
### Adding Annotations
53+
#### Configuration Including Annotations
3154

3255
To add annotations to the Ingress resource, use the following command:
3356

@@ -40,7 +63,7 @@ helm install devtron devtron/devtron-operator -n devtroncd \
4063
--set components.devtron.ingress.annotations."nginx\.ingress\.kubernetes\.io\/app-root"="/dashboard"
4164
```
4265

43-
### Configuring TLS
66+
#### Configuration Including TLS Settings
4467

4568
To configure TLS settings, including `secretName` and `hosts`, use the following command:
4669

@@ -53,12 +76,12 @@ helm install devtron devtron/devtron-operator -n devtroncd \
5376
--set components.devtron.ingress.tls[0].hosts[0]=devtron.example.com
5477
```
5578

56-
### Comprehensive Configuration
79+
#### Comprehensive Configuration
5780

5881
To include all the above settings in a single command, use:
5982

6083
```bash
61-
helm upgrade devtron devtron/devtron-operator -n devtroncd \
84+
helm install devtron devtron/devtron-operator -n devtroncd \
6285
--set components.devtron.ingress.enabled=true \
6386
--set components.devtron.ingress.className=nginx \
6487
--set components.devtron.ingress.host=devtron.example.com \
@@ -70,17 +93,52 @@ helm upgrade devtron devtron/devtron-operator -n devtroncd \
7093
--set components.devtron.ingress.tls[0].hosts[0]=devtron.example.com
7194
```
7295

73-
After Devtron is installed, Devtron is accessible through service `devtron-service`.
74-
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:
96+
97+
### Using ingress-values.yaml
98+
99+
As an alternative to the [set flag](#using-set-flag) method, you can enable Ingress using `ingress-values.yaml` instead.
100+
101+
Create an `ingress-values.yaml` file. You may refer the below format for an advanced ingress configuration which includes labels, annotations, secrets, and many more.
102+
103+
```yml
104+
components:
105+
devtron:
106+
ingress:
107+
enabled: true
108+
className: nginx
109+
labels: {}
110+
# env: production
111+
annotations: {}
112+
# nginx.ingress.kubernetes.io/app-root: /dashboard
113+
pathType: ImplementationSpecific
114+
host: devtron.example.com
115+
tls: []
116+
# - secretName: devtron-info-tls
117+
# hosts:
118+
# - devtron.example.com
119+
```
120+
121+
Once you have the `ingress-values.yaml` file ready, run the following command:
122+
123+
```bash
124+
helm install devtron devtron/devtron-operator -n devtroncd --reuse-values -f ingress-values.yaml
125+
```
126+
127+
---
128+
129+
## Configuring Ingress after Devtron Installation
130+
131+
After Devtron is installed, Devtron is accessible through `devtron-service`. If you wish to access Devtron through ingress, you'll need to modify this service to use a ClusterIP instead of a LoadBalancer.
132+
133+
You can do this using the `kubectl patch` command:
75134

76135
```bash
77136
kubectl patch -n devtroncd svc devtron-service -p '{"spec": {"ports": [{"port": 80,"targetPort": "devtron","protocol": "TCP","name": "devtron"}],"type": "ClusterIP","selector": {"app": "devtron"}}}'
78137
```
79138

80-
After this, create ingress by applying the ingress yaml file.
81-
You can use [this yaml file](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress.yaml) to create ingress to access Devtron:
139+
Next, create ingress to access Devtron by applying the `devtron-ingress.yaml` file. The file is also available on this [link](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress.yaml). You can access Devtron from any host after applying this yaml.
82140

83-
```yaml
141+
```yml
84142
apiVersion: networking.k8s.io/v1
85143
kind: Ingress
86144
metadata:
@@ -119,9 +177,9 @@ spec:
119177
pathType: ImplementationSpecific
120178
```
121179
122-
You can access Devtron from any host after applying this yaml. For k8s versions <1.19, [apply this yaml](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress-legacy.yaml):
180+
For k8s versions < 1.19, [apply this yaml](https://github.com/devtron-labs/devtron/blob/main/manifests/yamls/devtron-ingress-legacy.yaml):
123181
124-
```yaml
182+
```yml
125183
apiVersion: extensions/v1beta1
126184
kind: Ingress
127185
metadata:
@@ -149,7 +207,7 @@ spec:
149207
150208
Optionally, you also can access Devtron through a specific host by running the following YAML file:
151209
152-
```yaml
210+
```yml
153211
apiVersion: networking.k8s.io/v1
154212
kind: Ingress
155213
metadata:
@@ -189,9 +247,11 @@ spec:
189247
pathType: ImplementationSpecific
190248
```
191249
250+
---
251+
192252
## Enable HTTPS For Devtron
193253
194-
Once ingress setup for devtron is done and you want to run Devtron over `https`, you need to add different annotations for different ingress controllers and load balancers.
254+
Once Ingress setup for Devtron is done and you want to run Devtron over `https`, you need to add different annotations for different ingress controllers and load balancers.
195255

196256
### 1. Nginx Ingress Controller
197257

@@ -245,7 +305,4 @@ In case of AWS application load balancer, the following annotations need to be a
245305
```
246306
For an Ingress resource to be observed by AGIC (Application Gateway Ingress Controller) must be annotated with kubernetes.io/ingress.class: azure/application-gateway. Only then AGIC will work with the Ingress resource in question.
247307

248-
> Note: Make sure NOT to use port 80 with HTTPS and port 443 with HTTP on the Pods.
249-
250-
251-
308+
> Note: Make sure NOT to use port 80 with HTTPS and port 443 with HTTP on the Pods.

0 commit comments

Comments
 (0)