SlideShare a Scribd company logo
Kubernetes Operators
Introduction to
Ofir Makmal | CTO | SELA Group
Ku·ber·ne·tes
Kubernetes can be many things… Its a scalable, self-healing and resilient
● Container orchestration engine
● Cluster management system
● Mesos, Swarm, Rancher, _______ replacement
● Microservices, CI/CD, Machine Learning platforms
● Portable ‘cloud’
But, It’s NOT just another way to run containers...
In just three years time…
Recent surveys from medium & large US-based companies shows that over 60%
are currently using Kubernetes to run workloads
● Trials/POC stages through development to production stages
It has a huge community:
● ~36K Stars
● ~1600 Contributors!
● ~13K Forks
● ~1000 Pending pull requests!
Ofir Makmal - Intro To Kubernetes Operators - Google Cloud Summit 2018 Tel Aviv
We all know
Kubernetes
Building Blocks
And we all know how to run a stateless service...
Creating a Namespace, defining a Deployment to manage a
ReplicaSet of Pods, exposing them as Services and Ingress, maybe
mounting Persistent Volumes into their containers, injecting
ConfigMaps and Secrets as environment variables.
After deployment, we expect that Kubernetes will take care the rest.
What about stateful applications?
Stateless is easy, stateful is hard
i.e - Cassandra, a Distributed Database.
After deployment, comes operations.
● Backups and Restore
● Upgrades
● Auto-scaling
● Redistribution of data when cluster size changes
● Leader election in case of failure and preserving a Quorum
These kind of stateful applications are usually used as a dependency for other
stateless applications, and needed to be discovered and consumed.
Custom Resource Definition (CRD)
“A resource is an endpoint in the Kubernetes API that stores a collection of API
objects of a certain kind. For example, the built-in pods resource contains a
collection of Pod objects.”
*Prior to K8S 1.7 this feature was called Third Party Resource (TPR)
First class citizens in Kubernetes API and Command Line Interface
$ kubectl get CassandraClusters
$ kubectl get CassandraBackups
apiVersion: cassandra.d/v1alpha1
kind: CassandraCluster
metadata:
name: cassandracluster
spec:
statefulsetName: cassandracluster
replicas: 4
apiVersion: krallistic.github.com/v1
kind: KafkaCluster
metadata:
name: orders-kafka
spec:
brokerCount: 3
topics:
- name: newOrdersTopic
replicationFactor: 1
partitions: 1
Custom Controller
● A controller interprets the CRD data as user’s desired state
● Then, it continually takes action to achieve and maintain this state.
● Custom Resources combined with a custom controller becomes a true
declarative API
“Make sure we have X instances on different machines”
“Make sure we’ll do backup every X minutes”
“Make sure to re-distribute keys between nodes in case of X event”
= OperatorController + CRD
An Operator
● Is used for adding new kind of functionality to a Kubernetes Cluster
● Can Automates administration and operations
○ Upgrades, Backups, Reshuffling data, etc..
● Using a declarative approach - it’s not a script!
● Kube-Controller-Manager does this exactly for the native building blocks
○ Deployment, ReplicaSets, Pod, Service, etc..
○ Theres a job title exactly for that.
Site Reliability Engineer (SRE) as a service ®
The Operator Pattern
Observe
Watches CustomResource
state using Kubernetes API
Act
Create a plan to transition
from Current State to
Desired State
Analyze
Compare Current State to
Desired State
03
01 02
The Operator Pattern
for {
currentState := kubernetesApi.getCurrentState()
desiredState := kubernetesApi.getDesiredState()
takeMeThere(currentState, desiredState)
}
Api Server
Cassandra
Operator
KubeCTL CLI
Api Server
CloudSQL
Operator
KubeCTL CLI
Provision
Demo
Operator Framework by CoreOS
● Consists on:
● Operator Lifecycle Manager
● Operator Metering (Soon)
● Operator SDK
● Use Operator SDK to easily create new Operators
● Code Generated CRD’s and Custom Controller
● Using Go
● https://github.com/operator-framework
Stateful applications requires domain-specific
operation knowledge that needs to be automated
________
CRDs and Operator Framework opens whole new
ways for writing apps natively on top of Kubernetes
Thank you
Get with OfirM@Sela.co.il

More Related Content

ODP
Kubernetes Architecture
PDF
The Operator Pattern - Managing Stateful Services in Kubernetes
PDF
Are you ready to be edgy? Bringing applications to the edge of the network
PPTX
Kubernetes @ meetic
PDF
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
PPTX
Introduction to Kubernetes
PDF
Hands-On Introduction to Kubernetes at LISA17
PDF
Operator SDK for K8s using Go
Kubernetes Architecture
The Operator Pattern - Managing Stateful Services in Kubernetes
Are you ready to be edgy? Bringing applications to the edge of the network
Kubernetes @ meetic
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Introduction to Kubernetes
Hands-On Introduction to Kubernetes at LISA17
Operator SDK for K8s using Go

