Skip to content

Commit d29b547

Browse files
authored
Merge pull request #36671 from sftim/20220110_reorganize_services_load_balancing_networking
Reorganize “Services, Load Balancing, and Networking” concept
2 parents b4cd08f + 3970b2b commit d29b547

File tree

12 files changed

+58
-15
lines changed

12 files changed

+58
-15
lines changed

content/en/docs/concepts/cluster-administration/networking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ problems to address:
1414
1. Highly-coupled container-to-container communications: this is solved by
1515
{{< glossary_tooltip text="Pods" term_id="pod" >}} and `localhost` communications.
1616
2. Pod-to-Pod communications: this is the primary focus of this document.
17-
3. Pod-to-Service communications: this is covered by [services](/docs/concepts/services-networking/service/).
18-
4. External-to-Service communications: this is covered by [services](/docs/concepts/services-networking/service/).
17+
3. Pod-to-Service communications: this is covered by [Services](/docs/concepts/services-networking/service/).
18+
4. External-to-Service communications: this is also covered by Services.
1919

2020
<!-- body -->
2121

content/en/docs/concepts/services-networking/_index.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,13 @@ blind to the existence or non-existence of host ports.
4949
Kubernetes networking addresses four concerns:
5050
- Containers within a Pod [use networking to communicate](/docs/concepts/services-networking/dns-pod-service/) via loopback.
5151
- Cluster networking provides communication between different Pods.
52-
- The [Service resource](/docs/concepts/services-networking/service/) lets you [expose an application running in Pods](/docs/concepts/services-networking/connect-applications-service/) to be reachable from outside your cluster.
53-
- You can also use Services to [publish services only for consumption inside your cluster](/docs/concepts/services-networking/service-traffic-policy/).
52+
- The [Service](/docs/concepts/services-networking/service/) resource lets you
53+
[expose an application running in Pods](/docs/concepts/services-networking/connect-applications-service/)
54+
to be reachable from outside your cluster.
55+
- [Ingress](/docs/concepts/services-networking/ingress/) provides extra functionality
56+
specifically for exposing HTTP applications, websites and APIs.
57+
- You can also use Services to
58+
[publish services only for consumption inside your cluster](/docs/concepts/services-networking/service-traffic-policy/).
59+
60+
[Cluster Networking](/docs/concepts/cluster-administration/networking/) explains how to set
61+
up networking for your cluster, and also provides an overview of the technologies involved.

content/en/docs/concepts/services-networking/connect-applications-service.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,12 @@ weight: 30
1313

1414
## The Kubernetes model for connecting containers
1515

16-
Now that you have a continuously running, replicated application you can expose it on a network.
16+
Now that you have a continuously running, replicated application you can expose it on a network.
1717

1818
Kubernetes assumes that pods can communicate with other pods, regardless of which host they land on. Kubernetes gives every pod its own cluster-private IP address, so you do not need to explicitly create links between pods or map container ports to host ports. This means that containers within a Pod can all reach each other's ports on localhost, and all pods in a cluster can see each other without NAT. The rest of this document elaborates on how you can run reliable services on such a networking model.
1919

2020
This guide uses a simple nginx server to demonstrate proof of concept.
2121

22-
23-
2422
<!-- body -->
2523

