Explaining the Basic Concepts of Kubernetes

Objectives

After completing this lesson, you will be able to:
  • Define what Kubernets is
  • Describe the challenges Kubernetes addresses and solves
  • List six main features of Kubernetes

Usage Scenario: Basic Concepts of Kubernetes

A company operates a variety of applications on its own self-managed systems. The problem they have is that they are running a massive workload of applications without efficiently utilizing their resources. They are looking for a solution to manage their applications and resources more efficiently on a scalable and reliable platform.

They are considering the SAP-managed Kubernetes offering aka SAP BTP, Kyma runtime as a solution to their problem.

You can also learn more about the solution's new capabilities, keep updated, and onboard other developers to your team if you already use SAP BTP, Kyma runtime.

What is Kubernetes?

Before exploring Kyma, let's look at Kubernetes - the underlying technology that Kyma is built on. Kyma is basically a set of extensions to Kubernetes.

"Kubernetes, also known as K8s, is an open-source system for automating deployment, scaling, and management of containerized applications" (Kubernetes.io). Kubernetes is highly portable and can run almost anywhere, whether in a public or private cloud or on-premises. All major cloud providers offer Kubernetes as a managed service (Kubernetes as a Service, or KaaS). SAP BTP, Kyma runtime is one of these managed Kubernetes services.

Kubernetes was initially developed by Google back in 2014 to handle their massive workload of running containers in production and builds upon many years of experience running production workloads internally. Two years later, it was donated to the Cloud Native Computing Foundation (CNCF). The Cloud Native Computing Foundation is a vendor-neutral organization founded in 2015 to advance the development of cloud-native technologies. This consortium and its members (for example, SAP, Google, IBM, Red Hat, Docker, Microsoft, and more) are all working together to define the future of cloud-native technologies such as Kubernetes.

Challenges that Kubernetes Addresses

One of the critical challenges Kubernetes addresses is the efficient management of application workloads.

Many organizations typically have a wide range of applications running on their production servers- either bare metal or virtual machines. These applications are often tightly coupled to the underlying infrastructure and are not portable across different environments (for example, a software installation on a specifically configured Linux server). That makes it difficult to move applications from one environment to another, such as from a test environment to a production environment or from a failed server to a healthy one.

By using containers to ship and operate applications, you can manage applications in a more portable and efficient way. Containers package applications with all their dependencies as a portable and executable unit (container image). The application can be shipped and run on almost any environment with an installed container runtime or engine.

Also, from an economic point of view, most servers are often over-provisioned. Consequently, companies pay a fixed price for permanently allocated capacities (for example, computing power, storage capacity), which are not fully utilized. This is also commonly referred to as idle costs or unused capacity costs and is particularly true for servers operating workloads that do not run at full capacity at all times (for example, during nights or weekends).

Especially, if you want to operate hundreds or even thousands of containers in production simultaneously, you definitely need a way to manage them efficiently.

However, efficiently managing workloads across multiple hosts in your IT landscape can be challenging and complex.

That is where Kubernetes comes in. Kubernetes can efficiently manage and orchestrate workloads by automatically scheduling them to the appropriate host, scaling them as needed, and rolling out new versions of applications.

For example, based on the current high demand, Kubernetes can automatically scale applications horizontally (that is, by adding more instances) and balance incoming traffic across those instances. Kubernetes can also automatically move applications from one host to another if the current host becomes unavailable or if the host is over-provisioned. Kubernetes plays TetrisĀ® with containers to make sure that applications are always running and that they are running in the most efficient way possible.

For these reasons, Kubernetes is also known as Container Orchestrator.

Kubernetes Features

Kubernetes has several features that allow you to manage containerized applications in a scalable and reliable way. Among the most important features are the following:

Service discovery and load balancing

Containers can be exposed using their DNS name or using their IP address. Adopting a load balancing approach, Kubernetes can distribute network traffic to stabilize deployment when container traffic is too high.

Storage orchestration

Storage can be automatically integrated with Kubernetes using a storage system of your choice, such as on-premises storage, public cloud providers, or a networked storage system.

Automated rollouts and rollbacks

Kubernetes allows you to update containers using rolling updates. Kubernetes starts new containers and then kills old ones. This feature also ensures zero downtime during the deployment. Should anything go wrong during the rollout process, Kubernetes rolls back the change for you.

Immutability and self-healing

Everything in Kubernetes is defined declaratively. You specify the desired state of an application or infrastructure, and Kubernetes always ensures that the current state matches the desired state. When a container crashes, Kubernetes will restart it for you. And, when an entire node goes down, Kubernetes moves the containers to a healthy node and shuts down containers that don't respond to your custom health checks.

Secret and configuration management

You can use Kubernetes to store and manage confidential information, such as passwords, tokens, and SSH keys. You can deploy and update Secrets along with application configurations without rebuilding your container images or revealing sensitive information in applications.

Note

Please note that you should not store your secret keys in your version control system or source code. Alternatively to the Kubernetes Secrets, you could also sue SAP BTP destinations or credential store.
Extensibility and ecosystem

The Kubernetes API comes with a standard set of implementations and objects. Kubernetes often defines the API but not the concrete implementation. This allows you to use and switch between different implementations of the same API. For example, you can use different storage systems for persistent volumes. You can also use different container runtimes, such as Docker, rkt, and Rocket. Over time, the Kubernetes ecosystem has grown to a size where you can find a solution for almost any problem. For example, there are solutions for logging, monitoring, service meshes, ingress, and many more. We will cover some of them later in this course.

To get a complete list of all Kubernetes features, check out the Kubernetes documentation.

Summary

In this lesson, you found out what Kubernetes is, what challenges it solves, and how it solves them. Also, you can now describe some of the main features of Kubernetes.

Further Reading about Basic Concepts of Kubernetes

For further reading, see the following sites:

Log in to track your progress & complete quizzes