Offered By: IBM
Kubernetes Operators Advanced
This course covers advanced operator topics including reconciliation, use of Operator Lifecycle Manager to deploy and upgrade operators, and use of Scorecard to test operators.
Continue readingCourse
Containers
2.56k+ EnrolledAt a Glance
This course covers advanced operator topics including reconciliation, use of Operator Lifecycle Manager to deploy and upgrade operators, and use of Scorecard to test operators.
About this Course
Reconciliation
Operators mimic the behavior of core Kubernetes components in many ways, chief among them the process of reconciliation. When a user creates an instance of your operator's type, one or more controllers is responsible for creating that desired state. This course covers the creation of a basic reconcile loop in Golang to create a simple Memcached operator, similar to the Golang operator from the Intermediate course.
Operator Lifecycle Manager (OLM)
OLM is a tool for installing and upgrading operators on a Kubernetes cluster. Operator authors create a Bundle for each version of their operator, which is then published and consumed by OLM. This course covers the creation of a bundle for the simple Memcached operator from above, and then covers the upgrade case by adding a new field, implements migration via conversion webhook, creates a new bundle, and upgrades the deployed operator in-place.
Scorecard
Scorecard is an Operator-sdk command for scaffolding and running test frameworks on a deployed operator. This course first covers using Scorecard to automatically generate and run a basic verification test suite. Then, it shows how to create your own custom test suite with a non-trivial unit test for the above simple Memcached operator.
Learning Objectives
- How reconciliation logic works in Kubernetes controllers
- Constructing your own reconcile loop in a Golang operator
- Getting an introduction to the Operator Lifecycle Manager (OLM)Â
- Deploying and managing an operator using OLM
- Using Scorecard to create a test suite for your operator
Course Syllabus
- Overview of Kubernetes controller reconciliationÂ
- Kubernetes' declarative API
- Explanation of Memcached operator reconciliation via finite state diagram
- Hands-on LabÂ
- Build a simple Golang operator with Operator SDK
- Write reconciliation loop using controller-runtime library
- Overview of Operator Lifecycle Manager (OLM)Â
- What is OLM?
- What is an operator bundle
- Hands-on Lab 1Â
- Install OLM on your cluster
- Package a Golang operator with OLM
- Deploy it to the cluster using OLM
- Hands-on Lab 2Â
- Update operator with a breaking change
- Create a conversion webhook to manage the upgrade
- Use OLM to upgrade operator in-place
- Overview of Scorecard, an Operator SDK tool for building test images for a deployed operator
- Hands-on LabÂ
- Build a Scorecard test suite for Memcached operator
- Write an integration test for Memcached operator
Course Prerequisites
- Basic familiarity with Kubernetes, including using kubectl to create resources on a Kubernetes cluster. You should know how to create, update, and delete Kubernetes resources such as Pods and Services.
- Understanding of the basic construction, deployment, and use of operators
- Completion of the Intermediate course on Kubernetes operators
The requirements of the hands-on labs are as follows:
- Requirements for all hands-on labsÂ
- Operator SDK v1.5.0+ installed
- Kubectl v1.17.0+ installed
- Admin access to a Kubernetes cluster. Note that the version of Operator Lifecycle Manger currently(8/23/21) on IMB Cloud's Kubernetes Service is incompatible with this tutorial. For running a cluster locally, see the Minikube docs.
- Docker v3.2.2+ installed
- Access to a Docker image repository such as Docker Hub or quay.io
- Golang v1.16.0+ installed
- Module 1 Lab requirementsÂ
- No additional requirements
- Module 2 Lab requirementsÂ
- Operator Lifecycle Manager installed on your Kubernetes cluster. The Operator-sdk command operator-sdk olm install will install a compatible version of OLM on your cluster. Note that currently(8/23/21) the version of OLM installed on IBM Cloud IKS clusters is incompatible with this tutorial.
- Module 3 Lab requirementsÂ
- No additional requirements
Estimated Effort
6 - 8 Hours
Level
Advanced
Language
English
Course Code
CO0302EN
Course Number
CO0302EN
Estimated Effort
8 hours
Difficulty
Advanced
Topic
Containers
Language
English