From 73f343c7f112d3e8c3d4b0535e62785f8d9dcc32 Mon Sep 17 00:00:00 2001 From: Antonio Ojea Date: Thu, 16 Nov 2023 11:46:45 +0000 Subject: [PATCH] kubernetes cluster networking types Kubernetes has a concept of cluster network, as it can be IPv4 only, IPv6 only or dual stack depending on the IP famliies configured for their Pod , Services and Node objects. Signed-off-by: Antonio Ojea --- .../cluster-administration/networking.md | 28 +++++++++++++++++++ .../images/kubernetes-cluster-network.svg | 1 + 2 files changed, 29 insertions(+) create mode 100644 content/en/docs/images/kubernetes-cluster-network.svg diff --git a/content/en/docs/concepts/cluster-administration/networking.md b/content/en/docs/concepts/cluster-administration/networking.md index 273f5ed69c..9cf1579bee 100644 --- a/content/en/docs/concepts/cluster-administration/networking.md +++ b/content/en/docs/concepts/cluster-administration/networking.md @@ -32,6 +32,34 @@ different approach. To learn about the Kubernetes networking model, see [here](/docs/concepts/services-networking/). +## Kubernetes IP address ranges + +Kubernetes clusters require to allocate non-overlapping IP addresses for Pods, Services and Nodes, +from a range of available addresses configured in the following components: + +- The network plugin is configured to assign IP addresses to Pods. +- The kube-apiserver is configured to assign IP addresses to Services. +- The kubelet or the cloud-controller-manager is configured to assign IP addresses to Nodes. + +{{< figure src="/docs/images/kubernetes-cluster-network.svg" alt="A figure illustrating the different network ranges in a kubernetes cluster" class="diagram-medium" >}} + +## Cluster networking types {#cluster-network-ipfamilies} + +Kubernetes clusters, attending to the IP families configured, can be categorized into: + +- IPv4 only: The network plugin, kube-apiserver and kubelet/cloud-controller-manager are configured to assign only IPv4 addresses. +- IPv6 only: The network plugin, kube-apiserver and kubelet/cloud-controller-manager are configured to assign only IPv6 addresses. +- IPv4/IPv6 or IPv6/IPv4 [dual-stack](/docs/concepts/services-networking/dual-stack/): + - The network plugin is configured to assign IPv4 and IPv6 addresses. + - The kube-apiserver is configured to assign IPv4 and IPv6 addresses. + - The kubelet or cloud-controller-manager is configured to assign IPv4 and IPv6 address. + - All components must agree on the configured primary IP family. + +Kubernetes clusters only consider the IP families present on the Pods, Services and Nodes objects, +independently of the existing IPs of the represented objects. Per example, a server or a pod can have multiple +IP addresses on its interfaces, but only the IP addresses in `node.status.addresses` or `pod.status.ips` are +considered for implementing the Kubernetes network model and defining the type of the cluster. + ## How to implement the Kubernetes network model The network model is implemented by the container runtime on each node. The most common container diff --git a/content/en/docs/images/kubernetes-cluster-network.svg b/content/en/docs/images/kubernetes-cluster-network.svg new file mode 100644 index 0000000000..9fd7a49e18 --- /dev/null +++ b/content/en/docs/images/kubernetes-cluster-network.svg @@ -0,0 +1 @@ + \ No newline at end of file