Slide 1

Slide 1 text

With the Operator Lifecycle Manager Operator Hub and your Kubernetes Cluster Josh Wood Developer Advocate, Red Hat [email protected] – @joshixisjosh9 – joshix.com 1

Slide 2

Slide 2 text

2 Why should you care about Operators?

Slide 3

Slide 3 text

3 Any application in any system must be installed, configured, managed and upgraded over time Patching is critical to security

Slide 4

Slide 4 text

“Anything that isn’t automated is slowing you down” 4

Slide 5

Slide 5 text

5 What is Kubernetes? An open source orchestration system for managing containerized workloads across a cluster of nodes.

Slide 6

Slide 6 text

6 Kubernetes Object Definitions kind: Pod apiVersion: v1 metadata: name: example-app spec: containers: - name: example image: quay.io/my/app:v1.2.0 [...]

Slide 7

Slide 7 text

Kubernetes is a declarative platform 7

Slide 8

Slide 8 text

8 Scaling stateless apps: easy

Slide 9

Slide 9 text

9 $ kubectl scale deploy/staticweb --replicas=3

Slide 10

Slide 10 text

10 scale up count=1 desired=3 ReplicaSet

Slide 11

Slide 11 text

11 start count=3 desired=3 ReplicaSet

Slide 12

Slide 12 text

12 What about apps that store data?

Slide 13

Slide 13 text

13 Deploying a database is easy

Slide 14

Slide 14 text

14 $ kubectl create deployment db --image=quay.io/my/db

Slide 15

Slide 15 text

15 Running a database over time is harder

Slide 16

Slide 16 text

16 ● Resize/Upgrade ● Reconfigure ● Backup ● Healing

Slide 17

Slide 17 text

17 If only Kubernetes knew...

Slide 18

Slide 18 text

18 1. Application-specific custom controllers 2. Custom resource definitions (CRD) Extending the Kubernetes API

Slide 19

Slide 19 text

19 Custom Resource Developer / Kubernetes User Deployments StatefulSets Autoscalers Secrets Config maps PersistentVolume How Does an Operator Work? K8s API kind: ProductionReadyDatabase apiVersion: database .example.com/v1alpha1 metadata: name: my-important -database spec: connectionPoolSize: 300 readReplicas: 2 version: v4.0.1 Custom Kubernetes Controller Watch Events Reconciliation + Custom Resource Definition Kubernetes Operator Native Kubernetes Resources

Slide 20

Slide 20 text

20 Custom Resource (CR) kind: ProductionReadyDatabase apiVersion: database.example.com/v1alpha1 metadata: name: my-production-ready-database spec: clusterSize: 3 readReplicas: 2 version: v4.0.1 [...]

Slide 21

Slide 21 text

21

Slide 22

Slide 22 text

22

Slide 23

Slide 23 text

23 Operators are automated software managers that manage the entire lifecycle of Kubernetes applications

Slide 24

Slide 24 text

Value of Operators 24 Improve the “time to first value” for your customers Minimize software upgrade risk and associated operational costs Embed best practices from the experts – you – into the Operator Provide a cloud-like "As a Service" experience

Slide 25

Slide 25 text

Operator Deployment Custom Resource Definitions RBAC API Dependencies Update Path Metadata YourOperator v1.1.2 Bundle OPERATOR LIFECYCLE MANAGER Deployment Role ClusterRole RoleBinding ClusterRoleBinding ServiceAccount CustomResourceDefinition OPERATOR LIFECYCLE MANAGER: The Operator Operator 25

Slide 26

Slide 26 text

26 OPERATOR LIFECYCLE MANAGER YourOperator v1.1.2 YourOperator v1.1.3 YourOperator v1.2.0 YourOperator v1.2.2 Subscription for YourOperator Time Version Operator Catalog OPERATOR LIFECYCLE MANAGEMENT

Slide 27

Slide 27 text

OPERATOR SDK KUBERNETES OPERATOR + = + OPERATOR LIFECYCLE MANAGER + USER “create new operator” scaffolding custom logic metadata package “make available to” “list packages” “subscribe to channel” subscription namespace operator instance managed application “Create application” SERVICE INSTANTIATION PUBLISHER ADMINISTRATOR + 27 AUTHOR

Slide 28

Slide 28 text

28 Use Operators Today OperatorHub.io is a home for the Kubernetes community to share Operators. Find an existing Operator or list your own today.

Slide 29

Slide 29 text

29 Red Hat Products ISV Partners Community TYPES OF OPERATORS OPERATOR HUB Operator Hub - Allows administrators to selectively make operators available from curated sources to users in the cluster.

Slide 30

Slide 30 text

30

Slide 31

Slide 31 text

31 Easy self service of Operator-backed Services Reduce friction for deploying operator backed applications ● Rich UI for creating and mutating the app instances

Slide 32

Slide 32 text

32 ...and many more OPERATORS ACROSS THE INDUSTRY

Slide 33

Slide 33 text

33 Operator Maturity Model Phase I Phase II Phase III Phase IV Phase V Basic Install Automated application provisioning and configuration management Seamless Upgrades Patch and minor version upgrades supported Full Lifecycle App lifecycle, storage lifecycle (backup, failure recovery) Deep Insights Metrics, alerts, log processing and workload analysis Auto Pilot Horizontal/vertical scaling, auto config tuning, abnormal detection, scheduling tuning

Slide 34

Slide 34 text

34 https://github.com/operator-framework https://operatorhub.io https://learn.openshift.com/operatorframework/ http://bit.ly/kubernetes-operators Resources

Slide 35

Slide 35 text

Thank you linkedin.com/showcase/red-hat-developer youtube - bit.ly/2YRIWTk facebook.com/redhatdeveloperprogram twitter.com/rhdevelopers 35 Josh Wood [email protected] @joshixisjosh9 joshix.com