You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- The `EXTERNAL-IP` should match your reserved flexible IP (e.g., `195.154.72.226`).
120
-
- If an ephemeral IP appears, verify that the `loadBalancerIP` field is correctly set and matches a valid flexible IP attached to your Scaleway project.
121
-
- Confirm the LoadBalancer in the Scaleway console under **Network > Load Balancers**.
122
-
</Message>
106
+
```bash
107
+
kubectl get svc -n ingress-nginx ingress-nginx-controller
108
+
```
109
+
110
+
You will see an output similar to the following example:
- The `EXTERNAL-IP` should match your reserved flexible IP (e.g., `195.154.72.226`).
117
+
- If an ephemeral IP appears, verify that the `loadBalancerIP` field is correctly set and matches a valid flexible IP attached to your Scaleway project.
118
+
- Confirm the LoadBalancer in the Scaleway console under **Network > Load Balancers**.
119
+
</Message>
123
120
124
121
5. Configure DNS by setting the A-Record of your domain (e.g., `demo.example.com`) to the flexible IP via Scaleway's Domains & DNS product or your DNS provider. Persistent IPs ensure stability and will not change as long as they are reserved.
125
122
126
123
### Deploying a Demo Application
127
-
Deploy a simple web application to test the ingress controller.
128
-
129
-
1. Create a file named `demo-app.yaml` and copy the following content into it:
130
-
131
-
```yaml
132
-
apiVersion: apps/v1
133
-
kind: Deployment
134
-
metadata:
135
-
name: demo-app
136
-
namespace: default
137
-
spec:
138
-
replicas: 2
139
-
selector:
140
-
matchLabels:
141
-
app: demo-app
142
-
template:
143
-
metadata:
144
-
labels:
124
+
125
+
1. Create a file named `demo-app.yaml` and copy the following content into it to deploy a simple web application to test the ingress controller:
126
+
127
+
```yaml
128
+
apiVersion: apps/v1
129
+
kind: Deployment
130
+
metadata:
131
+
name: demo-app
132
+
namespace: default
133
+
spec:
134
+
replicas: 2
135
+
selector:
136
+
matchLabels:
145
137
app: demo-app
146
-
spec:
147
-
containers:
148
-
- name: demo-app
149
-
image: nginx:1.21
150
-
ports:
151
-
- containerPort: 80
152
-
---
153
-
apiVersion: v1
154
-
kind: Service
155
-
metadata:
156
-
name: demo-app
157
-
namespace: default
158
-
spec:
159
-
selector:
160
-
app: demo-app
161
-
ports:
162
-
- protocol: TCP
163
-
port: 80
164
-
targetPort: 80
165
-
---
166
-
apiVersion: networking.k8s.io/v1
167
-
kind: Ingress
168
-
metadata:
169
-
name: demo-app-ingress
170
-
namespace: default
171
-
annotations:
172
-
nginx.ingress.kubernetes.io/rewrite-target: /
173
-
spec:
174
-
ingressClassName: nginx
175
-
rules:
176
-
- host: demo.example.com
177
-
http:
178
-
paths:
179
-
- path: /
180
-
pathType: Prefix
181
-
backend:
182
-
service:
183
-
name: demo-app
184
-
port:
185
-
number: 80
186
-
```
187
-
188
-
<Message type="note">
189
-
- Replace `demo.example.com` with your domain name.
190
-
</Message>
138
+
template:
139
+
metadata:
140
+
labels:
141
+
app: demo-app
142
+
spec:
143
+
containers:
144
+
- name: demo-app
145
+
image: nginx:1.21
146
+
ports:
147
+
- containerPort: 80
148
+
---
149
+
apiVersion: v1
150
+
kind: Service
151
+
metadata:
152
+
name: demo-app
153
+
namespace: default
154
+
spec:
155
+
selector:
156
+
app: demo-app
157
+
ports:
158
+
- protocol: TCP
159
+
port: 80
160
+
targetPort: 80
161
+
---
162
+
apiVersion: networking.k8s.io/v1
163
+
kind: Ingress
164
+
metadata:
165
+
name: demo-app-ingress
166
+
namespace: default
167
+
annotations:
168
+
nginx.ingress.kubernetes.io/rewrite-target: /
169
+
spec:
170
+
ingressClassName: nginx
171
+
rules:
172
+
- host: demo.example.com
173
+
http:
174
+
paths:
175
+
- path: /
176
+
pathType: Prefix
177
+
backend:
178
+
service:
179
+
name: demo-app
180
+
port:
181
+
number: 80
182
+
```
183
+
184
+
<Message type="note">
185
+
- Replace `demo.example.com` with your domain name.
186
+
</Message>
191
187
192
188
2. Apply the configuration:
193
-
```bash
194
-
kubectl apply -f demo-app.yaml
195
-
```
189
+
```bash
190
+
kubectl apply -f demo-app.yaml
191
+
```
196
192
197
193
## Test the Setup
198
194
1. Access the demo application:
199
-
```bash
200
-
curl http://demo.example.com
201
-
# or
202
-
curl http://195.154.72.226/
203
-
```
195
+
```bash
196
+
curl http://demo.example.com
197
+
# or
198
+
curl http://195.154.72.226/
199
+
```
204
200
205
201
2. You should see the NGINX welcome page. Verify the PROXY protocol by checking logs for the client's real IP:
0 commit comments