Kubernetes marks a breakthrough for DevOps.
By: Avinash Chavan
Tags: Automation, Containers, DevOps, Kubernetes, Open Source

Hello, epistemophile!, great to see you here in search of knowledge, I sure you, In my entire article, I will give the basic understanding of one of the Important and essential tools of DevOps, and that named Kubernetes.

Now inside your mind, the first question is roaming around is, what is Kubernetes?

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 other words, you can cluster together groups of hosts running Linux containers, and Kubernetes helps you comfortably and efficiently manage those clusters.

If you feel this is stunning, then you curious about who developed this great tool and from which year it is present in the market?

The platform was first developed by a team at Google and later donated to the Cloud Native Computing Foundation (CNCF). It’s not the only option for container management, but it has rapidly become one of the most popular. As Opensource.com notes, "Today, Kubernetes is a true open-source community, with engineers' works from Google, Red Hat, and many other companies actively contributing to the project."

Kubernetes v1.0 was released on July 21, 2015. Along with the Kubernetes v1.0 release, Google partnered with the Linux Foundation to form the Cloud Native Computing Foundation (CNCF) and offered Kubernetes as a seed technology. In February 2016 Helm package manager for Kubernetes was released. On March 6, 2018, Kubernetes Project reached ninth place in commits at GitHub, and second place in authors and issues, after the Linux kernel.

From where did this unusual name come?

The agreed-upon origin is from the Greek, meaning “helmsman” or “sailing master.”

The original codename for Kubernetes within Google was Project 7, a reference to the Star Trek ex-Borg character Seven of Nine.The seven spokes on the wheel of the Kubernetes logo are a reference to that codename. The original Borg project was written entirely in C++, but the rewritten Kubernetes system is implemented in Go.

What is a Kubernetes cluster?

You can begin to understand this major piece literally: A cluster is a group or bunch of nodes that run your containerized applications. You manage the cluster and everything it includes — in other words, you manage your application(s) — with Kubernetes.

What is a Kubernetes pod?

This is essentially the smallest deployable unit of the Kubernetes ecosystem; more accurately, it’s the smallest object. A pod specifically represents a group of one or more containers running together on your cluster.

What is a Kubernetes node?

Nodes are comprised of physical or virtual machines on your cluster; these “worker” machines have everything necessary to run your application containers, including the container runtime and other critical services. (The Kubernetes Github repository has a good, detailed breakdown of the Kubernetes node.)

What is kubectl?

Simply put, kubectl is a command line interface (CLI) for managing operations on your Kubernetes clusters. It does so by communicating with the Kubernetes API. (It’s not a typo — the official Kubernetes style is to lowercase the k in kubectl.) It follows a standard syntax for running commands: kubectl [command] [TYPE] [NAME] [flags]. You can find an in-depth explanation of kubectl here, as well as examples of common operations, but here’s a basic example of an operation: “run.” This command runs a particular container image on your cluster.

What is a Kubernetes service?

A Kubernetes service is “an abstract way to expose an application running on a set of pods as a network service,” as the Kubernetes documentation puts it. “Kubernetes gives pods their own IP addresses and a single DNS name for a set of Pods, and can load-balance across them.”

But pods sometimes have a short lifespan. As pods come and go, services help the other pods “find out and keep track of which IP address to connect to.”

What is Minikube?

Minikube is an open source tool that enables you to run Kubernetes on your laptop or other local machine. It can work with Linux, Mac, and Windows operating systems. It runs a single-node cluster inside a virtual machine on your local machine

CASE STUDY: Nordstrom Technology

Location Seattle, Washington, Industry Retail

Finding Millions in Potential Savings in a Tough etail Climate

Challenge

Nordstrom wanted to increase the efficiency and speed of its technology operations, which includes the Nordstrom.com e-commerce site. At the same time, Nordstrom Technology was looking for ways to tighten its technology operational costs.

Solution

