Understanding Kubernetes Controller — A Beginner’s Guide
Exploring the Magic of Kubernetes Controllers

Find Complete mind map of A Beginner’s Guide to Kubernetes
Are you curious about how Kubernetes maintains and manages its resources? Controller is one of the most important components of Kubernetes that tracks and manages the state of resources. In this beginner’s guide, we’ll explore what the Kubernetes Controller is and how it works.
Check out “Understanding Kubernetes — A Beginner’s Guide” for the comprehensive series🚀
What are Controllers?
Kubernetes controllers are components that track at least one Kubernetes resource type. Each resource object has a spec
field that represents the desired state. The controller(s) for that resource are responsible for ensuring that the current state is as close as possible to the desired state.

There are many different types of controllers in Kubernetes, each with its own specific purpose. Some examples of commonly used controllers include:
- Pod Controllers: Responsible for managing the lifecycle of a pod, including scheduling and scaling.
- ReplicaSet: Ensures the desired number of replicas of a pod is running at all times.
- Deployment: Helps to manage ReplicaSet and Pod controllers.
- DaemonSet: Ensures a pod runs on all nodes in a cluster.
- StatefulSet: Ensures that a unique hostname and persistent storage are assigned to each pod.
- Job: Creates one or more pods and ensures that a specified number of them complete successfully.
- CronJob: Creates jobs on a schedule.
What is the Controller Manager?
The Controller Manager is a key component of the Kubernetes control plane. It is responsible for running various controllers that watch the state of Kubernetes resources and reconcile the actual state with the desired state.
The Controller Manager runs as a set of processes on the Kubernetes master node. Examples of controllers that ship with Kubernetes today are the replication controller, endpoints controller, namespace controller, and serviceaccounts controller.
Each of these controllers has a specific set of responsibilities, such as managing the number of replicas for a given deployment or ensuring that the endpoints for a service are up-to-date.
Controller vs Controller Manager
- Controller: Tracks at least one Kubernetes resource type and is responsible for making the current state come closer to the desired state.
- Controller Manager: A Kubernetes control plane component that runs multiple controllers and ensures that they are functioning correctly.
In simpler terms, a controller is responsible for managing a specific resource’s desired state, while the controller manager manages multiple controllers and ensures they are working as intended.
For example, a pod controller manages the desired state of a pod, while the deployment controller is responsible for managing the desired state of a deployment, which includes one or more pods.
Understanding the difference between controllers and the controller manager is essential for effective management of Kubernetes resources.
System Pods
Kubernetes also has a set of system pods that are used for managing the Kubernetes cluster itself. These pods are typically deployed in the kube-system namespace. You can view the status of these pods using the following commands:
$ kubectl get all -A $ kubectl get deployment coredns --namespace kube-system $ kubectl get daemonset --namespace kube-system
Conclusion
Kubernetes is a powerful container orchestration platform that can help you deploy and manage containerized applications at scale.
In this guide, we covered the basic concepts of Kubernetes, including controllers, the controller manager, and the difference between the two.
By understanding these concepts, you can begin to use Kubernetes to deploy and manage your own containerized applications.
🔔 Stay tuned or subscribe to my series: “Understanding Kubernetes — A Beginner’s Guide” to explore everything about Kubernetes. 🚀
➕Join the Medium Membership Program to support my work and connect with other writers.
📝 Have questions or suggestions? Leave a comment or message me through Medium. Let’s connect!
Thank you for your support! 🌟