state of the operators...why do we need operators? $ docker pull postgres $ docker pull redis $...
TRANSCRIPT
![Page 1: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/1.jpg)
State of the Operators
Framework, SDKs, and beyond
Daniel MesserProduct Manager, OpenShift
![Page 2: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/2.jpg)
2
...and many more
https://github.com/operator-framework/awesome-operators
OPERATORS ACROSS THE INDUSTRY
![Page 3: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/3.jpg)
Why do we need Operators?
![Page 4: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/4.jpg)
Containers brought simplicity to the development world
Why do we need Operators?
$ docker pull postgres$ docker pull redis
$ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres$ docker run --name some-redis -d redis
![Page 5: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/5.jpg)
● Deployment● ReplicaSet● StatefulSet● DaemonSet● CronJob● ...
Existing operational logic in Kubernetes
![Page 6: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/6.jpg)
⏣ Resize/Upgrade
⏣ Reconfigure
⏣ Backup
⏣ Healing
![Page 7: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/7.jpg)
OK, but what is an Operator?
![Page 8: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/8.jpg)
● An operator is a kubernetes native application● Leverages the kubernetes API (usable with kubectl)● Runs on kubernetes as containers● Resembles a custom controller
● Purposely built for an application● Operational knowledge baked in and automated
● handling upgrades from one version to another● handling complex failure recovery scenarios● scaling a stateful application up and down
● Best suited for complex and stateful applications (but not only!)● Example: a prometheus operator specifically designed for it
What is an Operator?
![Page 9: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/9.jpg)
![Page 10: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/10.jpg)
● Operator SDK - Allows developers to build, package and test an Operator based on your expertise without requiring all the knowledge of Kubernetes API complexities
● Operator Lifecycle Manager - Helps you to install, and update, and generally manage the lifecycle of all of the Operators (and their associated services) running across your clusters
● Operator Metering - Enable usage reporting for Operators and resources within Kubernetes
![Page 11: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/11.jpg)
OPERATOR FRAMEWORK IN ACTION
OPERATORSDK
KUBERNETESOPERATOR
+ =
DEVELOPER“create new operator”
scaffolding custom logic
![Page 12: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/12.jpg)
TYPES OF OPERATORS
![Page 13: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/13.jpg)
CREATE AN OPERATOR WITHOUT CODING
$ operator-sdk new cockroachdb-operator --type=helm --helm-chart stable/cockroachdb
![Page 14: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/14.jpg)
OPERATOR FRAMEWORK IN ACTION
OPERATORSDK
KUBERNETESOPERATOR
+ = +
OPERATORLIFECYCLE MANAGER
+OPERATORMETERING
DEVELOPER
ADMINISTRATOR
USER
“create new operator”
scaffolding custom logic metadata
package
“make available to”
“list packages”
“subscribe to channel”
subscriptionnamespaceoperator instance
managed application
“collect metrics”“Create application”
![Page 15: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/15.jpg)
Operator Hub - Allows administrators to selectively make operators available from curated sources to users in the cluster.
OPERATORS INOPENSHIFT
![Page 16: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/16.jpg)
COMMUNITY OPERATOR CONTRIBUTION
OPERATORSDK
KUBERNETESOPERATOR
+ =
OPERATORMETERING
DEVELOPER
COMMUNITY REPO
USER
“create new operator”
scaffolding custom logic
“browse catalog”
“install”
operator instance
managed application
“collect metrics”“Create application”
pull request
QUAY
OPERATORHUB
![Page 17: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/17.jpg)
Demo
![Page 18: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/18.jpg)
What’s ahead
![Page 19: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/19.jpg)
OPERATOR SDK & LIFECYCLE
Cross-Platform SupportObjectives: - OCP, OKD and k8s consistencyFeatures: - Universal Base Image Support - installation for non-OCP clusters Stage: Development
Operator TestabilityObjectives: - aid developers with e2e testing - validate operator maturityFeatures: - scorecard utilityStage: Prototype
Continuous TestingObjectives: - automated scorecard testing - validate operator maturityStage: Discovery
Partner EnablementObjectives: - UBI support for partners - scorecard for partnersStage: Discovery
No-Fuzz Operator InstallFeatures: - OperatorGroupsStage: Prototype
SDK
SDK
OLM
SDK
SDK
OLM
Now Next Future
TBD, ideas around over-the-air updates, operator status aggregated from operands...
![Page 20: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/20.jpg)
https://github.com/operator-framework/community-operators
![Page 21: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/21.jpg)
CPUMemoryStorage
RequestActual UsageUtilization %
PodNamespace
NodeCluster
METERING/CHARGEBACK
● Testing a developer preview now○ Install from OperatorHub
● Base functionality on all providers● Tie into cloud providers for $$● Included reports for 80% use-case
○ Customers can write custom reports and time periods
● Popular use-case: shame teams over requesting RAM
![Page 22: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/22.jpg)
Where to get started?
● https://github.com/operator-framework/getting-started
● https://github.com/operator-framework/community-operators
● https://commons.openshift.org/sig/operators.html
● #kubernetes-operators on the kubernetes slack
● https://groups.google.com/forum/#!forum/operator-framework
![Page 23: State of the Operators...Why do we need Operators? $ docker pull postgres $ docker pull redis $ docker run --name some-postgres -e POSTGRES_PASSWORD=foo -d postgres ... Allows developers](https://reader033.vdocuments.mx/reader033/viewer/2022043023/5f3f094619141f3089794608/html5/thumbnails/23.jpg)
Thank you!