Deciphering – What is Kubernetes?
Guide to Kubernetes Container Orchestration
- Kubernetes is the most discussed repository on GitHub with over 388,000 comments.
- Kubernetes is one of the fastest moving projects in the history of open source and is in the top 0.00006% of the projects on GitHub.
- A survey from the popular job portal, IT Jobs Watch, found that the demand for Kubernetes skills has increased by 752% since 2016.
These statistics reveal that Kubernetes has become one of the most popular container orchestration tools and is likely to rule the tech skills landscape in the coming years. As containerization becomes the norm for application deployment, demand is likely to increase exponentially for those skilled in Kubernetes.
Kubernetes is a portable and extensible open-source platform for managing containerized applications in a clustered environment. But why is it necessary?
Containers and the Need for a Container Orchestration Platform
Containers, like virtual machines, make software run reliably when it is moved from one computing environment to another environment. Containers are much lighter weight than virtual machines and have existed in Linux for a long time. It was only when Docker came out in 2013, which made the creation and running containers simple, that containers became very popular. The use of containers has grown exponentially since then and is the basis upon which many organizations build their microservice architectures.
Let’s understand the concept of containers with a simple example. Imagine you are testing your code that uses Python 2.6 and then in production, the code ends up running on Python 3 and something unexpected happens. Or say you depend on the working of a specific version of an SSL library, but in production, another version is installed. Or perhaps you run all your tests on Windows OS, but production is on Linux, and all sorts of mysterious things happen. Containers solve all these problems. The portability of containers allows you to make software that runs reliably when it is moved from one computing environment to another environment.
The environment can be anything: a developer’s laptop, a software test environment, a production environment running on physical system in the data center, or a VM running in a public or private cloud. Wonderful! So why do we need a separate orchestration tool?
The deep-rooted problem with the usage of containers, much like VMs, is that all these containers need to be managed and tracked. If you are running containers that complete a task and are no longer necessary, they must be cleaned up. This is especially important in the cloud when you are paying for resources like storage and CPU time for VMs hosting the containers. When load on these VMs lighten, it would be greatly advantageous to move containers around to free up some of the VMs and not pay for idle machines. Long-running containers also need to be monitored for failure and restarted on another VM when things go wrong. Doing this management and monitoring yourself can add up to a lot of administrative burden. Here’s where Kubernetes steps in with the concept of container orchestration.
Kubernetes (often shortened as k8s) is a tool that holds your hand along the way for managing your containers. Developers need not worry about every instance (VM or physical) they run or whether a container is running or not. Even if any instance fails, Kubernetes recreates the containers of the failed instance on an instance that is already running. Ideally, Kubernetes takes care of all the crucial steps of deploying, scaling, and management of the containers. Kubernetes is vendor-agnostic and works well with the major cloud vendors – AWS, Microsoft Azure, Google Cloud Platform, IBM, Oracle and others.
The Origin of Kubernetes
Knowing the origin of Kubernetes is important because if we understand how something started, it is possible to speculate and conclude where it might go. Google bet on containers and their benefits in various ways. To orchestrate or manage containers effectively, employees at Google developed the “Borg” project. If you are a Star Trek fan, you would very well know what Borg means – a collective which is not structured or organized in a hierarchy. Borg provided a huge competitive advantage to Google as it utilized all the machines in an efficient way. It was successful as a large-scale internal cluster management system running thousands of jobs from several thousand of diverse applications across multiple clusters of thousands of machines. This motivated engineers Craig McLuckie and Joe Beda at Google to make Borg available as an open-source solution to the general public. For the open-source project, they chose the name Kubernetes, which originated from the Greek meaning pilot or helmsman.
Kubernetes was born out of the engineers' desire to develop an advanced container orchestration platform for managing applications in various production environments. Kubernetes was open-sourced in June 2014. Though originally developed by Google, Kubernetes is now in the custody of the Cloud Native Computing Foundation. This is how Kubernetes has gone from a top-secret project at Google to one of the top open-source projects on GitHub that has spearheaded the revolution in container orchestration platforms.
What can Kubernetes do?
Kubernetes provides a framework to run distributed cloud computing systems by taking care of scaling requirements, deployment patterns, failovers, and more. It lets you create services and applications on multiple containers, programs them accordingly, and manages their integrity and scalability in the long run. Kubernetes also provides you with
- Automated Rollouts and Rollbacks
- Automatic Storage Orchestration
- Load balancing and service discovery using DNS name or IP address
- Self-Healing - restarting containers that fail, replacing containers, and killing containers that don’t respond.
- Automatic bin packing
- Configuration Management
When should you use Kubernetes?
- Your application cannot suffer any downtime at any cost i.e. you need a High Availability (HA) solution. Kubernetes ensures service continuity with an SLA close to 100%.
- You have highly complex infrastructure consisting of multiple containers.
- You want to manage your containerized applications quickly, easily, and efficiently.
- You have solutions which are already containerized. Kubernetes can be highly beneficial as it drastically reduces the overall development time spent on deployment and operations.