Skip to content

Commit 49135ce

Browse files
committed
Tweak line wrappings in /services-networking/ingress.md
1 parent 903aca3 commit 49135ce

File tree

3 files changed

+71
-42
lines changed

3 files changed

+71
-42
lines changed

‎content/en/docs/concepts/security/controlling-access.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ weight: 50
1010
<!-- overview -->
1111
This page provides an overview of controlling access to the Kubernetes API.
1212

13-
1413
<!-- body -->
1514
Users access the [Kubernetes API](/docs/concepts/overview/kubernetes-api/) using `kubectl`,
1615
client libraries, or by making REST requests. Both human users and
@@ -23,11 +22,15 @@ following diagram:
2322

2423
## Transport security
2524

26-
By default, the Kubernetes API server listens on port 6443 on the first non-localhost network interface, protected by TLS. In a typical production Kubernetes cluster, the API serves on port 443. The port can be changed with the `--secure-port`, and the listening IP address with the `--bind-address` flag.
25+
By default, the Kubernetes API server listens on port 6443 on the first non-localhost
26+
network interface, protected by TLS. In a typical production Kubernetes cluster, the
27+
API serves on port 443. The port can be changed with the `--secure-port`, and the
28+
listening IP address with the `--bind-address` flag.
2729

2830
The API server presents a certificate. This certificate may be signed using
2931
a private certificate authority (CA), or based on a public key infrastructure linked
30-
to a generally recognized CA. The certificate and corresponding private key can be set by using the `--tls-cert-file` and `--tls-private-key-file` flags.
32+
to a generally recognized CA. The certificate and corresponding private key can be set
33+
by using the `--tls-cert-file` and `--tls-private-key-file` flags.
3134

3235
If your cluster uses a private certificate authority, you need a copy of that CA
3336
certificate configured into your `~/.kube/config` on the client, so that you can
@@ -65,9 +68,12 @@ users in its API.
6568

6669
## Authorization
6770

68-
After the request is authenticated as coming from a specific user, the request must be authorized. This is shown as step **2** in the diagram.
71+
After the request is authenticated as coming from a specific user, the request must
72+
be authorized. This is shown as step **2** in the diagram.
6973

70-
A request must include the username of the requester, the requested action, and the object affected by the action. The request is authorized if an existing policy declares that the user has permissions to complete the requested action.
74+
A request must include the username of the requester, the requested action, and
75+
the object affected by the action. The request is authorized if an existing policy
76+
declares that the user has permissions to complete the requested action.
7177

7278
For example, if Bob has the policy below, then he can read pods only in the namespace `projectCaribou`:
7379

