Building Operators with Ansible

Request more info

Challenge

Operators are usually written in Go by software developers that are highly familiar with Kubernetes.

Solution

Ansible® is a first class citizen in the Operator SDK. Ansible-based Operators provide 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.

Learn the basics of Kubernetes

Key components, architecture, and how to get started

Download technology detail

Why Build Operators with Ansible? 

Ansible Fits naturally into a Kubernetes Environment. Both use YAML to describe the desired state of the world. Both Ansible and OpenShift have vibrant communities working to solve common problems. Combining Ansible and Kubernetes frees up application engineers to minimize the new skill sets required to maximize time to delivery.


The same tried and trusted Ansible tooling lets you Automate and Orchestrate your applications across both new and existing platforms allowing teams to transition without having to learn new skills. With the k8s module, an Ansible user can manage applications on Kubernetes, on existing IT or across both with one simple language.

Featured webinar


Operators for Ansible people

In this webinar Red Hat provides an overview of Ansible Operators. Highlights include:

  • Why use Ansible with Kubernetes
  • Extending Kubernetes API
  • Advanced patterns

Watch video

Speakers

Brian Gracely Michael Hrivnak
Principal Software Engineer, Red Hat

Make an Operator with Ansible

This 30 minute interactive learning course from Katacoda provides a step-by-step example for developing an Ansible Operator using Operator SDK.

Will you learn:

  • How to make an Ansible-based Operator
  • How to map Custom Resource events to Ansible code
  • How to pass extra variables to Ansible code via the operator
  • How to leverage existing roles from Ansible Galaxy
  • How to deploy and run your Ansible-based operator in a OpenShift cluster
  • How to run your Ansible-based operator Locally for development

Start course

Start using Operators


Explore Operators

OperatorHub.io is a home for the Kubernetes community to share Operators. Find an existing Operator or list your own today.

Find or contribute roles

Ansible Roles can be the foundation of your Ansible Operators. Ansible Galaxy provides thousands of roles on which to base your Operator. Be inspired by or leverage the Ansible Community to create your Operator.

Ansible Operator SDK Developer Guide

Ready to dive in? The Ansible Operator SDK Developer Guide is available to get you started writing Ansible-based Kubernetes Operators now.
 

Blog


Ansible Operators: What is it, why it matters, what can you do with them

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.

Start reading

OpenShift Blog Post: Reaching for the stars with Ansible Operator

In this post I will show you how to use Roles published to Ansible Galaxy as an Operator to manage an application in Kubernetes.

Start reading