What's hot (20)

PDF
(Draft) Kubernetes - A Comprehensive Overview
PDF
Kubernetes extensibility: crd & operators
PDF
Evolution of containers to kubernetes
PDF
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
PPTX
Nodeless and serverless kubernetes
PPTX
Kubernetes for Beginners: An Introductory Guide
PDF
Kubernetes: A Short Introduction (2019)
PDF
From Code to Kubernetes
PDF
Microservices, Kubernetes and Istio - A Great Fit!
PPTX
Production ready tooling for microservices on kubernetes
PDF
Apache Stratos 4.1.0 Architecture
PDF
The Kubernetes Operator Pattern - ContainerConf Nov 2017
PPTX
Service Discovery In Kubernetes
PPTX
Kubernetes 101
PDF
Kubernetes 101
PDF
Kubernetes a comprehensive overview
PDF
Kubernetes - Starting with 1.2
PDF
Crafting Kubernetes Operators
PDF
Kubernetes Networking - Sreenivas Makam - Google - CC18
(Draft) Kubernetes - A Comprehensive Overview
Kubernetes extensibility: crd & operators
Evolution of containers to kubernetes
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Nodeless and serverless kubernetes
Kubernetes for Beginners: An Introductory Guide
Kubernetes: A Short Introduction (2019)
From Code to Kubernetes
Microservices, Kubernetes and Istio - A Great Fit!
Production ready tooling for microservices on kubernetes
Apache Stratos 4.1.0 Architecture
The Kubernetes Operator Pattern - ContainerConf Nov 2017
Service Discovery In Kubernetes
Kubernetes 101
Kubernetes 101
Kubernetes a comprehensive overview
Kubernetes - Starting with 1.2
Crafting Kubernetes Operators
Kubernetes Networking - Sreenivas Makam - Google - CC18
Ad

Similar to Ofir Makmal - Intro To Kubernetes Operators - Google Cloud Summit 2018 Tel Aviv (20)

PPTX
How kubernetes operators can rescue dev secops in midst of a pandemic updated
PDF
Kubernetes extensibility: CRDs & Operators
PPTX
Demystifying k8s operators
PDF
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
PDF
Kubernetes Operators Automating the Container Orchestration Platform 1st Edit...
PDF
Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...
PDF
Kubernetes Operators 1st Edition Jason Dobies
PDF
Stateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
PDF
Extending Kubernetes with Operators
PDF
Kubernetes Operators 1st Edition Jason Dobies
PDF
An intro to Kubernetes operators
PPTX
Introduction+to+Kubernetes-Details-D.pptx
PDF
Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017
PDF
Cloud-Native Operations with Kubernetes and CI/CD
PDF
Intro to creating kubernetes operators
PDF
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
PDF
Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk
PDF
Kubernetes Operators Automating the Container Orchestration Platform 1st Edit...
PDF
MongoDB Ops Manager + Kubernetes
PDF
Someone Call the Operator - ATL K8's Meetup
How kubernetes operators can rescue dev secops in midst of a pandemic updated
Kubernetes extensibility: CRDs & Operators
Demystifying k8s operators
Kubernetes Summit 2018 - Kubernetes: Stateless -> Stateful
Kubernetes Operators Automating the Container Orchestration Platform 1st Edit...
Managing Stateful Services with the Operator Pattern in Kubernetes - Kubernet...
Kubernetes Operators 1st Edition Jason Dobies
Stateful, Stateless and Serverless - Running Apache Kafka® on Kubernetes
Extending Kubernetes with Operators
Kubernetes Operators 1st Edition Jason Dobies
An intro to Kubernetes operators
Introduction+to+Kubernetes-Details-D.pptx
Andrea Tosatto - Kubernetes Beyond - Codemotion Milan 2017
Cloud-Native Operations with Kubernetes and CI/CD
Intro to creating kubernetes operators
AgileTW Feat. DevOpsTW: 維運 Kubernetes 的兩三事
Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk
Kubernetes Operators Automating the Container Orchestration Platform 1st Edit...
MongoDB Ops Manager + Kubernetes
Someone Call the Operator - ATL K8's Meetup
Ad

Recently uploaded (20)

PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
PPTX
Patient Appointment Booking in Odoo with online payment
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Designing Intelligence for the Shop Floor.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PPTX
assetexplorer- product-overview - presentation
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
L1 - Introduction to python Backend.pptx
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Download FL Studio Crack Latest version 2025 ?
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Patient Appointment Booking in Odoo with online payment
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Designing Intelligence for the Shop Floor.pdf
CHAPTER 2 - PM Management and IT Context
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
assetexplorer- product-overview - presentation
How to Choose the Right IT Partner for Your Business in Malaysia
Reimagine Home Health with the Power of Agentic AI​
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Nekopoi APK 2025 free lastest update
wealthsignaloriginal-com-DS-text-... (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
How to Make Money in the Metaverse_ Top Strategies for Beginners.pdf
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
L1 - Introduction to python Backend.pptx
Advanced SystemCare Ultimate Crack + Portable (2025)
Download FL Studio Crack Latest version 2025 ?

Ofir Makmal - Intro To Kubernetes Operators - Google Cloud Summit 2018 Tel Aviv

  • 1. Kubernetes Operators Introduction to Ofir Makmal | CTO | SELA Group
  • 2. Ku·ber·ne·tes Kubernetes can be many things… Its a scalable, self-healing and resilient ● Container orchestration engine ● Cluster management system ● Mesos, Swarm, Rancher, _______ replacement ● Microservices, CI/CD, Machine Learning platforms ● Portable ‘cloud’ But, It’s NOT just another way to run containers...
  • 3. In just three years time… Recent surveys from medium & large US-based companies shows that over 60% are currently using Kubernetes to run workloads ● Trials/POC stages through development to production stages It has a huge community: ● ~36K Stars ● ~1600 Contributors! ● ~13K Forks ● ~1000 Pending pull requests!
  • 6. And we all know how to run a stateless service... Creating a Namespace, defining a Deployment to manage a ReplicaSet of Pods, exposing them as Services and Ingress, maybe mounting Persistent Volumes into their containers, injecting ConfigMaps and Secrets as environment variables. After deployment, we expect that Kubernetes will take care the rest.
  • 7. What about stateful applications?
  • 8. Stateless is easy, stateful is hard i.e - Cassandra, a Distributed Database. After deployment, comes operations. ● Backups and Restore ● Upgrades ● Auto-scaling ● Redistribution of data when cluster size changes ● Leader election in case of failure and preserving a Quorum These kind of stateful applications are usually used as a dependency for other stateless applications, and needed to be discovered and consumed.
  • 9. Custom Resource Definition (CRD) “A resource is an endpoint in the Kubernetes API that stores a collection of API objects of a certain kind. For example, the built-in pods resource contains a collection of Pod objects.” *Prior to K8S 1.7 this feature was called Third Party Resource (TPR) First class citizens in Kubernetes API and Command Line Interface $ kubectl get CassandraClusters $ kubectl get CassandraBackups
  • 10. apiVersion: cassandra.d/v1alpha1 kind: CassandraCluster metadata: name: cassandracluster spec: statefulsetName: cassandracluster replicas: 4 apiVersion: krallistic.github.com/v1 kind: KafkaCluster metadata: name: orders-kafka spec: brokerCount: 3 topics: - name: newOrdersTopic replicationFactor: 1 partitions: 1
  • 11. Custom Controller ● A controller interprets the CRD data as user’s desired state ● Then, it continually takes action to achieve and maintain this state. ● Custom Resources combined with a custom controller becomes a true declarative API “Make sure we have X instances on different machines” “Make sure we’ll do backup every X minutes” “Make sure to re-distribute keys between nodes in case of X event”
  • 13. An Operator ● Is used for adding new kind of functionality to a Kubernetes Cluster ● Can Automates administration and operations ○ Upgrades, Backups, Reshuffling data, etc.. ● Using a declarative approach - it’s not a script! ● Kube-Controller-Manager does this exactly for the native building blocks ○ Deployment, ReplicaSets, Pod, Service, etc.. ○ Theres a job title exactly for that. Site Reliability Engineer (SRE) as a service ®
  • 14. The Operator Pattern Observe Watches CustomResource state using Kubernetes API Act Create a plan to transition from Current State to Desired State Analyze Compare Current State to Desired State 03 01 02
  • 15. The Operator Pattern for { currentState := kubernetesApi.getCurrentState() desiredState := kubernetesApi.getDesiredState() takeMeThere(currentState, desiredState) }
  • 18. Demo
  • 19. Operator Framework by CoreOS ● Consists on: ● Operator Lifecycle Manager ● Operator Metering (Soon) ● Operator SDK ● Use Operator SDK to easily create new Operators ● Code Generated CRD’s and Custom Controller ● Using Go ● https://github.com/operator-framework
  • 20. Stateful applications requires domain-specific operation knowledge that needs to be automated ________ CRDs and Operator Framework opens whole new ways for writing apps natively on top of Kubernetes

Editor's Notes

  • #5: Example of solutions around Kuberntes: Hosting Platforms Kubernetes Package Manager Operations Micro-Services Debuggers Workflow platforms CI/CD platforms Gateways and more
  • #7: Also mention: DaemonSet Job + CronJob StatefulSet – and it’s limitations.
  • #8: Define State, Stateful. Order of creation, destruction, Persistent Data, Master & Slave, Read only replicas, etc..
  • #9: In Stateful apps, deployment is easy part. Operation is the hard part.
  • #12: If CRD is the Model, Custom Controller is BL
  • #13: Model + BL = Kubernetes Operator