Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem.
According to Red Hat technology evangelist Gordon Haff :
Kubernetes, or k8s, is an open source platform that automates Linux container operations. It eliminates many of the manual processes involved in deploying and scaling containerized applications
In simple words, we can cluster together groups of hosts running Linux containers, and Kubernetes helps us easily and efficiently manage those clusters.
Google created Kubernetes and it is now part of CNCF, with very active engagement and contribution from many enterprises large and small. It is also known as K8S.
Why we need Kubernetes ?
In industries, we need to manage the containers that run the applications and ensure that there is no downtime. If one container goes down, another needs to start. Keeping an eye on it manually would have been a very tedious task. Here comes Kubernetes to rescue.
Kubernetes provides with:
- Service discovery and load balancing Kubernetes can expose a container using the DNS name or using their own IP address. If traffic to a container is high, Kubernetes is able to load balance and distribute the network traffic so that the deployment is stable.
- Storage orchestration Kubernetes allows you to automatically mount a storage system of your choice, such as local storages, public cloud providers, and more.
- Automated rollouts and rollbacks You can describe the desired state for your deployed containers using Kubernetes, and it can change the actual state to the desired state at a controlled rate. For example, you can automate Kubernetes to create new containers for your deployment, remove existing containers and adopt all their resources to the new container.
- Automatic bin packing You provide Kubernetes with a cluster of nodes that it can use to run containerized tasks. You tell Kubernetes how much CPU and memory (RAM) each container needs. Kubernetes can fit containers onto your nodes to make the best use of your resources.
- Self-healing Kubernetes restarts containers that fail, replaces containers, kills containers that don’t respond to your user-defined health check, and doesn’t advertise them to clients until they are ready to serve.
- Secret and configuration management Kubernetes lets you store and manage sensitive information, such as passwords, OAuth tokens, and SSH keys. You can deploy and update secrets and application configuration without rebuilding your container images, and without exposing secrets in your stack configuration.
Kubernetes in Industry
Every company is moving towards digitalization. The Kubernetes declarative API-driven infrastructure enables teams to work independently. Moreover, it helps operators to concentrate their business goals. These inevitable shifts in the culture of working have been proven to contribute towards higher productivity and autonomy, along with decreasing the labor of development teams.
Why to use Kubernetes?
Kubernetes is an orchestration tool for containerized applications. Starting with a collection of Docker containers, Kubernetes can control resource allocation and traffic management for cloud applications and microservices. As such, it simplifies many aspects of running a service-oriented application infrastructure. Kubernetes can save organizations money because it takes less manpower to manage IT; it makes apps more resilient and performant.
Kubernetes enables a “microservices” approach to building apps.
Airbnb’s transition from a monolithic to a microservices architecture is pretty amazing. They needed to scale continuous delivery horizontally, and the goal was to make continuous delivery available to the company’s 1,000 or so engineers so they could add new services. Airbnb adopted Kubernetes to support over 1,000 engineers concurrently configuring and deploying over 250 critical services to Kubernetes. The net result is that AirBnb can now do over 500 deploys per day on average.
Kubernetes helps in Seamless migration to Cloud. Shopify presents a real world case study for this.
Shopify started as a data center based application and over the last few years has completely migrated all their application to Google Cloud Platform. Shopify first started running containers (docker); the next natural step was to use K8s as a dynamic container management and orchestration system.
Kubernetes can help business cut infrastructure costs quite drastically.
Spotify has significant cost saving values by adopting K8s. Leveraging K8s, Spotify has seen 2–3x CPU utilization using the orchestration capabilities of K8s, resulting in better IT spend optimization.
Leveraging K8s, the Pinterest IT team reclaimed over 80 percent of capacity during non-peak hours. They now use30 percent less instance-hours per day compared to the static cluster.
Adidas: A case study
Challenge: Accessing all the tools became a problem for adidas. For instance, just to get a developer VM, a whole lot of process had to be performed that consumed time even a week.
Solution: They found the solution with containerization, agile development, continuous delivery, and a cloud native platform that includes Kubernetes and Prometheus to shorten the time.
Impact: Just six months after the project began, 100% of the adidas e-commerce site was running on Kubernetes. Load time for the e-commerce site was reduced by half. Releases went from every 4–6 weeks to 3–4 times a day. With 4,000 pods, 200 nodes, and 80,000 builds per month, adidas is now running 40% of its most critical, impactful systems on its cloud native platform.
These are just some examples. Kubernetes is being used by over 2253 companies in their tech stacks, including Google, Shopify, and Slack.