This project contains Kubernetes operator samples that demonstrate best practices how to develop operators with Golang, Operator SDK including Kubebuilder and the Operator Lifecycle Manager Framework.
Table of content
- Example applications
- Example operators
- Get started
- Documentation
Therefor the project includes two example application implementations, which will deployed and operated by the different examples for operator implementations.
The repo contains four operators:
- Application operator: Deploys and manages a simple microservice application.
- Database operator: Deploys and manages a simple database. Used by the application.
- operator-application-scaler: TBD
- operator-database-backup: TBD
The easiest way to get started is to run the application operator which uses prebuilt images of the database controller, the microservice and all other required components.
There are three ways to run the application operator:
- Local Go Operator
- Kubernetes Operator manually deployed
- Kubernetes Operator deployed via OLM
- via operator-sdk
- via kubectl
Overview and Scenarios
- Why you should build Kubernetes Operators
- Day 2 Scenario: Automatically Archiving Data
- Day 2 Scenario: Automatically Scaling Applications
- The Kubernetes Operator Metamodel
Basic Capabilities
- Creating and updating Resources
- Deleting Resources
- Storing State of Resources with Conditions
- Finding out the Kubernetes Versions and Capabilities
- Configuring Webhooks
- Initialization and Validation Webhooks
- Converting Custom Resource Versions
- Defining Dependencies
Advanced Capabilities
- Exporting Metrics from Kubernetes Apps for Prometheus
- Accessing Kubernetes from Go Applications
- How to build your own Database on Kubernetes
- Building Databases on Kubernetes with Quarkus
Development and Deployment
Golang
- Importing Go Modules in Operators
- Accessing third Party Custom Resources in Go Operators
- Using object-oriented Concepts in Golang based Operators
To start developing operators, we recommend to get familiar with the Kubernetes Operator Metamodel first.