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
{{ message }}
This repository was archived by the owner on Mar 14, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/content/tutorials/kic/deploy-with-kic.md
+2-13Lines changed: 2 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -232,27 +232,16 @@ If you deploy NGINX Ingress Controller without mTLS enabled, the internal routes
232
232
We do not recommend using the egress feature with a plaintext deployment of NGINX Ingress Controller.
233
233
{{< /caution >}}
234
234
235
-
To generate an internal route, create an [Ingress resource](https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/) or [VirtualServer resource](https://docs.nginx.com/nginx-ingress-controller/configuration/virtualserver-and-virtualserverroute-resources/) using the information for your non-meshed service.
236
-
237
-
Add the following configuration, depending on the type of resource you created:
238
-
239
-
- For an Ingress resource, add the following annotation to the resource definition:
235
+
To create an internal route, create an [Ingress resource](https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/) using the information of your non-meshed service and add the following annotation:
240
236
241
237
```bash
242
238
nsm.nginx.com/internal-route: "true"
243
239
```
244
240
245
-
- For a VirtualServer resource, add the following field to the custom resource definition:
246
-
247
-
```yaml
248
-
spec:
249
-
internalRoute: true
250
-
```
251
-
252
241
If your non-meshed service is external to Kubernetes, follow the [ExternalName services example](https://github.com/nginxinc/kubernetes-ingress/tree/main/examples/custom-resources/externalname-services).
253
242
254
243
{{<note>}}
255
-
The `nsm.nginx.com/internal-route: "true"` Ingress annotation or `internalRoute: true` VirtualServer field is still required for routing to external endpoints.
244
+
The `nsm.nginx.com/internal-route: "true"` Ingress annotation is still required for routing to external endpoints.
256
245
{{</note>}}
257
246
258
247
The [NGINX Ingress Controller egress tutorial]({{< ref "/tutorials/kic/egress-walkthrough.md" >}}) provides instructions for creating internal routes for non-meshed services.
Copy file name to clipboardExpand all lines: docs/content/tutorials/kic/egress-walkthrough.md
+21-43Lines changed: 21 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -161,26 +161,17 @@ The sidecar proxy will route egress traffic to the NGINX Ingress Controller's Po
161
161
162
162
### Create an internal route to the legacy target service
163
163
164
-
To create an internal route from the NGINX Ingress Controller to the legacy `target` Service, we need to create either:
165
-
166
-
- an Ingress resource with the annotation `nsm.nginx.com/internal-route: "true"`.
167
-
- a VirtualServer resource with the following field added to the custom resource definition:
168
-
169
-
```yaml
170
-
spec:
171
-
internalRoute: true
172
-
```
164
+
To create an internal route from the NGINX Ingress Controller to the legacy `target` Service, we need to create
165
+
an Ingress resource with the annotation `nsm.nginx.com/internal-route: "true"`.
173
166
174
167
{{< tip >}}
175
-
For this tutorial, the legacy Service is deployed in Kubernetes so the host name of the Ingress/VirtualServer resource is the Kubernetes
168
+
For this tutorial, the legacy Service is deployed in Kubernetes so the host name of the Ingress resource is the Kubernetes
176
169
DNS name.
177
170
178
171
To create internal routes to services outside of the cluster, refer to [creating internal routes]( {{< ref "/tutorials/kic/deploy-with-kic.md#create-internal-routes-for-non-meshed-services" >}} ).
179
172
{{< /tip >}}
180
173
181
-
Either copy and apply the Ingress or VirtualServer resource shown below, or download and apply the linked file.
182
-
183
-
Ingress:
174
+
Either copy and apply the Ingress resource shown below, or download and apply the `target-internal-route.yaml` file.
184
175
185
176
{{< important >}}
186
177
If using Kubernetes v1.18.0 or greater you must use `ingressClassName` in your Ingress resources. Uncomment line 9 in the resource below or the downloaded file, `target-internal-route.yaml`.
@@ -212,40 +203,27 @@ spec:
212
203
number: 80
213
204
```
214
205
215
-
VirtualServer:
216
-
217
-
- {{< fa "download" >}} {{< link "/examples/nginx-ingress-controller/target-vs-internal-route.yaml" "nginx-ingress-controller/target-vs-internal-route.yaml" >}}
218
-
219
-
```yaml
220
-
apiVersion: k8s.nginx.org/v1
221
-
kind: VirtualServer
222
-
metadata:
223
-
name: target-vs-internal-route
224
-
namespace: legacy
225
-
spec:
226
-
internalRoute: true
227
-
ingressClassName: nginx
228
-
host: target-v1-0.legacy
229
-
upstreams:
230
-
- name: legacy
231
-
tls:
232
-
enable: false
233
-
service: target-v1-0
234
-
port: 80
235
-
routes:
236
-
- path: /
237
-
action:
238
-
pass: legacy
239
-
```
240
-
241
-
Verify the Ingress or VirtualServer resource has been created:
Normal ADD <invalid> loadbalancer-controller legacy/target-internal-route
225
+
Normal AddedOrUpdated <invalid> (x2 over <invalid>) nginx-ingress-controller Configuration for legacy/target-internal-route was added or updated
226
+
Warning Translate <invalid> (x11 over <invalid>) loadbalancer-controller error while evaluating the ingress spec: service "legacy/target-v1-0" is type "ClusterIP", expected "NodePort" or "LoadBalancer"
249
227
```
250
228
251
229
### Allow the egress-driver application to route egress traffic to NGINX Ingress Controller
0 commit comments