Discovering Kubernetes Workloads

Objectives

After completing this lesson, you will be able to:
  • Define Kubernetes workloads
  • Compare different types of Kubernetes workloads
  • Identify the best workload type for your application

Kubernetes Workload

Usage scenario

You are a developer, and you want to deploy your application to Kubernetes. You want to understand the concepts of Kubernetes workloads and want to learn which workload type is the best for your application.

What is a Kubernetes workload?

A workload on Kubernetes is basically a containerized application that should be operated and orchestrated by Kubernetes. So, as a developer, you have to decide which workload type is the best for your application to operate it.

Stateless versus Stateful workloads

Before considering the different types of workloads, you should first understand the difference between stateless and stateful workloads:

The decision whether your application is stateful or stateless is very important and should be considered carefully. If you choose the wrong workload type, you might encounter problems later on.

Kubernetes Workload Types

Kubernetes comes with different workload types. Each workload type has its own advantages and disadvantages. The workload type that you choose depends on your application and your requirements.

Why should you use workloads instead of creating and managing Pods directly? The answer is simple: Workloads are higher level objects that abstract the underlying Pods. This means, that you don't have to manage the Pods directly. Instead, you can manage the workload and Kubernetes will take care of the Pods.

Click each button below to discover details about the main workload types / objects and their purpose. All of them are available in SAP BTP, Kyma runtime.

Additional Workload Types on SAP BTP, Kyma Runtime

The SAP BTP, Kyma runtime comes with the Serverless module, that offers you a serverless runtime for you to build, run, and manage serverless applications, such as Functions.

Serverless means, in this context, that you can simply deploy your code without having to worry about the underlying infrastructure. The big benefit of using serverless is that it significantly reduces implementation and operation effort to the absolute minimum. You can simply focus on your code and don't have to worry about the underlying infrastructure.

We will have a closer look at Functions in the next lesson.

Definition of Function

DetailDescriptionExplanation
FunctionA Function is a serverless workload type.Use a Function, if you want to run code without providing a container image. Use cases are for example, a simple API that is triggered to process some data (batch job) or a simple API that is triggered by an event.

Summary

Workloads are a way to abstract the underlying Pods. They are higher-level objects, that allow you to manage your application in a more convenient way. Kubernetes comes with different workload types that are suitable for different use cases. The workload type that you choose depends on your application and your requirements.

Further Reading about Discovering Kubernetes Workloads Concepts

Get more information about Kubernetes workloads concepts here:

Log in to track your progress & complete quizzes