Ansible Operator: What is it? Why it Matters? What can you do with it?


The Red Hat Ansible Automation and Red Hat OpenShift teams have been collaborating to build a new way to package, deploy, and maintain Kubernetes native applications: Ansible Operator. Given the interest in moving workloads to Kubernetes, we are happy to introduce a new tool that can help ease the move toward cloud native infrastructure.

What is Kubernetes? The simplest definition of Kubernetes I’ve ever used is, “Kubernetes is a container orchestrator.” But that is a simplified definition.

What is OpenShift? Red Hat OpenShift Container Platform is an enterprise-grade Kubernetes distribution. It enables management of container applications across hybrid cloud and multicloud infrastructure.

First, let’s identify the problem operators can help us solve. Operators help simplify deployment, management, and operations of stateful applications in Kubernetes. But, writing an operator today can be difficult because of the knowledge of Kubernetes components required to do so. The Operator SDK is a framework that uses the controller-runtime library to help make writing operators more simple. The SDK enables Operator development in Go, Helm, or Ansible.

Why It Matters

What can an Ansible Operator give us that a generic operator doesn’t? The same things Ansible can give its users: a lower barrier to entry, faster iterations, and the power of Ansible and its ecosystem. Put more simply, an operator is designed to watch and respond to the resources in your cluster to enable your application to run as desired. After the Operator SDK is invoked, it’s Ansible code as opposed to a common approach of handling these events with Go code.

In Reaching for the Stars with Ansible Operator, David Zager goes into detail about how to build an Ansible Operator. In the blog post, David takes you on a journey building an Ansible Operator using an Ansible Role pulled from Ansible Galaxy. Legacy applications already managed with Ansible can find a new home on a choice of Kubernetes distribution, including Red Hat OpenShift. Complex apps that may have previously been impractical to make the leap to cloud native infrastructure may now be able to migrate with relative ease.

Learn More

If you want to learn how to develop your own Ansible Operator using Operator SDK, my friends on the OpenShift team built a course on Ansible Operators for us to get started. There are also several other courses available for OpenShift.

Originally posted on Ansible Blog

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *