fixups to 2025-02-14 ccm chicken and egg blog

* add a directory for the markdown and images
* add a static svg image for the mermaid diagram
* cleanup code blocks in erroneous places
* switch svg references to use `figure` shortcode
pull/49756/head
elmiko 2025-02-14 13:10:20 -05:00
parent 1454e6c277
commit b95b1845bb
2 changed files with 18 additions and 22 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -25,34 +25,27 @@ The [cloud controller manager is part of the control plane][ccm]. It is a critic
that replaces some functionality that existed previously in the kube-controller-manager and the that replaces some functionality that existed previously in the kube-controller-manager and the
kubelet. kubelet.
![Components of Kubernetes](https://kubernetes.io/images/docs/components-of-kubernetes.svg) {{< figure
src="/images/docs/components-of-kubernetes.svg"
alt="Components of Kubernetes"
caption="Components of Kubernetes"
>}}
One of the most critical functionalities of the cloud controller manager is the node controller, One of the most critical functionalities of the cloud controller manager is the node controller,
which is responsible for the initialization of the nodes. which is responsible for the initialization of the nodes.
As you can see in the following diagram, when the **kubelet** starts, it registers the `Node` As you can see in the following diagram, when the **kubelet** starts, it registers the Node
object with the apiserver, Tainting the node so it can be processed first by the object with the apiserver, Tainting the node so it can be processed first by the
cloud-controller-manager. The initial `Node` is missing the cloud-provider specific information, cloud-controller-manager. The initial Node is missing the cloud-provider specific information,
like the Node Addresses and the Labels with the cloud provider specific information like the like the Node Addresses and the Labels with the cloud provider specific information like the
Node, Region and Instance type information. Node, Region and Instance type information.
```mermaid {{< figure
sequenceDiagram src="ccm-chicken-egg-problem-sequence-diagram.svg"
autonumber alt="Chicken and egg problem sequence diagram"
rect rgb(191, 223, 255) caption="Chicken and egg problem sequence diagram"
Kubelet->>+Kube-apiserver: Create Node class="diagram-large"
Note over Kubelet: Taint:<br/> node.cloudprovider.kubernetes.io >}}
Kube-apiserver->>-Kubelet: Node Created
end
Note over Kube-apiserver: Node is Not Ready<br/> Tainted, Missing Node Addresses*, ...
Note over Kube-apiserver: Send Updates
rect rgb(200, 150, 255)
Kube-apiserver->>+Cloud-controller-manager: Watch: New Node Created
Note over Cloud-controller-manager: Initialize Node:<br/>Cloud Provider Labels, Node Addresses, ...
Cloud-controller-manager->>-Kube-apiserver: Update Node
end
Note over Kube-apiserver: Node is Ready
```
This new initialization process adds some latency to the node readiness. Previously, the kubelet This new initialization process adds some latency to the node readiness. Previously, the kubelet
was able to initialize the node at the same time it created the node. Since the logic has moved was able to initialize the node at the same time it created the node. Since the logic has moved
@ -100,9 +93,9 @@ The [Kubernetes documentation describes][kubedocs1] the `node.kubernetes.io/not-
> "The Node controller detects whether a Node is ready by monitoring its health and adds or removes this taint accordingly." > "The Node controller detects whether a Node is ready by monitoring its health and adds or removes this taint accordingly."
One of the conditions that can lead to a `Node` resource having this taint is when the container One of the conditions that can lead to a Node resource having this taint is when the container
network has not yet been initialized on that node. As the cloud-controller-manager is responsible network has not yet been initialized on that node. As the cloud-controller-manager is responsible
for adding the IP addresses to a `Node` resource, and the IP addresses are needed by the container for adding the IP addresses to a Node resource, and the IP addresses are needed by the container
network controllers to properly configure the container network, it is possible in some network controllers to properly configure the container network, it is possible in some
circumstances for a node to become stuck as not ready and uninitialized permanently. circumstances for a node to become stuck as not ready and uninitialized permanently.