@@ -83,7 +89,9 @@ For example, if Bob has the policy below, then he can read pods only in the name
8389
}
8490
}
8591
```
86-
If Bob makes the following request, the request is authorized because he is allowed to read objects in the `projectCaribou` namespace:
92+
93+
If Bob makes the following request, the request is authorized because he is
94+
allowed to read objects in the `projectCaribou` namespace:
8795

8896
```json
8997
{
@@ -99,14 +107,25 @@ If Bob makes the following request, the request is authorized because he is allo
99107
}
100108
}
101109
```
102-
If Bob makes a request to write (`create` or `update`) to the objects in the `projectCaribou` namespace, his authorization is denied. If Bob makes a request to read (`get`) objects in a different namespace such as `projectFish`, then his authorization is denied.
103110

104-
Kubernetes authorization requires that you use common REST attributes to interact with existing organization-wide or cloud-provider-wide access control systems. It is important to use REST formatting because these control systems might interact with other APIs besides the Kubernetes API.
111+
If Bob makes a request to write (`create` or `update`) to the objects in the
112+
`projectCaribou` namespace, his authorization is denied. If Bob makes a request
113+
to read (`get`) objects in a different namespace such as `projectFish`, then his authorization is denied.
105114

106-
Kubernetes supports multiple authorization modules, such as ABAC mode, RBAC Mode, and Webhook mode. When an administrator creates a cluster, they configure the authorization modules that should be used in the API server. If more than one authorization modules are configured, Kubernetes checks each module, and if any module authorizes the request, then the request can proceed. If all of the modules deny the request, then the request is denied (HTTP status code 403).
115+
Kubernetes authorization requires that you use common REST attributes to interact
116+
with existing organization-wide or cloud-provider-wide access control systems.
117+
It is important to use REST formatting because these control systems might
118+
interact with other APIs besides the Kubernetes API.
107119

108-
To learn more about Kubernetes authorization, including details about creating policies using the supported authorization modules, see [Authorization](/docs/reference/access-authn-authz/authorization/).
120+
Kubernetes supports multiple authorization modules, such as ABAC mode, RBAC Mode,
121+
and Webhook mode. When an administrator creates a cluster, they configure the
122+
authorization modules that should be used in the API server. If more than one
123+
authorization modules are configured, Kubernetes checks each module, and if
124+
any module authorizes the request, then the request can proceed. If all of
125+
the modules deny the request, then the request is denied (HTTP status code 403).
109126

127+
To learn more about Kubernetes authorization, including details about creating
128+
policies using the supported authorization modules, see [Authorization](/docs/reference/access-authn-authz/authorization/).
110129

111130
## Admission control
112131

‎content/en/docs/concepts/services-networking/ingress.md

Lines changed: 40 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,52 @@ weight: 30
1515
{{< feature-state for_k8s_version="v1.19" state="stable" >}}
1616
{{< glossary_definition term_id="ingress" length="all" >}}
1717

18-
1918
<!-- body -->
2019

2120
## Terminology
2221

2322
For clarity, this guide defines the following terms:
2423

2524
* Node: A worker machine in Kubernetes, part of a cluster.
26-
* Cluster: A set of Nodes that run containerized applications managed by Kubernetes. For this example, and in most common Kubernetes deployments, nodes in the cluster are not part of the public internet.
27-
* Edge router: A router that enforces the firewall policy for your cluster. This could be a gateway managed by a cloud provider or a physical piece of hardware.
28-
* Cluster network: A set of links, logical or physical, that facilitate communication within a cluster according to the Kubernetes [networking model](/docs/concepts/cluster-administration/networking/).
29-
* Service: A Kubernetes {{< glossary_tooltip term_id="service" >}} that identifies a set of Pods using {{< glossary_tooltip text="label" term_id="label" >}} selectors. Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.
25+
* Cluster: A set of Nodes that run containerized applications managed by Kubernetes.
26+
For this example, and in most common Kubernetes deployments, nodes in the cluster
27+
are not part of the public internet.
28+
* Edge router: A router that enforces the firewall policy for your cluster. This
29+
could be a gateway managed by a cloud provider or a physical piece of hardware.
30+
* Cluster network: A set of links, logical or physical, that facilitate communication
31+
within a cluster according to the Kubernetes [networking model](/docs/concepts/cluster-administration/networking/).
32+
* Service: A Kubernetes {{< glossary_tooltip term_id="service" >}} that identifies
33+
a set of Pods using {{< glossary_tooltip text="label" term_id="label" >}} selectors.
34+
Unless mentioned otherwise, Services are assumed to have virtual IPs only routable within the cluster network.
3035

3136
## What is Ingress?
3237

33-
[Ingress](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ingress-v1-networking-k8s-io) exposes HTTP and HTTPS routes from outside the cluster to
38+
[Ingress](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#ingress-v1-networking-k8s-io)
39+
exposes HTTP and HTTPS routes from outside the cluster to
3440
{{< link text="services" url="/docs/concepts/services-networking/service/" >}} within the cluster.
3541
Traffic routing is controlled by rules defined on the Ingress resource.
3642

3743
Here is a simple example where an Ingress sends all its traffic to one Service:
3844

3945
{{< figure src="/docs/images/ingress.svg" alt="ingress-diagram" class="diagram-large" caption="Figure. Ingress" link="https://mermaid.live/edit#pako:eNqNkstuwyAQRX8F4U0r2VHqPlSRKqt0UamLqlnaWWAYJygYLB59KMm_Fxcix-qmGwbuXA7DwAEzzQETXKutof0Ovb4vaoUQkwKUu6pi3FwXM_QSHGBt0VFFt8DRU2OWSGrKUUMlVQwMmhVLEV1Vcm9-aUksiuXRaO_CEhkv4WjBfAgG1TrGaLa-iaUw6a0DcwGI-WgOsF7zm-pN881fvRx1UDzeiFq7ghb1kgqFWiElyTjnuXVG74FkbdumefEpuNuRu_4rZ1pqQ7L5fL6YQPaPNiFuywcG9_-ihNyUkm6YSONWkjVNM8WUIyaeOJLO3clTB_KhL8NQDmVe-OJjxgZM5FhFiiFTK5zjDkxHBQ9_4zB4a-x20EGNSZhyaKmXrg7f5hSsvufUwTMXThtMWiot5Jh6p9ffimHijIezaSVoeN0uiqcfMJvf7w" >}}
4046

41-
An Ingress may be configured to give Services externally-reachable URLs, load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting. An [Ingress controller](/docs/concepts/services-networking/ingress-controllers) is responsible for fulfilling the Ingress, usually with a load balancer, though it may also configure your edge router or additional frontends to help handle the traffic.
47+
An Ingress may be configured to give Services externally-reachable URLs,
48+
load balance traffic, terminate SSL / TLS, and offer name-based virtual hosting.
49+
An [Ingress controller](/docs/concepts/services-networking/ingress-controllers)
50+
is responsible for fulfilling the Ingress, usually with a load balancer, though
51+
it may also configure your edge router or additional frontends to help handle the traffic.
4252

4353
An Ingress does not expose arbitrary ports or protocols. Exposing services other than HTTP and HTTPS to the internet typically
4454
uses a service of type [Service.Type=NodePort](/docs/concepts/services-networking/service/#type-nodeport) or
4555
[Service.Type=LoadBalancer](/docs/concepts/services-networking/service/#loadbalancer).
4656

4757
## Prerequisites
4858

49-
You must have an [Ingress controller](/docs/concepts/services-networking/ingress-controllers) to satisfy an Ingress. Only creating an Ingress resource has no effect.
59+
You must have an [Ingress controller](/docs/concepts/services-networking/ingress-controllers)
60+
to satisfy an Ingress. Only creating an Ingress resource has no effect.
5061

51-
You may need to deploy an Ingress controller such as [ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/). You can choose from a number of
52-
[Ingress controllers](/docs/concepts/services-networking/ingress-controllers).
62+
You may need to deploy an Ingress controller such as [ingress-nginx](https://kubernetes.github.io/ingress-nginx/deploy/).
63+
You can choose from a number of [Ingress controllers](/docs/concepts/services-networking/ingress-controllers).
5364

5465
Ideally, all Ingress controllers should fit the reference specification. In reality, the various Ingress
5566
controllers operate slightly differently.
@@ -68,10 +79,10 @@ An Ingress needs `apiVersion`, `kind`, `metadata` and `spec` fields.
6879
The name of an Ingress object must be a valid
6980
[DNS subdomain name](/docs/concepts/overview/working-with-objects/names#dns-subdomain-names).
7081
For general information about working with config files, see [deploying applications](/docs/tasks/run-application/run-stateless-application-deployment/), [configuring containers](/docs/tasks/configure-pod-container/configure-pod-configmap/), [managing resources](/docs/concepts/cluster-administration/manage-deployment/).
71-
Ingress frequently uses annotations to configure some options depending on the Ingress controller, an example of which
72-
is the [rewrite-target annotation](https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/rewrite/README.md).
73-
Different [Ingress controllers](/docs/concepts/services-networking/ingress-controllers) support different annotations. Review the documentation for
74-
your choice of Ingress controller to learn which annotations are supported.
82+
Ingress frequently uses annotations to configure some options depending on the Ingress controller, an example of which
83+
is the [rewrite-target annotation](https://github.com/kubernetes/ingress-nginx/blob/main/docs/examples/rewrite/README.md).
84+
Different [Ingress controllers](/docs/concepts/services-networking/ingress-controllers) support different annotations.
85+
Review the documentation for your choice of Ingress controller to learn which annotations are supported.
7586

7687
The Ingress [spec](https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status)
7788
has all the information needed to configure a load balancer or proxy server. Most importantly, it
@@ -100,7 +111,8 @@ Each HTTP rule contains the following information:
100111
incoming request before the load balancer directs traffic to the referenced
101112
Service.
102113
* A backend is a combination of Service and port names as described in the
103-
[Service doc](/docs/concepts/services-networking/service/) or a [custom resource backend](#resource-backend) by way of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CRD" >}}. HTTP (and HTTPS) requests to the
114+
[Service doc](/docs/concepts/services-networking/service/) or a [custom resource backend](#resource-backend)
115+
by way of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CRD" >}}. HTTP (and HTTPS) requests to the
104116
Ingress that match the host and path of the rule are sent to the listed backend.
105117

106118
A `defaultBackend` is often configured in an Ingress controller to service any requests that do not
@@ -168,9 +180,11 @@ supported path types:
168180
match for path _p_ if every _p_ is an element-wise prefix of _p_ of the
169181
request path.
170182

171-
{{< note >}} If the last element of the path is a substring of the last
183+
{{< note >}}
184+
If the last element of the path is a substring of the last
172185
element in request path, it is not a match (for example: `/foo/bar`
173-
matches `/foo/bar/baz`, but does not match `/foo/barbaz`). {{< /note >}}
186+
matches `/foo/bar/baz`, but does not match `/foo/barbaz`).
187+
{{< /note >}}
174188

175189
### Examples
176190

@@ -196,12 +210,14 @@ supported path types:
196210
| Mixed | `/foo` (Prefix), `/foo` (Exact) | `/foo` | Yes, prefers Exact |
197211

198212
#### Multiple matches
213+
199214
In some cases, multiple paths within an Ingress will match a request. In those
200215
cases precedence will be given first to the longest matching path. If two paths
201216
are still equally matched, precedence will be given to paths with an exact path
202217
type over prefix path type.
203218

204219
## Hostname wildcards
220+
205221
Hosts can be precise matches (for example “`foo.bar.com`”) or a wildcard (for
206222
example “`*.foo.com`”). Precise matches require that the HTTP `host` header
207223
matches the `host` field. Wildcard matches require the HTTP `host` header is
@@ -248,6 +264,7 @@ the `name` of the parameters identifies a specific cluster scoped
248264
resource for that API.
249265

250266
For example:
267+
251268
```yaml
252269
---
253270
apiVersion: networking.k8s.io/v1
@@ -266,6 +283,7 @@ spec:
266283
kind: ClusterIngressParameter
267284
name: external-config-1
268285
```
286+
269287
{{% /tab %}}
270288
{{% tab name="Namespaced" %}}
271289
{{< feature-state for_k8s_version="v1.23" state="stable" >}}
@@ -295,6 +313,7 @@ The IngressClass API itself is always cluster-scoped.
295313

296314
Here is an example of an IngressClass that refers to parameters that are
297315
namespaced:
316+
298317
```yaml
299318
---
300319
apiVersion: networking.k8s.io/v1
@@ -390,8 +409,7 @@ down to a minimum. For example, a setup like:
390409
391410
{{< figure src="/docs/images/ingressFanOut.svg" alt="ingress-fanout-diagram" class="diagram-large" caption="Figure. Ingress Fan Out" link="https://mermaid.live/edit#pako:eNqNUslOwzAQ_RXLvYCUhMQpUFzUUzkgcUBwbHpw4klr4diR7bCo8O8k2FFbFomLPZq3jP00O1xpDpjijWHtFt09zAuFUCUFKHey8vf6NE7QrdoYsDZumGIb4Oi6NAskNeOoZJKpCgxK4oXwrFVgRyi7nCVXWZKRPMlysv5yD6Q4Xryf1Vq_WzDPooJs9egLNDbolKTpT03JzKgh3zWEztJZ0Niu9L-qZGcdmAMfj4cxvWmreba613z9C0B-AMQD-V_AdA-A4j5QZu0SatRKJhSqhZR0wjmPrDP6CeikrutQxy-Cuy2dtq9RpaU2dJKm6fzI5Glmg0VOLio4_5dLjx27hFSC015KJ2VZHtuQvY2fuHcaE43G0MaCREOow_FV5cMxHZ5-oPX75UM5avuXhXuOI9yAaZjg_aLuBl6B3RYaKDDtSw4166QrcKE-emrXcubghgunDaY1kxYizDqnH99UhakzHYykpWD9hjS--fEJoIELqQ" >}}
392411
393-
394-
would require an Ingress such as:
412+
It would require an Ingress such as:
395413
396414
{{< codenew file="service/networking/simple-fanout-example.yaml" >}}
397415
@@ -435,7 +453,6 @@ Name-based virtual hosts support routing HTTP traffic to multiple host names at
435453

