Slide 1

Slide 1 text

Intro to KUBERNETES OPERATORS

Slide 2

Slide 2 text

Carol Valencia Devops Engineering

Slide 3

Slide 3 text

Kubernetes Operators Demo Agenda 3

Slide 4

Slide 4 text

1. Overview Kubernetes

Slide 5

Slide 5 text

5 Kubernetes API Server

Slide 6

Slide 6 text

Kubernetes Components 6 Figure by Improving your Kubernetes Workload Security with Hardware Virtualization

Slide 7

Slide 7 text

Basic components in Kubernetes Pod: Smallest unit of work - the smallest deployable object in the Kubernetes object model - Can hold one or more containers Deployment: Controller for Pods and ReplicaSets - Great for stateless apps, like restful Api - Scaling of the pods StatefulSet: Controller for manage stateful applications - Maintain order, sticky identity, no interchangeability of the Pods 7

Slide 8

Slide 8 text

8 Kubernetes API Request flow

Slide 9

Slide 9 text

Kubernetes API Resources 9

Slide 10

Slide 10 text

10

Slide 11

Slide 11 text

2. Operators Kubernetes

Slide 12

Slide 12 text

12 Timeline - Kubernetes Custom Resources - CR - Kubernetes Custom Resource Definitions - CRD ~ StatefulSet or Deployment - Kubernetes 1.7 - Custom Controllers - Operator SDK - 2018 - CoreOS - RedHat - IBM

Slide 13

Slide 13 text

13 Figure -https://blog.couchbase.com/kubernetes-operators-game-changer/

Slide 14

Slide 14 text

Operator - Method of packaging, deploying and managing a Kubernetes application - Custom controller that works with custom resources of a certain kind 14

Slide 15

Slide 15 text

15 Operator uses In a context of an application, we have some 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 services

Slide 16

Slide 16 text

Community Operators 16 Figure -https://commons.openshift.org/sig/OpenshiftOperators.html

Slide 17

Slide 17 text

Custom Resource 17 you store and retrieve structured data

Slide 18

Slide 18 text

Custom Controller 18 Reconciliation: ● Observe current state ● Analyse and compare against declared state ● Bring current state closer to declared state

Slide 19

Slide 19 text

Operator Custom Resource + Custom Controller

Slide 20

Slide 20 text

3. Demo Weather operator

Slide 21

Slide 21 text

Operator SDK 21 Figure -https://coreos.com/operators/

Slide 22

Slide 22 text

22 https://github.com/krol3/weather-operator/blob/master/demo/demo-operators.mov

Slide 23

Slide 23 text

Resources ■ https://book.kubebuilder.io/ ■ https://github.com/operator-fram ework/operator-sdk 23 ■ Demo: https://github.com/krol3/weather-operator

Slide 24

Slide 24 text

Thanks! Any questions? You can find me at: [email protected] Github: krol3 linkedin.com/in/carolgv 24