What is Kubernetes?
Kubernetes is an open-source container management system developed by Google and made available to the public in June 2014. The goal is to make deploying and managing complex distributed systems easier for developers interested in Linux containers. It was designed by Google engineers experienced with writing applications that run in a cluster.
Kubernetes—or K8s as it is commonly called—was the third container cluster manager developed by Google, improving core scheduling architecture and a shared persistent store at its core. Kubernetes APIs that process REST operations are similar to other APIs.
Of all the technologies to emerge over the past decade, Kubernetes is one of the most important. By automating management tasks that would not be feasible to perform by hand in most situations, it plays a critical role in deploying containerized applications both in the cloud and on-premises.
But However, Kubernetes is a complex technology. Getting started with Kubernetes requires becoming familiar with several types of tools and concepts (like nodes, pods, clusters, and services). And, depending on exactly how you are using Kubernetes, the specific approach you take to getting started will vary.
If that sounds intimidating, keep reading. This page explains all of the essentials you need to know to begin your Kubernetes journey.
[Learn More: Kubernetes Observability]
Understanding Kubernetes (K8s) and Its Value for DevOps
Kubernetes is an open-source container management system developed by Google and made available to the public in June 2014. The goal is to make deploying and managing complex distributed systems easier for developers interested in Linux containers. It was designed by Google engineers experienced with writing applications that run in a cluster.
Kubernetes—or K8s as it is commonly called—was the third container cluster manager developed by Google, following internal-use only Borg and Omega. Similar to Omega, K8s has improved core scheduling architecture and a shared persistent store at its core. It differs from Omega in that the store is not exposed directly to trusted control-plane components but accessed through a REST API. Kubernetes APIs that process REST operations are similar to other APIs.
In 2015 the Linux Foundation and Google joined forces to form the Cloud Native Computing Foundation (CNCF) and Kubernetes was donated as a seed technology. A stable release of K8s was launched in December, 2017.
[Learn More: Continuous Intelligence with Kubernetes]
What Can You Do With Kubernetes?
Kubernetes allows companies to harness more computing power when running software applications. It automates the deployment, scheduling, and operation of application containers on clusters of machines—often hundreds of thousands or more—in private, cloud or hybrid environments. It also allows developers to create a “container-centric” environment with container images deployed on Kubernetes or integrate with a continuous integration (CI) system.
As a platform, K8s can be combined with other technologies for added functionality and does not limit the types of applications or services that are supported. Some container-based Platform-as-a-Service (PaaS) systems run on Kubernetes. As a platform K8s differs from these PaaS systems in that it is not all-inclusive and does not provide middleware, deploy source code, build an application, or have a click-to-deploy marketplace.
To learn more about why you should use Kubernetes, read the article “Why Use Kubernetes.”
Kubernetes Basics
Kubernetes is an orchestrator, which means that it manages application environments by automating tasks that human operators would otherwise have to perform manually. Those tasks include operations such as starting and stopping different infrastructure components; providing load-balancing to ensure that requests are distributed evenly across an environment; and managing the exchange of information between different parts of an application environment.
Kubernetes is most often used to orchestrate containers. However, Kubernetes can also be used to orchestrate other types of application infrastructures, including virtual machines.
Click here to learn how to get started with Kubernetes.
Kubernetes Terminology
There are a few Kubernetes-specific terms that are useful to know when starting out with K8s:
Kubernetes API – flexible API (can be accessed directly or with tools) with RESTful interface that stores the state of the cluster.
Kubectl – command line interface for running commands.
Kubelet – an agent that uses PodSpecs to ensure containers are healthy and running according to specifications.
Image – files that make up the application that runs inside the container.
Pod – a set of containers that are running on a cluster.
Cluster – master with multiple worker machines (called nodes) that run the applications in a container.
Node – a worker machine with services to run a pod, managed by the master component.
Minikube – a tool that runs a cluster node inside a VM on a local computer.
Controller – a control loop that ensures the desired state matches the observed state of the cluster.
DaemonSet – ensures nodes run a copy of a pod when a node is added to a cluster.
What Does Kubernetes Do?
The main reason to use Kubernetes is to eliminate the need to perform tedious tasks, like manually starting and stopping containers or assigning containers to individual servers.
Indeed, if you have a large-scale container deployment, Kubernetes (or a similar orchestration tool) is essential for making it practical to manage the environment. You can get away with managing perhaps a half-dozen container instances by hand, but beyond that point, it becomes infeasible to manage an application environment without the automation provided by Kubernetes.
Beyond its automation benefits, Kubernetes provides some other valuable features. Although Kubernetes is not a security tool, it lets you implement some security protections (using features like role-based access control and pod security policies) that add security to containerized application environments. Kubernetes also makes it easy to migrate an application deployment from one infrastructure to another, since Kubernetes configurations and data are portable across different infrastructures.
Kubernetes Distributions
Kubernetes is open source. You can download the Kubernetes source code from GitHub and compile it yourself if you wish. However, installing and updating Kubernetes in this way is complicated, unless you want to build Kubernetes from source in order to help teach yourself the ins and outs of the platform, or you are using a host environment where prebuilt Kubernetes distributions are not available for some reason. However, compiling Kubernetes from source is usually not worth all the trouble and effort.
For most teams, using a Kubernetes distribution makes more sense. A Kubernetes distribution is a prebuilt version of Kubernetes that you can install using packages instead of having to compile from source. Most Kubernetes distributions are also preconfigured in certain ways to make installation and setup easier, and many come with additional tools or integrations that add functionality to the core Kubernetes platform.
In this way, you can think of Kubernetes distributions as being akin to Linux distributions. Most people use Linux distributions that come prebuilt and preconfigured to serve different purposes (like powering desktops, servers, or networking equipment).
Popular Kubernetes distributions include Red Hat OpenShift, Rancher, Canonical's Kubernetes distribution for Ubuntu, and SUSE's CaaS platform. These distributions can be installed on-premises or on a cloud-based infrastructure that you provision yourself. As noted below in subsequent pages, there are also special Kubernetes distributions designed for different types of deployments.
In addition, all of the major public cloud providers offer hosted Kubernetes services, such as AWS EKS and Azure AKS. These cloud-based services allow you to set up a Kubernetes cluster without having to maintain or manage your own infrastructure, although they typically offer fewer opportunities for configuration tweaks.
Kubernetes Cluster
Kubernetes Clusters are a set of multiple worker machines (called nodes) that run the applications in a container.
The Value of Kubernetes and Container Services
Kubernetes and container services enable software to run reliably when moved from one computing environment to another, regardless of compatibility. It allows application developers and IT administrators to run multiple application containers on a common shared operating system (OS) across clusters of servers, called nodes.
Application containers are isolated from each other, but they share the OS kernel, and the host (i.e. shared parts of the operating system) are read-only. In this way, all components of an application are separate from the underlying host infrastructure, which makes deploying and scaling in different cloud and OS environments easier.
Containers are more lightweight—gigabytes as opposed to megabytes—and use fewer resources than virtual machines (VMs). A container typically consists of an application, its dependencies, library, binaries, and configuration files. A VM contains the runtime environment plus its own operating system, making it more cumbersome and less portable.
A Kubernetes orchestration platform is virtualization at the OS level. It provides a virtual platform for applications to run on with OS resources called via a REST API. It is a form of microservices architecture using portable executable images that contain software and all of its dependencies.
In the past heavy, non-portable applications were the standard. Now, with automated container systems like Kubernetes, applications can be built with a single OS operation supporting multiple containers across different computing environments—regardless of platform. As an example, Google runs billions of containers weekly.
Kubernetes Metrics
After deploying Kubernetes, there are a set number of metrics that you track for performance.
These metrics include:
Resource utilization metrics
Cluster status information
Kubernetes log data
To learn more about measuring Kubernetes performance, view our learning course on “Advanced Kubernetes Metrics.”
Kubernetes Logs
As has already been described, Kubernetes is first and foremost an orchestration engine. To measure and monitor Kubernetes and its workloads, it’s important review the log outputs. Kubernetes has limited capabilities to view and collect internal logs within various clusters and containers.
The article below covers how Kubernetes logging is structured, how to use its native functionality, and how to use a third-party logging engine to really enhance what can be done with logos generated within a Kubernetes environment.
Read More: Kubernetes Logs
Kubernetes Monitoring
Kubernetes monitoring is a proactive method of reporting on clusters and Kubernetes containers. Monitoring these clusters involves tracking resource utilization, memory, CPU, storage, and more.
Click to learn more about Kubernetes Monitoring.
Troubleshooting Kubernetes
Instead of monitoring a static set of physical or virtual machines, Kubernetes containers are more complex due to the high volume and shorter lifespans. Thousands of containers now live for mere minutes while serving millions of users across hundreds of services. In addition to the containers themselves, development teams must also monitor the Kubernetes system and its many components, ensuring they are all operating as expected.
To learn more, read the article “Troubleshooting Kubernetes.”
Kubernetes Dashboard
The official Kubernetes team maintains a Web UI Dashboard, which is a quick and convenient way to manage and troubleshoot cluster resources.
In the link below, we discuss how to deploy and utilize a standard Kubernetes Dashboard and show the benefits that a Sumologic kubernetes dashboard provides.
Read: Kubernetes Dashboard
Kubernetes Security
Kubernetes security is challenging because it is a sprawling platform composed of many different parts. Each of those components carries its own security risks and vulnerabilities.
Here’s an overview of the key parts of a Kubernetes environment that have security risks:
Containers
Host operating systems
Container runtimes
Network layer
API
Kubectl (and other management tools)
To learn more about Kubernetes vulnerabilities, read the article “Kubernetes Security and DevSecOps.”
Kubernetes Trends
Kubernetes is an ecosystem with a passionate community that has been active since 2017. Therefore, it’s natural to see ongoing trends in usage, integrations, strategies, and technology for leveraging Kubernetes.
Learn more in our article “Kubernetes Trends.”
Kubernetes Alternatives and Comparisons
Kubernetes is often compared to other container and deployment services. Below is a list of several Kubernetes alternatives and comparisons.
Kubernetes Integrations
Sumo Logic offers a number of applications that integrate with Kubernetes to protect cloud-native systems from from vulnerabilities across images, containers, Kubernetes, and your running deployments. Learn more about:
Getting Started With Kubernetes Monitoring
Kubernetes container management system allows enterprises to create an automated, virtual, microservices application platform. By using container services, organizations can build, deploy, and horizontally scale lightweight applications across multiple types of server hosts, cloud environments, and other infrastructure more efficiently.
To get started using Kubernetes monitoring, view our Kubernetes Monitoring Solution.
DevSecOps platform for Kubernetes
Intuitive dashboards that take advantage of the Kubernetes hierarchies