• Home
  • Develop an Operator with Kubebuilder

Learn how to control custom resources with Kubebuilder-based Operators

Develop an Operator with Kubebuilder

Learn how to control custom resources with Kubebuilder-based Operators
Develop an Operator with Kubebuilder

In this lab, you will experience what it’s like to create and run a Kubernetes Operator that manages a custom resource. The Operator is created using the Kubebuilder tool. The custom resources will be called Ats.

Kubebuilder was released as open source in August from 2018. Two technical staff members from Google, Phillip Wittrock and Sunil Arora, founded the project. Kubebuilder is now a Kubernetes special interest group (SIG) under Apache License 2.0.

The Operator pattern is an important technique to extend and build upon the basic features of Kubernetes. Operators are controllers with roles that observe and manage associated CRDs . There are a variety of projects that provide tools to build Operators. Kubebuilder is one prominent technique.

This lab stands on the shoulders of others. The [at utility](https://en.wikipedia.org/wiki/At_(command) is found on many operating systems, and it allows you to schedule a command to run at a future date. There is a project called cnat and it stands for cloud native at. There is also an outdated tutorial on Kubebuilder with cnat . Many improvements were applied to Kubebuilder which deprecated that tutorial. Ken Sipe created an updated lab inspired by at, cnat, and the old tutorial. In turn, this lab is a translation of Ken’s lab. You now get to enjoy the broad shoulders of open source and the cloud native community.

In this lab, you will learn how to:

    ☐ Modify, build, and test code in a Kubebuilder skeleton project
    ☐ Create a new CRD named At using Go structs and automation
    ☐ Define RBACs created through generations from code annotations
    ☐ Create a controller for observing and managing the at custom resources
    ☐ Associate Kubernetes events back to the managed resources

  • LEVEL

    Intermediate

  • DURATION

    30 minutes

  • UPDATED

    31 Dec, 2021