After embracing a DevOps transformation and launching a continuous integration/continuous deployment (CI/CD) project four years ago, the company reduced its deployment time from three months to 30 minutes. But they wanted to go even faster across environments, so they began their cloud native journey, adopting Docker containers orchestrated with Kubernetes.

Impact

“Before using containers, it would take sometimes a day, sometimes two, just to create a new service,” says Lallemand. “With all the tooling that we made around the containers, copying a new service now is a matter of minutes. It’s really a huge gain. We are better at capacity planning in our data center because we have fewer constraints due to this abstraction between the services and the hardware we run on. For the developers, it also means they can focus only on the features that they’re developing, and not on the infrastructure.”

“We are always looking for ways to optimize and provide more value through technology. With Kubernetes we are showcasing two types of efficiency that we can bring: Dev efficiency and Ops efficiency. It’s a win-win.” — DHAWAL PATEL, SENIOR ENGINEER AT NORDSTROM

When Dhawal Patel joined Nordstrom five years ago as an application developer for the retailer’s website, he realized there was an opportunity to help speed up development cycles.

In those early DevOps days, Nordstrom Technology still followed a traditional model of silo teams and functions. “As a developer, I was spending more time fixing environments than writing code and adding value to business,” Patel says. “I was passionate about that — so I was given the opportunity to help fix it.”

The company was eager to move faster, too, and in 2013 launched the first continuous integration/continuous deployment (CI/CD) project. That project was the first step in Nordstrom’s cloud native journey.

Dev and Ops team members built a CI/CD pipeline, working with the company’s servers on premise. The team chose Chef, and wrote cookbooks that automated virtual IP creation, servers, and load balancing. “After we completed the project, deployment went from three months to 30 minutes,” says Patel. “We still had multiple environments — dev, test, staging, then production — so with each environment running the Chef cookbooks, it took 30 minutes. It was a huge achievement at that point.”

But new environments still took too long to turn up, so the next step was working in the cloud. Today, Nordstrom Technology has built an enterprise platform that allows the company’s 1,500 developers to deploy applications running as Docker containers in the cloud, orchestrated with Kubernetes.

“We made a bet that Kubernetes was going to take off, informed by early indicators of community support and project velocity, so we rebuilt our system with Kubernetes at the core,”

“The cloud provided faster access to resources, because it took weeks for us to get a virtual machine (VM) on premises,” says Patel. “But now we can do the same thing in only five minutes.”

Nordstrom’s first foray into scheduling containers on a cluster was a homegrown system based on CoreOS fleet. They began doing a few proofs of concept projects with that system until Kubernetes 1.0 was released when they made the switch. “We made a bet that Kubernetes was going to take off, informed by early indicators of community support and project velocity, so we rebuilt our system with Kubernetes at the core,” says Marius Grigoriu, Sr. Manager of the Kubernetes team at Nordstrom.

While Kubernetes is often thought as a platform for microservices, the first application to launch on Kubernetes in a critical production role at Nordstrom was Jira. “It was not the ideal microservice we were hoping to get as our first application,” Patel admits, “but the team that was working on it was really passionate about Docker and Kubernetes, and they wanted to try it out. They had their application running on premises, and wanted to move it to Kubernetes.”

The benefits were immediate for the teams that came on board. “Teams running on our Kubernetes cluster loved the fact that they had fewer issues to worry about. They didn’t need to manage infrastructure or operating systems,” says Grigoriu. “Early adopters loved the declarative nature of Kubernetes. They loved the reduced surface area they had to deal with.”

“Teams running on our Kubernetes cluster loved the fact that they had fewer issues to worry about. They didn’t need to manage infrastructure or operating systems,” says Grigoriu. “Early adopters loved the declarative nature of Kubernetes. They loved the reduced surface area they had to deal with.”

