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
This commit changes the example YAML code block to single-source the
contents from the actual GitHub code. It also updates some parts of the
page structure to match contemporary style conventions.
Copy file name to clipboardExpand all lines: site/content/configuration/ingress-resources/basic-configuration.md
+20-38Lines changed: 20 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,43 +1,15 @@
1
1
---
2
-
docs: DOCS-593
3
-
doctypes:
4
-
- ''
5
2
title: Basic configuration
6
-
toc: true
7
3
weight: 100
4
+
toc: true
5
+
type: reference
6
+
product: NIC
7
+
docs: DOCS-593
8
8
---
9
9
10
10
This document shows a basic Ingress resource definition for F5 NGINX Ingress Controller. It load balances requests for two services as part of a single application.
Here is a breakdown of what this Ingress resource definition means:
43
15
@@ -55,6 +27,7 @@ To learn more about the Ingress resource, view [the official Kubernetes document
55
27
56
28
{{< note >}} For complete instructions on deploying Ingress and Secret resources in the cluster, see the [complete example](https://github.com/nginx/kubernetes-ingress/tree/v{{< nic-version >}}/examples/ingress-resources/complete-example) in the GitHub repository. {{< /note >}}
57
29
30
+
---
58
31
59
32
## New features available in Kubernetes 1.18
60
33
@@ -63,7 +36,7 @@ Starting from Kubernetes 1.18, you can use the following new features:
63
36
- The host field supports wildcard domain names, such as `*.example.com`.
64
37
- The path supports different matching rules with the new field `pathType`, which takes the following values: `Prefix` for prefix-based matching, `Exact` for exact matching and `ImplementationSpecific`, which is the default type and is the same as `Prefix`. For example:
65
38
66
-
```yaml
39
+
```yaml {hl_lines=[2, 7, 14]}
67
40
- path: /tea
68
41
pathType: Prefix
69
42
backend:
@@ -87,7 +60,7 @@ Starting from Kubernetes 1.18, you can use the following new features:
87
60
88
61
- The `ingressClassName` field is now supported:
89
62
90
-
```yaml
63
+
```yaml {hl_lines=[6]}
91
64
apiVersion: networking.k8s.io/v1
92
65
kind: Ingress
93
66
metadata:
@@ -105,6 +78,8 @@ Starting from Kubernetes 1.18, you can use the following new features:
105
78
106
79
When using this field you need to create the `IngressClass` resource with the corresponding `name`. View the [Create common resources]({{< relref "installation/installing-nic/installation-with-manifests.md#create-common-resources" >}}) section of the Installation with Manifests topic for more information.
107
80
81
+
---
82
+
108
83
## Restrictions
109
84
110
85
NGINX Ingress Controller imposes the following restrictions on Ingress resources:
@@ -114,12 +89,19 @@ NGINX Ingress Controller imposes the following restrictions on Ingress resources
114
89
- The `path` field in `spec.rules[].http.paths[]` is required for `Exact` and `Prefix` `pathTypes`.
115
90
- The ImplementationSpecific `pathType` is treated as equivalent to `Prefix` `pathType`, with the exception that when this `pathType` is configured, the `path` field in `spec.rules[].http.paths[]` is not mandatory. `path` defaults to `/` if not set but the `pathType` is set to ImplementationSpecific.
116
91
92
+
---
93
+
117
94
## Advanced configuration
118
95
119
-
NGINX Ingress Controller generates NGINX configuration by executing a template file that contains the configuration options. These options are set with the Ingress resource and NGINX Ingress Controller's ConfigMap. The Ingress resource only allows you to use basic NGINX features: host and path-based routing and TLS termination.
96
+
NGINX Ingress Controller generates NGINX configuration by executing a template file that contains the configuration options.
97
+
98
+
These options are set with the Ingress resource and NGINX Ingress Controller's ConfigMap.
99
+
100
+
The Ingress resource only allows you to use basic NGINX features: host and path-based routing and TLS termination.
120
101
121
-
Advanced features like rewriting the request URI or inserting additional response headers are available through annotations. View the [Advanced configuration with Annotations]({{< relref "configuration/ingress-resources/advanced-configuration-with-annotations.md" >}}) topic for more information.
102
+
For advanced configuration, you have two options:
122
103
123
-
Advanced NGINX users who require more control over the generated NGINX configurations can use snippets to insert raw NGINX config. View the [Advanced configuration with Snippets]({{< relref "configuration/ingress-resources/advanced-configuration-with-snippets" >}}) topic for more information.
104
+
- [Annotations]({{< ref "/configuration/ingress-resources/advanced-configuration-with-annotations.md" >}}) can be used to rewrite request URIs or inserting additional response headers.
105
+
- [Snippets]({{< ref "/configuration/ingress-resources/advanced-configuration-with-snippets" >}}) can be used to insert raw NGINX configuration, changing generated files.
124
106
125
107
Additionally, it is possible to customize the template, described in the [Custom templates]({{< relref "/configuration/global-configuration/custom-templates.md" >}}) topic.
0 commit comments