436454
{{< figure src="/docs/images/ingressNameBased.svg" alt="ingress-namebase-diagram" class="diagram-large" caption="Figure. Ingress Name Based Virtual hosting" link="https://mermaid.live/edit#pako:eNqNkl9PwyAUxb8KYS-atM1Kp05m9qSJJj4Y97jugcLtRqTQAPVPdN_dVlq3qUt8gZt7zvkBN7xjbgRgiteW1Rt0_zjLNUJcSdD-ZBn21WmcoDu9tuBcXDHN1iDQVWHnSBkmUMEU0xwsSuK5DK5l745QejFNLtMkJVmSZmT1Re9NcTz_uDXOU1QakxTMJtxUHw7ss-SQLhehQEODTsdH4l20Q-zFyc84-Y67pghv5apxHuweMuj9eS2_NiJdPhix-kMgvwQShOyYMNkJoEUYM3PuGkpUKyY1KqVSdCSEiJy35gnoqCzLvo5fpPAbOqlfI26UsXQ0Ho9nB5CnqesRGTnncPYvSqsdUvqp9KRdlI6KojjEkB0mnLgjDRONhqENBYm6oXbLV5V1y6S7-l42_LowlIN2uFm_twqOcAW2YlK0H_i9c-bYb6CCHNO2FFCyRvkc53rbWptaMA83QnpjMS2ZchBh1nizeNMcU28bGEzXkrV_pArN7Sc0rBTu" >}}
437455

