Kubernetes, a Different Perspective.

JJotah
4 min readApr 10, 2023

--

Hello to the entire community of Kubernetes and microservices enthusiasts!

Today, I want to share a different perspective on Kubernetes that may not be the usual one. After 5 years of experience in the industry and working with Kubernetes, I would call it the “Onion of Microservices”.

On the kubernetes official documentation we can see how they describe the components of control plane / nodes. But for technical people and even non-technical people it can be hard to understand, mostly if you are working with application servers like Apache, IIS, Jboss, Websphere, Weblogic…

Let me explain my point of view:

Kubernetes works in layers.

  1. Container orchestration layer
  2. Pod orchestration layer
  3. Services and Endpoints layer
  4. Ingress and Ingress Controllers layer

Keep with me as I’ll dive deeper into each layer in this article, highlighting their importance and how they fit into the overall architecture of Kubernetes. Join me on this journey to uncover a new way of looking at Kubernetes!

1. Container orchestration layer

In Kubernetes, container orchestration is achieved through Pods, which are the smallest and simplest units in the Kubernetes object model. Pods represent a single instance of a running process and can contain one or more containers. They are responsible for grouping containers that work together, sharing the same network and storage space.

2. Pod orchestration layer

To address this challenge, Kubernetes provides higher-level controllers such as ReplicaSets, Deployments, StatefulSets, and DaemonSets, which orchestrate the management of Pods at a higher level of abstraction.

  • ReplicaSets: a ReplicaSet ensures that a specified number of identical Pods are running at all times. It monitors the status of Pods and automatically creates or deletes Pods to maintain the desired number of replicas.
  • Deployments: a Deployment is a higher-level abstraction over ReplicaSets, providing declarative updates for Pods and managing the rollout of new versions of an application. It allows for rollbacks, scaling, and controlled updates with minimum downtime.
image from https://www.bluematador.com/
  • StatefulSets: a StatefulSet is used for managing stateful applications, where Pods have a unique hostname and persistent identities. It ensures ordered and graceful deployment and scaling of Pods, preserving their identities across rescheduling.
image from https://www.bluematador.com/
  • DaemonSets: a DaemonSet ensures that a specific Pod runs on all or selected nodes in a cluster. It is typically used for running system daemons, log collectors, or other applications that need to run on every node.
image from https://www.bluematador.com/

3. Services and Endpoints layer

In Kubernetes, Services and Endpoints are considered a higher layer than Deployments as they provide an additional abstraction for exposing and routing traffic to Pods in a cluster.

4. Ingress and Ingress Controllers layer

In Kubernetes, the Ingress and Ingress Controllers layer is considered a higher-level layer compared to Services and Endpoints. This layer provides advanced routing and load balancing capabilities for incoming traffic from outside the cluster to the Services running inside the cluster. Ingress Controllers are responsible for managing and configuring the Ingress rules, which define how incoming traffic should be directed to different Services based on the requested domain, path, or other criteria. This layer enables more advanced routing and traffic management features, making it a higher-level abstraction for handling external traffic compared to Services and Endpoints.

Conclusion

image from https://matthewpalmer.net

In my personal perspective, I see the layers of Kubernetes as an onion, with different layers overlapping and providing varying levels of abstraction. While objects like Deployments may manage Replicasets, I like to group them together in the same layer above Pods for debugging purposes. If you were working with old application servers and you work on a middleware team I think that it could be a good point to start working with kubernetes.

In conclusion, Kubernetes can be seen as an “onion” with its multiple layers of abstraction, ranging from Pods as the foundational layer to Services, Endpoints, Ingress, and Ingress Controllers as higher-level layers. Just like an onion, these layers work together to provide a robust, scalable, and efficient framework for orchestrating and managing microservices in a Kubernetes cluster. Understanding the different layers and their functions can help developers and operators gain a holistic view of Kubernetes architecture and leverage its capabilities effectively. So, next time you work with Kubernetes, remember the “onion” analogy to visualize the layers and their interdependencies in this powerful container orchestration platform!

#Kubernetes #ContainerOrchestration #Microservices #CloudNative #DevOps #Containerization #K8s #CloudComputing #Docker #ContainerManagement #KubernetesCommunity #Tech #CloudInfrastructure #DevCommunity #ContainerNetworking #CloudNativeApps #CloudDeployment #KubernetesDeployment #ContainerizationStrategy

--

--

JJotah

Cloud Architect | Blogger | Kubernetes Enthusiast | CKS | CKA | CKAD | Terraform | Golang | LinkedIn: Juan José Ruiz | GitHub: JJotah