Co-authored by Krishna K Chandrasekar, Jaya Karthik and Adam Roberts

The Operator Lifecycle Manager (OLM) extends Kubernetes to provide a declarative way to install, manage, and upgrade Operators on a cluster. Using OLM, we can create a catalog source that holds multiple operators that can be made available for installation from the Operator Hub. We will be using this approach (of many) of OLM. In depth understanding on OLM can be found here .

To install OLM in your cluster, execute

export olm_release=0.15.1
kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${olm_release}/crds.yaml
kubectl apply -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${olm_release}/olm.yaml

More detailed installation for OLM are available here

We…


This is a guide to creating and deploying the memcached operator sample with webhook from scratch using the operator-sdk. The base documentations used are quickstart and admission webhook guides from the operator-sdk official documentation.

The complete memcached sample operator with the webhook can be found here.

First let's start with creating a sample memcached operator.

mkdir memcached-operator
cd memcached-operator
operator-sdk init --domain=example.com --repo=github.com/example-inc/memcached-operator

Create a Memcached API

operator-sdk create api --group cache --version v1 --kind Memcached --resource=true --controller=true

Build and push the operator image

make docker-build docker-push IMG=<some-registry>/<project-name>:<tag>

Install the CRD and deploy the project to the cluster. …

Srutha K

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store