438-
439456
The following Ingress tells the backing load balancer to route requests based on
440457
the [Host header](https://tools.ietf.org/html/rfc7230#section-5.4).
441458

@@ -446,7 +463,9 @@ web traffic to the IP address of your Ingress controller can be matched without
446463
virtual host being required.
447464

448465
For example, the following Ingress routes traffic
449-
requested for `first.bar.com` to `service1`, `second.bar.com` to `service2`, and any traffic whose request host header doesn't match `first.bar.com` and `second.bar.com` to `service3`.
466+
requested for `first.bar.com` to `service1`, `second.bar.com` to `service2`,
467+
and any traffic whose request host header doesn't match `first.bar.com`
468+
and `second.bar.com` to `service3`.
450469

451470
{{< codenew file="service/networking/name-virtual-host-ingress-no-third-host.yaml" >}}
452471

@@ -615,8 +634,6 @@ You can expose a Service in multiple ways that don't directly involve the Ingres
615634
* Use [Service.Type=LoadBalancer](/docs/concepts/services-networking/service/#loadbalancer)
616635
* Use [Service.Type=NodePort](/docs/concepts/services-networking/service/#nodeport)
617636

618-
619-
620637
## {{% heading "whatsnext" %}}
621638

622639
* Learn about the [Ingress](/docs/reference/kubernetes-api/service-resources/ingress-v1/) API

‎content/en/docs/concepts/services-networking/service-topology.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ content_type: concept
77
weight: 150
88
---
99

10-
1110
<!-- overview -->
1211

1312
{{< feature-state for_k8s_version="v1.21" state="deprecated" >}}
1413

1514
{{< note >}}
16-
1715
This feature, specifically the alpha `topologyKeys` API, is deprecated since
1816
Kubernetes v1.21.
1917
[Topology Aware Routing](/docs/concepts/services-networking/topology-aware-routing/),
@@ -25,7 +23,6 @@ topology of the cluster. For example, a service can specify that traffic be
2523
preferentially routed to endpoints that are on the same Node as the client, or
2624
in the same availability zone.
2725

28-
2926
<!-- body -->
3027

3128
## Topology-aware traffic routing
@@ -51,7 +48,8 @@ same top-of-rack switch for the lowest latency.
5148

5249
## Using Service Topology
5350

54-
If your cluster has the `ServiceTopology` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) enabled, you can control Service traffic
51+
If your cluster has the `ServiceTopology` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
52+
enabled, you can control Service traffic
5553
routing by specifying the `topologyKeys` field on the Service spec. This field
5654
is a preference-order list of Node labels which will be used to sort endpoints
5755
when accessing this Service. Traffic will be directed to a Node whose value for
@@ -83,8 +81,6 @@ traffic as follows.
8381
none are available within this zone:
8482
`["topology.kubernetes.io/zone", "*"]`.
8583

86-
87-
8884
## Constraints
8985

9086
* Service topology is not compatible with `externalTrafficPolicy=Local`, and
@@ -101,7 +97,6 @@ traffic as follows.
10197
* The catch-all value, `"*"`, must be the last value in the topology keys, if
10298
it is used.
10399

104-
105100
## Examples
106101

107102
The following are common examples of using the Service Topology feature.
@@ -147,12 +142,10 @@ spec:
147142
- "*"
148143
```
149144
150-
151145
### Only Zonal or Regional Endpoints
152146
153147
A Service that prefers zonal then regional endpoints. If no endpoints exist in either, traffic is dropped.
154148
155-
156149
```yaml
157150
apiVersion: v1
158151
kind: Service

0 commit comments

Comments
 (0)