To support these early adopters, Patel’s team began growing the cluster and building production-grade services. “We integrated with Prometheus for monitoring, with a Grafana front end; we used Fluentd to push logs to Elasticsearch, so that gives us log aggregation,” says Patel. The team also added dozens of open-source components, including CNCF projects and has made contributions to Kubernetes, Terraform, and kube2iam.

There are now more than 60 development teams running Kubernetes in Nordstrom Technology, and as success stories have popped up, more teams have gotten on board. “Our initial customer base, the ones who were willing to try this out, are now going and evangelizing to the next set of users,” says Patel. “One early adopter had Docker containers and he was not sure how to run it in production. We sat with him and within 15 minutes we deployed it in production. He thought it was amazing, and more people in his org started coming in.”

For Nordstrom Technology, going cloud-native has vastly improved development and operational efficiency. The developers using Kubernetes now deploy faster and can focus on building value in their applications. One such team started with a 25-minute merge to deploy by launching virtual machines in the cloud. Switching to Kubernetes was a 5x speedup in their process, improving their merge to deploy time to 5 minutes.

“With Kubernetes, without even trying to make our cluster efficient, we are currently at 40 percent CPU utilization — a 10x increase. we are running 2600+ customer pods that would have been 2600+ VMs if they had gone directly to the cloud. We are running them on 40 VMs now, so that’s a huge reduction in operational overhead.”

Speed is great, and easily demonstrated, but perhaps the bigger impact lies in the operational efficiency. “We run thousands of VMs on AWS, and their overall average CPU utilization is about four percent,” says Patel. “With Kubernetes, without even trying to make our cluster efficient, we are currently at 40 percent CPU utilization — a 10x increase. We are running 2600+ customer pods that would have been 2600+ VMs if they had gone directly to the cloud. We are running them on 40 VMs now, so that’s a huge reduction in operational overhead.”

Nordstrom Technology is also exploring running Kubernetes on bare metal on premises. “If we can build an on-premises Kubernetes cluster,” says Patel, “we could bring the power of cloud to provision resources fast on-premises. Then for the developer, their interface is Kubernetes; they might not even realize or care that their services are now deployed on premises because they’re only working with Kubernetes.”

For that reason, Patel is eagerly following Kubernetes’ development of multi-cluster capabilities. “With cluster federation, we can have our on-premise as the primary cluster and the cloud as a secondary burstable cluster,” he says. “So, when there is an anniversary sale or Black Friday sale, and we need more containers — we can go to the cloud.”

That kind of possibility — as well as the impact that Grigoriu and Patel’s team has already delivered using Kubernetes — is what led Nordstrom on its cloud native journey in the first place. “The way the retail environment is today, we are trying to build responsiveness and flexibility where we can,” says Grigoriu. “Kubernetes makes it easy to: bring efficiency to both the Dev and Ops side of the equation. It’s a win-win.”

Conclusion

The primary strength of Kubernetes is its modularity and generality. Nearly every kind of application that you might want to deploy you can fit within Kubernetes, and no matter what kind of adjustments or tuning you need to make to your system, they’re generally possible.

Of course, this modularity and generality come at a cost, and that cost is a reasonable amount of complexity. Understanding how the APIs and components of Kubernetes work is critical to successfully unlocking the power of Kubernetes to make your application development, management, and deployment easier and more reliable.

Likewise, understanding how to link Kubernetes up with a wide variety of external systems and practices as varied as an on-premises database and a Continuous Delivery system is critical to efficiently making use of Kubernetes in the real world.

Throughout this book we have worked to provide concrete real-world experience on specific topics that you will likely encounter whether you are a newcomer to Kubernetes or an experienced administrator. Regardless of whether you are facing a new area in which you need to become an expert, or you simply want a refresher about how others have addressed a familiar problem, hopefully, the chapters in this book have enabled you to learn from our experience. We also hope that in this learning, you gain the skills and confidence to use Kubernetes to its fullest capabilities. Thank you and we look forward to seeing you out in the real world! …