Understanding Kubernetes

Before we begin, let's review what you'll need to know and be able to do to learn Kubernetes First, you'll need access to a computer running Windows, Linux, or macOS. Second, you'll need internet access and a terminal application where you can run simple Unix commands like make directory, mkdir, and change directory, cd. Next, you need to be able to describe container technology from a 10,000-foot view. Simply knowing a tiny bit about Docker or another container technology like Podman is more than enough. Finally, you'll need a text editor like VS Code to view and edit the Kubernetes manifests. There's no need to be a tech expert to work through this on Kubernetes, so if you've got a terminal app, a text editor, a high-level understanding of Docker, and the desire to learn more about Kubernetes, you're ready, so let's go.

What is Kubernetes?

Before starting to know about Kubernetes let's discuss a few interesting topics on how Kubernetes is helpful for day to day in the life of software developers and other big tech giants firstly it is an open-source project developed in 2015, Kubernetes has proven to be one of the most exciting and dynamic software projects of all time. Kubernetes is eating the world and surveys of software engineers, DevOps professionals, and chief technology officers show us this is true. According to the official 2021 Cloud Native Computing Foundation survey, 96% of organizations are either using or evaluating Kubernetes, and more than 5.6 million developers are using it today. Kubernetes' release was announced by Google in 2014 and the system's design was influenced by Google's internal cluster management system called Borg. Instead of keeping the idea to themselves, Google worked with the Linux Foundation to form a new organization called the Cloud Native Computing Foundation and donated Kubernetes as the first open-source project under the purview of the CNCF.

Kubernetes, also known as "Kates" or K8s, is Greek for the word pilot or helmsman of a ship. Kubernetes has this name because it's a container orchestrator. Like the captain of a ship leading their crew, Kubernetes makes decisions about where and how containerized applications are launched on a server, when to scale up and down the number of application replicas, and what to do when an application or server stops working. Kubernetes is an open-source project written in the programming language Go and it's designed to provide planet-scale deployment, meaning that the biggest companies in the world can run and grow their applications using the platform and rapidly-growing companies can start small and grow to a near-infinite scale.

Spotify is one example of a company that uses Kubernetes. The music and podcast streaming platform has over 200 million monthly users. And before using Kubernetes, the company used its own container orchestration platform called Helios. Since its debut, Spotify has experienced explosive growth. And in 2018, the engineering team realized they couldn't keep up with maintaining Helios so they decided to migrate their workloads to Kubernetes. Migrating to Kubernetes provided the company with many benefits.

In an interview about the migration, site reliability engineer James Wen said, "The biggest service currently running on Kubernetes "takes about 10 million requests per second as an aggregate service and benefits greatly from autoscaling. "Before, teams would have to wait for an hour "to create a new service and get an operational host "to run it in production. "But with Kubernetes, they can do that on the order "of seconds and minutes." 10 million requests per second is a lot.

But Kubernetes can handle it by scaling up the number of pods and nodes when needed and it will also scale those things down when there are fewer requests, providing automatic elasticity that saves you and your company money on compute resources. Kubernetes can run on any kind of server, in an on-prem data center, a public cloud, or a hybrid of both. You can install Kubernetes on your own or you can use a managed Kubernetes service.

Google, Amazon, Microsoft, IBM, Red Hat, DigitalOcean, and other cloud providers offer Kubernetes as a service product that lets you install Kubernetes with the click of a button and start deploying containerized applications fast. There's a lot of buzz around Kubernetes and for good reason. It's one of the biggest open-source software projects in history, second only to the Linux kernel. And it has an enormous community of code contributors, technical educators, and advocates dedicated to the project, all supported by the CNCF.

What are containers?

we know that Kubernetes is a container orchestration system, but what exactly are containers? let's delve into the concept of containers themselves. Initially popularized by Docker, containers are a technology that combines an application's code with its necessary runtime configuration into a single unit. Before containers, separate servers or virtual machines were required to run each instance of an application. However, containers offer numerous advantages. Firstly, they are highly portable and can run on any machine with a container engine installed, regardless of the underlying operating system. Secondly, containers consume fewer CPU and memory resources compared to virtual machines or applications running directly on servers, enabling the consolidation of more containers on fewer servers, and leading to cost savings. Thirdly, since containers contain everything required to run the application, including the operating system, code, and dependencies, they can be rapidly created and launched in seconds. Finally, due to these benefits, containers can be replicated quickly, allowing for elastic scaling up or down based on the desired number of replicas.

Now, let's review two essential terms related to containers. An image is a file containing executable code that can be executed as a container. These container images are stored in container registries, which are databases that house the images. Registries can be public, accessible to everyone, or private, limited to specific users or service accounts with permission. Docker Hub, Quay, and Google Container Registry are examples of managed container registries.

While Docker is the most well-known container technology, other alternatives like Podman, containerd, rkt, and LXD exist, and with more likely to emerge in the future. It's interesting to note the nautical themes used to represent Kubernetes and Docker. Kubernetes takes its name from the Greek word for a ship's captain and uses the helm of a ship as its logo. Docker, on the other hand, adopts shipping containers and incorporates whale imagery, with Moby Dock serving as its mascot, symbolizing a whale hauling shipping containers. This nautical analogy suggests that Docker's containers are delivered to the ship being piloted by Kubernetes.

Containers have gained immense popularity as a means to package and deploy applications and services, with Kubernetes emerging as the most widely adopted solution for managing production applications.

What is cloud-native?

Cloud-native refers to an approach in which applications are built and deployed using open-source technologies that leverage cloud computing services for automatic deployment and scalability. The Cloud Native Computing Foundation (CNCF) defines cloud native as empowering organizations to develop and run scalable applications in dynamic environments, including public, private, and hybrid clouds. This paradigm shift aims to remove silos between system administrators, infrastructure engineers, and software engineers, enabling faster and more automated testing and deployment processes. The CNCF, a part of the Linux Foundation, supports the cloud-native community by organizing conferences, creating certification exams, marketing open-source projects, and designating projects based on their maturity levels. Kubernetes, the CNCF's first graduated project, is heavily supported by the foundation and serves as a leading container orchestration platform. As you explore Kubernetes, you will come across other CNCF-backed projects such as Helm, Prometheus, and Linkerd. With this understanding of Kubernetes, containers, and the cloud native landscape, we are ready to delve into spinning up a Kubernetes cluster.