What is Kubernetes?
Kubernetes is an open-source platform through which developers can manage, deploy and maintain groups of containers. Applications can be made up of hundreds of containers, all of which need to be managed. Additionally, these containers may need to be managed across different environments: physical machines, virtual machines, cloud environments, or even hybrid environments. Managing such containers without a container-orchestration technology would be an exceedingly complicated task.
To address this problem, in 2003, developers at Google created the Borg system. The Borg system is the predecessor of Kubernetes. Kubernetes was then created in 2014 as an open-source alternative to the Borg system. Today, Kubernetes is the most widely-used container management tool.
How does it work?
The structure of Kubernetes is divided into discrete components, each responsible for different things. Generally, there are Master Nodes, responsible for higher-order management, and Worker Nodes, responsible for running the applications.
Master Nodes
Master Nodes contain many important subcomponents that handle the greater management of the cluster. Firstly, there is an API server, which functions as an entry point to the cluster and handles requests. Next, there is a controller manager, which keeps running tabs on the state of all components in the cluster. If a component fails and needs repair, the controller manager will detect the failure and handle the repair.
Additionally, the Master Node contains the scheduler. The scheduler takes inventory of the available resources on the worker nodes and determines where incoming containers will go. Finally, the Master Node also houses the etcd key-value storage. The etcd has all the configuration data and status data of each node and of each container it holds. Backups are created from snapshots from the etcd. These snapshots give the Master Node the ability to recover any container or node in the cluster.
The Master Nodes are arguably the most important. They have the ability to restart or restore any part of the cluster that fails or is lost and are responsible for the greater functioning of all other nodes and containers. Worker Nodes, alternatively, tend to be larger and have the most load. This is because Worker Nodes are responsible for running applications.
Worker Nodes
Just like Master Nodes, Worker Nodes are made up of several different components. Each component is responsible for different functions. Firstly, each Worker Node has a kubelet process. The kubelet allows communication between the nodes. If there is a problem with the status of it's Worker Node, the kubelet relays this message to the Master Node, receives instructions and carries them out.
Worker Nodes also contain any number of containers. A container is a single component of packaged up code and any needed dependencies. A popular container technology, often used in tandem with Kubernetes, is Docker. There may be a different number of containers in each Worker Node, depending on the distribution of the load.
Kubernetes Usability
Kubernetes is currently the most popular container management tool. However, before deciding on whether to use any technology, developers should assess it's usability and benefits, as well as its challenges.
Pros
Scalability: As load increases or decreases, Kubernetes can quickly scale accordingly. It can manage a wide range in number of containers and can automatically add nodes to clusters as needed.
Disaster recovery and self-healing: if a disaster occurs and data is lost, there are backups saved and all data can be restored.
Load balancing: containers are sorted into nodes after an automatic assessment of each nodes available resources.
Cons
Complexity: Kubernetes is a complex technology and is not beginner friendly. It takes a minimum level of expertise to use Kubernetes, and those who do often must be explicitly trained to do so.
Not practical for small applications or startups: Kubernetes' ideal use is managing large groups of containers for complex applications. It may not be particularly useful depending on the scale of an app.
Conclusion
In conclusion, Kubernetes is a popular, open-source technology that is widely used to manage large numbers of containers. It is comprised of separate, hierarchal components that control specific aspects of functioning. It is an ideal tool for complex applications.
Works Cited
Top comments (0)