Skip to content

Kubernetes three brothers architecture

The Kubernetes three brothers architecture refers to the three core components—Pod, Service, and Deployment—that form the foundation for implementing advanced operations in Kubernetes, such as load balancing, rolling updates, security, and monitoring^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Pod

The Pod is the smallest unit within a Kubernetes Node^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md]. All containers are managed within Pods. While a Pod typically contains a single container, it is capable of holding multiple containers^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

To define a Pod, a configuration file (e.g., pod.yaml) is used, specifying the apiVersion, kind (Pod), metadata (such as name and labels), and spec (container details like image and ports)^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Labels are key-value pairs attached to objects like Pods to group them for identification by selectors^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Service

While the provided text does not explicitly detail the Service component in the provided snippets, it is identified as one of the "three brothers" essential for advanced operations like load balancing^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Deployment

The provided text identifies Deployment as one of the "three brothers" essential for operations like rolling updates^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Workflow and Interaction

Image Management

Kubernetes retrieves container images from a Container Registry (such as Docker Hub) similar to standard container workflows^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md]. Users build and push images to the registry, and the Pod specification references this image path (e.g., image: mikehsu0618/foo)^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Creating Resources

Resources can be created using kubectl create or kubectl apply^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md]. The create command is used for new resources, whereas apply is capable of creating new resources or updating existing ones if configuration changes are detected^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Networking

To access a Pod from a local machine, kubectl port-forward is used to map a local port to the Pod's port^[400-devops__06-Kubernetes__k8s-ithelp__Day6__README.md].

Sources