state of the operators...why do we need operators? $ docker pull postgres $ docker pull redis $...

23
State of the Operators Framework, SDKs, and beyond Daniel Messer Product Manager, OpenShift

Upload: others

Post on 12-Jul-2020

4 views

Category:

Documents


0 download

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

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

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

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

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

● 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

⏣ 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

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

● 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
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

● 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

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

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

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

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

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

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

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

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

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://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

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

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

Thank you!