2624
## Exposing pods to the cluster
@@ -53,6 +51,7 @@ kubectl get pods -l run=my-nginx -o custom-columns=POD_IP:.status.podIPs
5351
5452
You should be able to ssh into any node in your cluster and use a tool such as `curl` to make queries against both IPs. Note that the containers are *not* using port 80 on the node, nor are there any special NAT rules to route traffic to the pod. This means you can run multiple nginx pods on the same node all using the same `containerPort`, and access them from any other pod or node in your cluster using the assigned IP address for the Service. If you want to arrange for a specific port on the host Node to be forwarded to backing Pods, you can - but the networking model should mean that you do not need to do so.
5553
54+
5655
You can read more about the [Kubernetes Networking Model](/docs/concepts/cluster-administration/networking/#the-kubernetes-network-model) if you're curious.
5756
5857
## Creating a Service

content/en/docs/concepts/services-networking/dns-pod-service.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ reviewers:
44
- thockin
55
title: DNS for Services and Pods
66
content_type: concept
7-
weight: 20
7+
weight: 60
8+
description: >-
9+
Your workload can discover Services within your cluster using DNS;
10+
this page explains how that works.
811
---
912
<!-- overview -->
1013

content/en/docs/concepts/services-networking/dual-stack.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
---
22
title: IPv4/IPv6 dual-stack
3+
description: >-
4+
Kubernetes lets you configure single-stack IPv4 networking,
5+
single-stack IPv6 networking, or dual stack networking with
6+
both network families active. This page explains how.
37
feature:
48
title: IPv4/IPv6 dual-stack
59
description: >

content/en/docs/concepts/services-networking/endpoint-slices.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ reviewers:
44
title: EndpointSlices
55
content_type: concept
66
weight: 45
7+
description: >-
8+
The EndpointSlice API is the mechanism that Kubernetes uses to let your Service
9+
scale to handle large numbers of backends, and allows the cluster to update its
10+
list of healthy backends efficiently.
711
---
812

913

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
---
22
title: Ingress Controllers
3-
reviewers:
3+
description: >-
4+
In order for an [Ingress](/docs/concepts/services-networking/ingress/) to work in your cluster,
5+
there must be an _ingress controller_ running.
6+
You need to select at least one ingress controller and make sure it is set up in your cluster.
7+
This page lists common ingress controllers that you can deploy.
48
content_type: concept
5-
weight: 40
9+
weight: 30
610
---
711

812
<!-- overview -->

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ reviewers:
33
- bprashanth
44
title: Ingress
55
content_type: concept
6-
weight: 40
6+
description: >-
7+
Make your HTTP (or HTTPS) network service available using a protocol-aware configuration
8+
mechanism, that understands web concepts like URIs, hostnames, paths, and more.
9+
The Ingress concept lets you map traffic to different backends based on rules you define
10+
via the Kubernetes API.
11+
weight: 20
712
---
813

914
<!-- overview -->

content/en/docs/concepts/services-networking/network-policies.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ reviewers:
66
title: Network Policies
77
content_type: concept
88
weight: 50
9+
description: >-
10+
If you want to control traffic flow at the IP address or port level (OSI layer 3 or 4),
11+
NetworkPolicies allow you to specify rules for traffic flow within your cluster, and
12+
also between Pods and the outside world.
13+
Your cluster must use a network plugin that supports NetworkPolicy enforcement.
914
---
1015

1116
<!-- overview -->

content/en/docs/concepts/services-networking/service-traffic-policy.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ reviewers:
33
- maplain
44
title: Service Internal Traffic Policy
55
content_type: concept
6-
weight: 45
6+
weight: 75
7+
description: >-
8+
If two Pods in your cluster want to communicate, and both Pods are actually running on
9+
the same node, _Service Internal Traffic Policy_ to keep network traffic within that node.
10+
Avoiding a round trip via the cluster network can help with reliability, performance
11+
(network latency and throughput), or cost.
712
---
813

914

@@ -23,7 +28,7 @@ cluster. This can help to reduce costs and improve performance.
2328
The `ServiceInternalTrafficPolicy` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
2429
is a Beta feature and enabled by default.
2530
When the feature is enabled, you can enable the internal-only traffic policy for a
26-
{{< glossary_tooltip text="Services" term_id="service" >}}, by setting its
31+
{{< glossary_tooltip text="Service" term_id="service" >}}, by setting its
2732
`.spec.internalTrafficPolicy` to `Local`.
2833
This tells kube-proxy to only use node local endpoints for cluster internal traffic.
2934

0 commit comments

Comments
 (0)