SlideShare a Scribd company logo
DXP Cloud
Extending Kubernetes
with Operators
Iliyan Peychev
Director of Research Development Innovations)
Liferay Cloud
Extending Kubernetes
Source - https://kubernetes.io/docs/concepts/extend-kubernetes/
1. Kubectl plugins: extend the kubectl binary, affect the local user's environment
2. API Access Extensions: allow/block authenticating requests
3. Custom Resources: extensions of the Kubernetes API
4. Scheduler Extensions: assigns pods to nodes. The default scheduler can be
replaced, or multiple schedulers can run simultaneously
5. Controllers: custom resource API + control loop is called the Operator pattern
6. Network Plugins: allow for different implementations of pod networking
7. Storage Plugins: add support for new types of storage
Kubernetes Extension Points
We will
focus here
Operator Pattern
"Operators are software extensions to
Kubernetes that make use of custom resources to
manage applications and their components.
Operators follow Kubernetes principles, notably
the control loop"
Kubernetes Operator Pattern
Source https://kubernetes.io/docs/concepts/extend-kubernetes/operator/
Extending Kubernetes with Operators
How Operators can be useful?
Deploying Applications on
demand
An Operator can deploy user's
applications on demand.
For example, it can check for
new releases of your
application and deploy (release)
automatically on given
environment.
It could also rollback releases in
case of failure.
Performing application
upgrades
If an application has to be
upgraded, the Operator can do
most of the underlying work
like:
● Update app version
● Apply new configuration
● Perform DB backup
● Apply DB schema changes
Perform backup/restore
An Operator perform
backup/restore of the DB of
given application
● The backup could be done
automatically on given
schedule.
● Restore could be done
automatically, if some
conditions are met
Chaos engineering
Why could it not check the
resiliency of our system, and
the readiness of our SRE Team?
An Operator can cause
disruptions in a given
environment, for parts of it, or
as a whole
Where to get operators?
Operator Architecture
Source:
https://book.kubebuilder.io/architecture.html
Operator Architecture
Example:
deploy an application
stack on demand
Software Development cycle
Extending Kubernetes with Operators
Extending Kubernetes with Operators
Disadvantages (non-exclusive list)
Extending Kubernetes with Operators
Example Release Manifest
Creating an Operator
in Go
---
Status
Conditions
Permissions
Configurations
---
Webhooks
Default and
admission ones
---
Reconcile loop
Maintain the state
of the applications
close to the
desired one
---
Create CRD
Describe your
application stack.
Each application
should have its
own CR
Creating an
Operator in
Go
Step 1
Use Kubebuilder or Operator SDK to create the skeleton of the operator
Step 2
Define the Custom Resources (CR  create Custom Resources Definition yaml files. They
describe your applications.
Step 3
Implement the reconciliation loop - take some actions when a CR arrives
Step 4
Implement admission webhooks, status conditions, define permissions, configurations.
Lets flesh out our
example
Step 1  define Custom Resources
Step 1  define Custom
Resources
There is no need to write the CRDs by hand
Kubebuilder/Operator SDK will generate
them for you from your Go structures
Generate CRD for the Release Manifest from your Go structures
Generate CRD for the Release Manifest from your Go structures
Define CRD for each application
● CRD for the API
● CRD for the Console
● CRD for the Admin
etc.
CRD for the Release Manifest - done!
Define CRD for each application
e.g. for Console
For each CR, there is a controller
skeleton generated
Step 2  write the reconciliation logic
The developer should write the
reconciliation logic
This normally means fetching the CR
from Kubernetes, via the Client, then
Create other CR, or Kubernetes
native objects (Deployment, PVC,
StatefulSet)
Step 2  write the reconciliation logic
Update the status conditions
of the CR
Create a finalizer (if needed), and
execute it when the CR is deleted
Step 2  write the reconciliation logic
Fetch the CR of the
release
Resolve the dependencies
For each app being
released, create its own CR
Then its own controller will
be invoked
Each app controller will
create Kubrnetes native
objects
Normally there is some kind of template,
and the native Kubernetes object(s) are
being created based on it
Step 2  write the reconciliation logic
Step 2
template
Step 2  prepare and render the template
Step 2  create/update native k8s objects
This is not a must, but a good practice
Step 3  write webhooks, status conditions,
configurations
Webhooks allow/reject CR, or set default values
Status conditions - represent the current status
Step 3
Webhook
Step 3
Status conditions
Note: this is an external example - a
Cert Manager Pod
Implement finalizers
Step 3  Finalizers
When additional actions need to be
performed on deleting the custom resource
Operator's own configuration file can be a Kind too
Step 3  Custom configuration
Step 3  Custom configuration
Step 3  Custom configuration
Writing integration
tests
Write tests
Write tests
Write tests
Write tests
Write tests
Writing integration tests
Operator SDK and Kubebuilder come with a framework to create integration tests
A test environment is being created for you on the scaffolding step
Use it to create integration tests for both the controllers and webhooks
Writing
integration
tests
Writing integration tests
Thank you!

More Related Content

What's hot (20)

PDF
Intro to ReactJS
Harvard Web Working Group
 
PPTX
ReactJs presentation
nishasowdri
 
PPTX
React render props
Saikat Samanta
 
PPTX
ReactJS for Beginners
Oswald Campesato
 
PDF
Introduction to React & Redux
Boris Dinkevich
 
PPTX
React + Redux + TypeScript === ♥
Remo Jansen
 
PDF
State Models for React with Redux
Stephan Schmidt
 
PPT
React js
Jai Santhosh
 
PDF
Redux Universal
Nikolaus Graf
 
PDF
Evan Schultz - Angular Camp - ng2-redux
Evan Schultz
 
PDF
React & Redux
Federico Bond
 
PDF
Workshop React.js
Commit University
 
PPTX
React js
Oswald Campesato
 
PPTX
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
PDF
An Overview of the React Ecosystem
FITC
 
PPTX
React js programming concept
Tariqul islam
 
PDF
Using redux
Jonas Ohlsson Aden
 
PDF
Angular2 workshop
Nir Kaufman
 
PDF
Redux with angular 2 - workshop 2016
Nir Kaufman
 
PPTX
[Final] ReactJS presentation
洪 鹏发
 
Intro to ReactJS
Harvard Web Working Group
 
ReactJs presentation
nishasowdri
 
React render props
Saikat Samanta
 
ReactJS for Beginners
Oswald Campesato
 
Introduction to React & Redux
Boris Dinkevich
 
React + Redux + TypeScript === ♥
Remo Jansen
 
State Models for React with Redux
Stephan Schmidt
 
React js
Jai Santhosh
 
Redux Universal
Nikolaus Graf
 
Evan Schultz - Angular Camp - ng2-redux
Evan Schultz
 
React & Redux
Federico Bond
 
Workshop React.js
Commit University
 
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
An Overview of the React Ecosystem
FITC
 
React js programming concept
Tariqul islam
 
Using redux
Jonas Ohlsson Aden
 
Angular2 workshop
Nir Kaufman
 
Redux with angular 2 - workshop 2016
Nir Kaufman
 
[Final] ReactJS presentation
洪 鹏发
 

Similar to Extending Kubernetes with Operators (20)

PDF
Kubernetes extensibility: crd & operators
Giacomo Tirabassi
 
PDF
Kubernetes extensibility: CRDs & Operators
SIGHUP
 
PPTX
How kubernetes operators can rescue dev secops in midst of a pandemic updated
Shikha Srivastava
 
PDF
The Operator Pattern - Managing Stateful Services in Kubernetes
QAware GmbH
 
PDF
Operator SDK for K8s using Go
CloudOps2005
 
PPTX
Ofir Makmal - Intro To Kubernetes Operators - Google Cloud Summit 2018 Tel Aviv
Ofir Makmal
 
PDF
Operator Lifecycle Management
DoKC
 
PDF
Operator Lifecycle Management
DoKC
 
PPTX
Demystifying k8s operators
Suman Chakraborty
 
PDF
An intro to Kubernetes operators
J On The Beach
 
PDF
Kubernetes Operators 1st Edition Jason Dobies
budhuradot
 
PDF
Kubernetes Operators Automating the Container Orchestration Platform 1st Edit...
sigemozareer53
 
PDF
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
smalltown
 
PDF
Download full Managing Kubernetes operating Kubernetes clusters in the real w...
duduhasikul
 
PDF
KUDO - Kubernetes Operators, the easy way
Nick Jones
 
PDF
The Kubernetes Operator Pattern - ContainerConf Nov 2017
Jakob Karalus
 
PDF
Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017
Codemotion
 
PPTX
Introduction+to+Kubernetes-Details-D.pptx
SantoshPandey160
 
PDF
Intro to creating kubernetes operators
Juraj Hantak
 
PDF
Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...
Jakob Karalus
 
Kubernetes extensibility: crd & operators
Giacomo Tirabassi
 
Kubernetes extensibility: CRDs & Operators
SIGHUP
 
How kubernetes operators can rescue dev secops in midst of a pandemic updated
Shikha Srivastava
 
The Operator Pattern - Managing Stateful Services in Kubernetes
QAware GmbH
 
Operator SDK for K8s using Go
CloudOps2005
 
Ofir Makmal - Intro To Kubernetes Operators - Google Cloud Summit 2018 Tel Aviv
Ofir Makmal
 
Operator Lifecycle Management
DoKC
 
Operator Lifecycle Management
DoKC
 
Demystifying k8s operators
Suman Chakraborty
 
An intro to Kubernetes operators
J On The Beach
 
Kubernetes Operators 1st Edition Jason Dobies
budhuradot
 
Kubernetes Operators Automating the Container Orchestration Platform 1st Edit...
sigemozareer53
 
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
smalltown
 
Download full Managing Kubernetes operating Kubernetes clusters in the real w...
duduhasikul
 
KUDO - Kubernetes Operators, the easy way
Nick Jones
 
The Kubernetes Operator Pattern - ContainerConf Nov 2017
Jakob Karalus
 
Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017
Codemotion
 
Introduction+to+Kubernetes-Details-D.pptx
SantoshPandey160
 
Intro to creating kubernetes operators
Juraj Hantak
 
Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...
Jakob Karalus
 
Ad

Recently uploaded (20)

PPTX
Engineering the Java Web Application (MVC)
abhishekoza1981
 
PPTX
Human Resources Information System (HRIS)
Amity University, Patna
 
PPTX
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
PDF
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
PDF
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
PDF
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
PDF
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
PPTX
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
PPTX
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
PPTX
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
DOCX
Import Data Form Excel to Tally Services
Tally xperts
 
PPTX
Tally software_Introduction_Presentation
AditiBansal54083
 
PPT
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
PDF
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
PPTX
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
PDF
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PDF
Executive Business Intelligence Dashboards
vandeslie24
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Engineering the Java Web Application (MVC)
abhishekoza1981
 
Human Resources Information System (HRIS)
Amity University, Patna
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pptx
Varsha Nayak
 
Capcut Pro Crack For PC Latest Version {Fully Unlocked} 2025
hashhshs786
 
iTop VPN With Crack Lifetime Activation Key-CODE
utfefguu
 
GetOnCRM Speeds Up Agentforce 3 Deployment for Enterprise AI Wins.pdf
GetOnCRM Solutions
 
Alexander Marshalov - How to use AI Assistants with your Monitoring system Q2...
VictoriaMetrics
 
An Introduction to ZAP by Checkmarx - Official Version
Simon Bennetts
 
Platform for Enterprise Solution - Java EE5
abhishekoza1981
 
Java Native Memory Leaks: The Hidden Villain Behind JVM Performance Issues
Tier1 app
 
Import Data Form Excel to Tally Services
Tally xperts
 
Tally software_Introduction_Presentation
AditiBansal54083
 
MergeSortfbsjbjsfk sdfik k
RafishaikIT02044
 
Beyond Binaries: Understanding Diversity and Allyship in a Global Workplace -...
Imma Valls Bernaus
 
MiniTool Power Data Recovery Full Crack Latest 2025
muhammadgurbazkhan
 
Odoo CRM vs Zoho CRM: Honest Comparison 2025
Odiware Technologies Private Limited
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Executive Business Intelligence Dashboards
vandeslie24
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Ad

Extending Kubernetes with Operators