Using Kubernetes operators with Kyma 2.0

With Kyma 2.0, customers will get full access to the underlying Kubernetes cluster. This implies they can deploy Kubernetes Custom Resource Definitions (CRDs) and operators.

Disclaimer: This blog post focuses on Kyma runtime version 2.0 on SAP BTP. Keep in mind that adjustments might be needed at a higher release of Kyma.

custom resource is an extension of the Kubernetes API that is not necessarily available in a default Kubernetes installation. It represents a customization of a particular Kubernetes installation.
Operators are software extensions to Kubernetes that make use of custom resources to manage applications and their components. It is designed to extend the capabilities of Kubernetes, and also simplify application management.

The usefulness of operators especially comes to the forefront when you want to deploy and manage a stateful application. Since stateful applications involve operational overhead which includes:

  • Installation
  • Updates and upgrades
  • Scaling / Sharding
  • among others.

A Kubernetes operator abstracts all these concerns by implementing the above-mentioned operations as a control loop.

As mentioned above, operators are built on top of custom resources, so you declare your intent to deploy a component as a custom resource and the operator will take care of installing it in your Kubernetes / Kyma cluster. Of course, you will first need to have the operator installed. This is normally a simpler operation as compared to operating a stateful component.

You can checkout operatorhub.io for a list of various operators provided by established organizations as well as the community.

Source: https://operatorhub.io/

The usefulness of operators is not limited to just deploying components in Kubernetes.

The basic logic of declaring a specification/state and letting the operator take care of ensuring the actual state matches with the declared state can be extended for numerous scenarios.

One interesting use case is to provision and managed Hyperscaler resources using the operators.

There are operators for Azure and Aws. Using these operators you can provision e.g. Azure Database and connect it from within your Kubernetes cluster.

Check out this Kyma open source link for operator options for Hyperscalers.

Please check out this SAP sample to provision Azure Redis Cache instance using Azure Service Operator and then use it with an application deployed in Kyma runtime.

Takeaways

  • Use operators to manage complex stateful applications
  • Use operators to manage and provision Hyperscaler services.

Looking forward to your feedback and comments here. 

If you have further questions about Kyma, feel free to post them in the answers area of the SAP Community, here is a link.
To stay up to date with everything in Kyma, make sure to visit our Kyma topic page.