This project provides step-by-step instructions on how to build a Level 5 Operator. It was created for the DevConf.CZ 2024.
See the Workshop's abstract: https://pretalx.com/devconf-cz-2024/talk/YE8FEJ/
Instructions are available under the workshop/
directoy.
Starting from an existing containerized application we'll go step-by-step through each level:
- Level 0: Initialize a new operator Project
- Level 1: Allow the deployment of the
Recipe
application - Level 2: Seamless upgrade for the operator and the operand
- Level 3: Backup and restore the operand from the operator itself
- Level 4: Full monitoring and alerting for your operand
- Level 5: Autopilot with the operator!
Happy hacking !
The Recipe
application provides a way to manage cooking recipes. You can Create, Read, Update and Delete (CRUD) recipes conveniently from its web interface. It is composed of the following components, each running as their own container:
- The nginx web server
- A MySQL database for storing data
Attendees are expected to be familiar with the operator pattern.
If you wish to follow this tutorial on your own, you'll need to:
- Install Go
- Install operator-sdk
- Have access to an OpenShift cluster (OpenShit Local formerly CRC might be a good starting point) or Kubernetes cluster, (refer to Kind or Minikube for a local Kubernetes cluster installations).
- As part of metrics scraping we should install Prometheus in our Cluster. If you are using Kind, please apply the following command:
helm install prometheus prometheus-community/kube-prometheus-stack --namespace prometheus --create-namespace
If you attend the Workshop in presence at DevConf.CZ, you'll be provided with access to a lab that has all pre-requisites provisioned and access to a Single Node Openshift lab.