SlideShare a Scribd company logo
1 of 47
Download to read offline
© 2019 Mesosphere, Inc. All Rights Reserved. 1
Introducing Kudo :
Kubernetes Operators the Easy Way
Matt Jarvis
@mattj_io
© 2019 Mesosphere, Inc. All Rights Reserved. 2
❏ Senior Director - Community and Evangelism @ Mesosphere
❏ Building stuff with open source software for ~20 years
❏ Ops, Dev and Dev/Ops
Matt Jarvis, Senior Director - Community and Evangelism
@mattj_io
© 2019 Mesosphere, Inc. All Rights Reserved. 3
Stateless Applications
Service v1.0
Service v1.0LoadBalancer
Client
● No state persisted
© 2019 Mesosphere, Inc. All Rights Reserved. 4
Stateless Applications
Service v1.0
Service v1.0LoadBalancer
Client
Service v1.0
● No state persisted
● Easy to scale up/down
© 2019 Mesosphere, Inc. All Rights Reserved. 5
Stateless Applications
Service v2.0
Service v1.0LoadBalancer
Client
Service v1.0
● No state persisted
● Easy to scale up/down
© 2019 Mesosphere, Inc. All Rights Reserved. 6
Stateless Applications
Service v2.0
Service v2.0LoadBalancer
Client
Service v1.0
● No state persisted
● Easy to scale up/down
© 2019 Mesosphere, Inc. All Rights Reserved. 7
Stateless Applications
Service v2.0
Service v2.0LoadBalancer
Client
Service v2.0
● No state persisted
● Easy to scale up/down
● Straightforward to upgrade
© 2019 Mesosphere, Inc. All Rights Reserved. 8
Stateful Applications
ServiceClient
Data
© 2019 Mesosphere, Inc. All Rights Reserved. 9
Stateful Applications
Instance
Instance
Client
Instance
Service
© 2019 Mesosphere, Inc. All Rights Reserved. 10
Kubernetes
Focused initially for purely stateless workloads
Scheduler can move pods around
© 2019 Mesosphere, Inc. All Rights Reserved. 11
Kubernetes - StatefulSets
StatefulSets are valuable for applications that require one or
more of the following.
● Stable, unique network identifiers.
● Stable, persistent storage.
● Ordered, graceful deployment and scaling.
● Ordered, graceful deletion and termination.
● Ordered, automated rolling updates.
© 2019 Mesosphere, Inc. All Rights Reserved. 12
Kubernetes - StatefulSets
Node
Master
Node
Slave
Node
Slave
© 2019 Mesosphere, Inc. All Rights Reserved. 13
Kubernetes - StatefulSets
Node
Master
Node
Slave
Node
Slave
© 2019 Mesosphere, Inc. All Rights Reserved. 14
Kubernetes - StatefulSets
Node
Master
Node
Master
Node
Slave
© 2019 Mesosphere, Inc. All Rights Reserved. 15
Kubernetes - StatefulSets
Node
Master
Node
Master
Node
Slave
© 2019 Mesosphere, Inc. All Rights Reserved. 16
Kubernetes - StatefulSets
Node
Slave
Node
Master
Node
Slave
© 2019 Mesosphere, Inc. All Rights Reserved. 17
Kubernetes - StatefulSets
Node
Slave
Node
Master
Node
Slave
© 2019 Mesosphere, Inc. All Rights Reserved. 18
Operators
● Orchestrate applications using k8s API
● Extend API using Custom Resource Definitions
● Encode domain specific operational knowledge
○ Upgrades
○ Failure and Recovery Scenarios
○ Scaling up/down
● Purpose built per application
© 2019 Mesosphere, Inc. All Rights Reserved. 19
Operators
● Operator manages and monitors lifecycle
● CRD’s represent application elements/actions
Operator
CRD CRD CRD
apiVersion: mysql.presslabs.org/v1alpha1
kind: MysqlCluster
metadata:
name: my-cluster
spec:
replicas: 2
secretName: my-secret
kubectl apply -f mysql-cluster.yaml
© 2019 Mesosphere, Inc. All Rights Reserved. 20
Developing Operators
Operator Framework
● Redhat/IBM project
● Implement using Ansible,
Helm charts, or Go
● Existing implementations
often don’t cover the entire
lifecycle
● Ansible and Helm are
limited. Go requires 1,000s
of lines of controller code
Kubebuilder
● Kubernetes SIG API Machinery
sub-project
● Operators written in Go with a
focus on code generation
● Existing implementations
often don’t cover the entire
lifecycle
© 2019 Mesosphere, Inc. All Rights Reserved. 21
Developing Operators
Operators require deep knowledge of k8s internals
May require thousands of lines of code
© 2019Mesosphere, Inc. All Rights Reserved.
Two level scheduling
Mesos Master and Agents
● Abstract resources into single pool
● Offers and tracks resources
● Guarantees isolation
● Handles workload restart on failure
Mesos Framework
● Consumes resources
● Deploys tasks
● Provides application specific logic for deployment, recovery, upgrade
Zookeeper Quorum
Master
Master
(Standby)
Master
(Standby)
Frameworks
Agent
Spark
Agent
Kubernetes
Agent
Spark
Kubernetes
Agent
Kafka
Kubernetes
Executor
Task
22
© 2019Mesosphere, Inc. All Rights Reserved.
Developing Frameworks ...
23
Frameworks require deep knowledge of Mesos internals
May require thousands of lines of code
© 2019Mesosphere, Inc. All Rights Reserved.
Complexity but ..
24
● Commonality between lifecycle states
● Possible to build abstraction SDK
© 2019Mesosphere, Inc. All Rights Reserved.
KUDO
25
● Kubernetes Universal Declarative Operator
○ Universal operator configured via YAML
○ Encodes commonality between lifecycle
operations
● OS project licensed as Apache 2.0
● Open Development model
© 2019Mesosphere, Inc. All Rights Reserved.
Operator Development
26
Kubebuilder
● Kubernetes SIG API Machinery
sub-project
● Operators written in Go with a
focus on code generation
● Existing implementations often
don’t cover the entire lifecycle
Operator Framework
● Redhat/IBM project
● Implement using Ansible, Helm
charts, or Go
● Existing implementations often
don’t cover the entire lifecycle
● Ansible and Helm are limited.
Go requires 1,000s of lines of
controller code
KUDO
● Universal Operator
● Built using community projects
(Kubebuilder, Kustomize, ...)
● Write Operators as templated
YAML manifests
● Provide high level CRDs that
represent workloads
● Focused on higher level
coordination of software
lifecycles
● “Day 2 Operators”
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Concepts
27
Framework
apiVersion: kudo.k8s.io/v1alpha1
kind: Framework
metadata:
labels:
controller-tools.k8s.io: "1.0"
name: kafka
● High level description of a service
● Represented as a CRD
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Concepts
28
Framework
apiVersion: kudo.k8s.io/v1alpha1
kind: FrameworkVersion
metadata:
labels:
controller-tools.k8s.io: "1.0"
name: kafka-2.11-2.4.0
namespace: default
spec:
serviceSpec:
version: "2.11-2.4.0"
connectionString: ""
framework:
name: kafka
kind: Framework
parameters:
- name: BROKER_COUNT
description: "Number of brokers spun
up for Kafka"
default: "3"
displayName: "Broker Count"
...
plans:
deploy:
strategy: serial
phases:
- name: deploy-kafka
strategy: serial
steps:
- name: deploy
tasks:
- deploy● Implementation of a framework
● Contains parameters, objects, plans
Framework Version
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Concepts
29
Framework
● Ties application instantiation to a framework version
Framework Version
Instance
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Concepts - Plans
30
● Describe progress through operations
● 3 level hierarchy Plan - Phase - Steps
● Status captured by PlanExecution CRD
Plan foo
├─ Phase bar
│ ├─ Step qux
│ └─ Step quux
└─ Phase baz
├─ Step quuz
├─ Step corge
└─ Step grault
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Concepts - Deployment Strategy
31
● Indicates the way in which a plan, or Step must be executed.
● If a Step requires another Step to complete first it is necessary
to declare them as serial
● Serial and Parallel are the defaults, but others can be defined
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Concepts - Trigger
32
● Defines what actions to take when a parameter changes
● Gives additional customization capabilities
parameters:
- name: BACKUP_FILE
description: "Filename to save the
backups to"
default: "backup.sql"
displayName: "BackupFile"
trigger: backup
FrameworkVersion Spec Examples - Plans
plans:
deploy:
strategy: serial
phases:
- name: deploy
strategy: serial
steps:
- name: deploy
tasks:
- deploy
- name: init
tasks:
- init
backup:
strategy: serial
phases:
- name: backup
strategy: serial
steps:
- name: backup
tasks:
- backup
restore:
strategy: serial
phases:
- name: restore
strategy: serial
steps:
- name: restore
tasks:
- restore
Serial or parallel
Serial or parallel
Tasks can be reused in
multiple plans
FrameworkVersion Spec Examples - Tasks
tasks:
deploy:
resources:
- mysql.yaml
init:
resources:
- init.yaml
backup:
resources:
- backup-pv.yaml
- job.yaml
patches:
- backup.yaml
restore:
resources:
- job.yaml
patches:
- restore.yaml
Mustached k8s objects
Tasks can be reused in
multiple plans
Patches on the roadmap
parameters:
- name: BROKER_COUNT
description: "Number of brokers spun
up for Kafka"
default: "3"
displayName: "Broker Count"
required: false
trigger: deploy
…
statefulset.yaml: |
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{NAME}}
namespace: {{NAMESPACE}}
spec:
replicas: {{BROKER_COUNT}}
…
Define parameter
Default value
Use parameters in spec
Plan to use for upgrading value
FrameworkVersion Spec Examples - Parameters
apiVersion: maestro.k8s.io/v1alpha1
kind: Instance
metadata:
name: kafka-instance
spec:
frameworkVersion:
name: kafka-2.11-2.4.0
namespace: default
type: FrameworkVersion
parameters:
KAFKA_ZOOKEEPER_URI:
zk-zk-0.zk-hs:2181,zk-zk-1.zk-hs:2181,zk-
zk-2.zk-hs:2181
KAFKA_ZOOKEEPER_PATH: "/kafka"
BROKER_COUNT: "1"
Currently a single CRD for Instantiations of a
FrameworkVersion
Reference
FrameworkVersion to
use
Define parameters for
instance
FrameworkVersion Spec Examples - Instance
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo - CLI
37
● CLI extension to kubectl # Install a KUDO package from the official GitHub repo.
kubectl kudo install <name> [flags]
# View plan history of a specific package
kubectl kudo plan history <name> [flags]
# View all plan history of a specific package
kubectl kudo plan history [flags]
# List instances
kubectl kudo list instances [flags]
# View plan status
kubectl kudo plan status [flags]
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Futures - Dynamic CRD’s
38
● Create new CRD’s during runtime operation
● Update existing CRD’s
$ kubectl apply -f new-plan.yaml
plan.kafka.kudo.dev/latest blue-green created
$ kubectl kudo update-parameter-trigger --framework kafka --framework-version 1.1 --parameter IMAGE_TAG blue-green
Update successful. IMAGE_TAG updates will now trigger the `blue-green` plan
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Futures - Dynamic CRD’s
39
● Represent components as first-class Kubernetes objects
● Represent operations as first-class Kubernetes objects
○ Kind: Kafka
○ Kind: Topic
○ Kind: User
○ Backup
■ maxAge: 24h
○ Backup / Restore
○ Index
© 2019Mesosphere, Inc. All Rights Reserved.
Kudo Futures - Framework Extensions
40
MySQL
“Standard” infrastructure, plans, CRDs, etc.
MySQL + GKE
Istio, Cloud Storage, GCP Security Rules,
StackDriver Monitoring, etc.
ACME Corp
ACME specific plans. Network policy, special
operations, cached queries, custom functions,
etc.
Framework Developer Maintained ACME Corp Maintained
41
Problems with Kustomize:
● YAML, YAML, and more YAML
○ Strings of Mustached YAML!
● Strategic Merge Patches for YAML
○ Patching parameters become brittle with Kustomize
● Configuration still has to be templated separately
● Mustache -> Kustomize flow can be confusing to work with
● Kustomize is designed as a CLI tool - KUDO uses a virtual filesystem
Futures - Framework Development SDK
42
● Configure, Unify, Execute
● Superset of JSON
● Heavily influenced by Borg Configuration Language (BCL)
● Data Constraints
● Basic Types
● Union types
● Disjunctions
CUE
43
44
© 2019 Mesosphere, Inc. All Rights Reserved. 45
DEMO ….
© 2019 Mesosphere, Inc. All Rights Reserved. 46
Get Involved !
https://kudo.dev/
https://groups.google.com/forum/#!forum/kudobuilder
#kudo http://slack.k8s.io/
https://github.com/kudobuilder/kudo
Community Meeting - weekly Thursdays 10am PT
© 2019 Mesosphere, Inc. All Rights Reserved. 47
Thank You for Listening !
Matt Jarvis
Twitter: @mattj-io
Email: mjarvis@mesosphere.com

More Related Content

What's hot

Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesPhil Estes
 
Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)Imesh Gunaratne
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerJulian Strobl
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for BeginnersOktay Esgul
 
Introducing Koki Short
Introducing Koki ShortIntroducing Koki Short
Introducing Koki ShortSidhartha Mani
 
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy UpdateWSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy UpdateWSO2
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryImesh Gunaratne
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingPiotr Perzyna
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesMichal Cwienczek
 
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)VirtualTech Japan Inc.
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesGöksel Pırnal
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit어형 이
 
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...Tobias Schneck
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding KubernetesTu Pham
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenTrang Nguyen
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformMichael O'Sullivan
 
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...Tobias Schneck
 
Top 3 reasons why you should run your Enterprise workloads on GKE
Top 3 reasons why you should run your Enterprise workloads on GKETop 3 reasons why you should run your Enterprise workloads on GKE
Top 3 reasons why you should run your Enterprise workloads on GKESreenivas Makam
 
Implementing an Automated Staging Environment
Implementing an Automated Staging EnvironmentImplementing an Automated Staging Environment
Implementing an Automated Staging EnvironmentDaniel Oliveira Filho
 
Brief Introduction To Kubernetes
Brief Introduction To KubernetesBrief Introduction To Kubernetes
Brief Introduction To KubernetesAvinash Ketkar
 

What's hot (20)

Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)Multitenancy in WSO2 Carbon 5 (C5)
Multitenancy in WSO2 Carbon 5 (C5)
 
Platform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and DockerPlatform Orchestration with Kubernetes and Docker
Platform Orchestration with Kubernetes and Docker
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
Introducing Koki Short
Introducing Koki ShortIntroducing Koki Short
Introducing Koki Short
 
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy UpdateWSO2Con ASIA 2016: WSO2 Cloud Strategy Update
WSO2Con ASIA 2016: WSO2 Cloud Strategy Update
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
Introduction of private cloud in LINE - OpenStack最新情報セミナー(2019年2月)
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Immutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkitImmutable kubernetes architecture by linuxkit
Immutable kubernetes architecture by linuxkit
 
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
Kubermatic How to Migrate 100 Clusters from On-Prem to Google Cloud Without D...
 
Understanding Kubernetes
Understanding KubernetesUnderstanding Kubernetes
Understanding Kubernetes
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang Nguyen
 
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration PlatformKubernetes: An Introduction to the Open Source Container Orchestration Platform
Kubernetes: An Introduction to the Open Source Container Orchestration Platform
 
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
ClusterAPI Overview - Managing multi-cloud Kubernetes Clusters - k8s Meetup@v...
 
Top 3 reasons why you should run your Enterprise workloads on GKE
Top 3 reasons why you should run your Enterprise workloads on GKETop 3 reasons why you should run your Enterprise workloads on GKE
Top 3 reasons why you should run your Enterprise workloads on GKE
 
Implementing an Automated Staging Environment
Implementing an Automated Staging EnvironmentImplementing an Automated Staging Environment
Implementing an Automated Staging Environment
 
Brief Introduction To Kubernetes
Brief Introduction To KubernetesBrief Introduction To Kubernetes
Brief Introduction To Kubernetes
 

Similar to OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis

KUDO - Kubernetes Operators, the easy way
KUDO - Kubernetes Operators, the easy wayKUDO - Kubernetes Operators, the easy way
KUDO - Kubernetes Operators, the easy wayNick Jones
 
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...Owen Mehegan
 
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...Cloud Native Day Tel Aviv
 
Pivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October ReleasePivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October ReleaseVMware Tanzu
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]Mark Waite
 
Running Stateful Apps on Kubernetes
Running Stateful Apps on KubernetesRunning Stateful Apps on Kubernetes
Running Stateful Apps on KubernetesYugabyte
 
Docker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker, Inc.
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps WorkshopWeaveworks
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kuberneteskloia
 
Episode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at ScaleEpisode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at ScaleMesosphere Inc.
 
Pivotal Cloud Foundry 2.6: A First Look
Pivotal Cloud Foundry 2.6: A First LookPivotal Cloud Foundry 2.6: A First Look
Pivotal Cloud Foundry 2.6: A First LookVMware Tanzu
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For DevelopmentLaura Frank Tacho
 
Pivotal Container Service Overview
Pivotal Container Service Overview Pivotal Container Service Overview
Pivotal Container Service Overview VMware Tanzu
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisAgileSparks
 
Pivotal Cloud Foundry 2.5: A First Look
Pivotal Cloud Foundry 2.5: A First LookPivotal Cloud Foundry 2.5: A First Look
Pivotal Cloud Foundry 2.5: A First LookVMware Tanzu
 
Data stream with cruise control
Data stream with cruise controlData stream with cruise control
Data stream with cruise controlBill Liu
 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...InfluxData
 
Webinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at ScaleWebinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at ScaleMesosphere Inc.
 
Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)
Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)
Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)Michael Elder
 

Similar to OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis (20)

KUDO - Kubernetes Operators, the easy way
KUDO - Kubernetes Operators, the easy wayKUDO - Kubernetes Operators, the easy way
KUDO - Kubernetes Operators, the easy way
 
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
Jenkins Performance - Avoiding Pitfalls, Diagnosing Issues, and Scaling for G...
 
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...
Kubernetes is hard! Lessons learned taking our apps to Kubernetes - Eldad Ass...
 
Pivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October ReleasePivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October Release
 
Docker and Jenkins [as code]
Docker and Jenkins [as code]Docker and Jenkins [as code]
Docker and Jenkins [as code]
 
Running Stateful Apps on Kubernetes
Running Stateful Apps on KubernetesRunning Stateful Apps on Kubernetes
Running Stateful Apps on Kubernetes
 
Docker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker eeDocker on docker leveraging kubernetes in docker ee
Docker on docker leveraging kubernetes in docker ee
 
Free GitOps Workshop
Free GitOps WorkshopFree GitOps Workshop
Free GitOps Workshop
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Episode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at ScaleEpisode 2: Deploying Kubernetes at Scale
Episode 2: Deploying Kubernetes at Scale
 
Pivotal Cloud Foundry 2.6: A First Look
Pivotal Cloud Foundry 2.6: A First LookPivotal Cloud Foundry 2.6: A First Look
Pivotal Cloud Foundry 2.6: A First Look
 
Using Docker For Development
Using Docker For DevelopmentUsing Docker For Development
Using Docker For Development
 
Pivotal Container Service Overview
Pivotal Container Service Overview Pivotal Container Service Overview
Pivotal Container Service Overview
 
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad AssisKubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
Kubernetes is Hard! Lessons Learned Taking Our Apps to Kubernetes by Eldad Assis
 
Kubernetes basics and hands on exercise
Kubernetes basics and hands on exerciseKubernetes basics and hands on exercise
Kubernetes basics and hands on exercise
 
Pivotal Cloud Foundry 2.5: A First Look
Pivotal Cloud Foundry 2.5: A First LookPivotal Cloud Foundry 2.5: A First Look
Pivotal Cloud Foundry 2.5: A First Look
 
Data stream with cruise control
Data stream with cruise controlData stream with cruise control
Data stream with cruise control
 
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
Scaling Prometheus Metrics in Kubernetes with Telegraf | Chris Goller | Influ...
 
Webinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at ScaleWebinar: Operating Kubernetes at Scale
Webinar: Operating Kubernetes at Scale
 
Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)
Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)
Deploying Kubernetes in the Enterprise (IBM #Think2019 #7678 Tech Talk)
 

Recently uploaded

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 

Recently uploaded (20)

The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 

OSDC 2019 | Introducing Kudo – Kubernetes Operators the easy way by Matt Jarvis

  • 1. © 2019 Mesosphere, Inc. All Rights Reserved. 1 Introducing Kudo : Kubernetes Operators the Easy Way Matt Jarvis @mattj_io
  • 2. © 2019 Mesosphere, Inc. All Rights Reserved. 2 ❏ Senior Director - Community and Evangelism @ Mesosphere ❏ Building stuff with open source software for ~20 years ❏ Ops, Dev and Dev/Ops Matt Jarvis, Senior Director - Community and Evangelism @mattj_io
  • 3. © 2019 Mesosphere, Inc. All Rights Reserved. 3 Stateless Applications Service v1.0 Service v1.0LoadBalancer Client ● No state persisted
  • 4. © 2019 Mesosphere, Inc. All Rights Reserved. 4 Stateless Applications Service v1.0 Service v1.0LoadBalancer Client Service v1.0 ● No state persisted ● Easy to scale up/down
  • 5. © 2019 Mesosphere, Inc. All Rights Reserved. 5 Stateless Applications Service v2.0 Service v1.0LoadBalancer Client Service v1.0 ● No state persisted ● Easy to scale up/down
  • 6. © 2019 Mesosphere, Inc. All Rights Reserved. 6 Stateless Applications Service v2.0 Service v2.0LoadBalancer Client Service v1.0 ● No state persisted ● Easy to scale up/down
  • 7. © 2019 Mesosphere, Inc. All Rights Reserved. 7 Stateless Applications Service v2.0 Service v2.0LoadBalancer Client Service v2.0 ● No state persisted ● Easy to scale up/down ● Straightforward to upgrade
  • 8. © 2019 Mesosphere, Inc. All Rights Reserved. 8 Stateful Applications ServiceClient Data
  • 9. © 2019 Mesosphere, Inc. All Rights Reserved. 9 Stateful Applications Instance Instance Client Instance Service
  • 10. © 2019 Mesosphere, Inc. All Rights Reserved. 10 Kubernetes Focused initially for purely stateless workloads Scheduler can move pods around
  • 11. © 2019 Mesosphere, Inc. All Rights Reserved. 11 Kubernetes - StatefulSets StatefulSets are valuable for applications that require one or more of the following. ● Stable, unique network identifiers. ● Stable, persistent storage. ● Ordered, graceful deployment and scaling. ● Ordered, graceful deletion and termination. ● Ordered, automated rolling updates.
  • 12. © 2019 Mesosphere, Inc. All Rights Reserved. 12 Kubernetes - StatefulSets Node Master Node Slave Node Slave
  • 13. © 2019 Mesosphere, Inc. All Rights Reserved. 13 Kubernetes - StatefulSets Node Master Node Slave Node Slave
  • 14. © 2019 Mesosphere, Inc. All Rights Reserved. 14 Kubernetes - StatefulSets Node Master Node Master Node Slave
  • 15. © 2019 Mesosphere, Inc. All Rights Reserved. 15 Kubernetes - StatefulSets Node Master Node Master Node Slave
  • 16. © 2019 Mesosphere, Inc. All Rights Reserved. 16 Kubernetes - StatefulSets Node Slave Node Master Node Slave
  • 17. © 2019 Mesosphere, Inc. All Rights Reserved. 17 Kubernetes - StatefulSets Node Slave Node Master Node Slave
  • 18. © 2019 Mesosphere, Inc. All Rights Reserved. 18 Operators ● Orchestrate applications using k8s API ● Extend API using Custom Resource Definitions ● Encode domain specific operational knowledge ○ Upgrades ○ Failure and Recovery Scenarios ○ Scaling up/down ● Purpose built per application
  • 19. © 2019 Mesosphere, Inc. All Rights Reserved. 19 Operators ● Operator manages and monitors lifecycle ● CRD’s represent application elements/actions Operator CRD CRD CRD apiVersion: mysql.presslabs.org/v1alpha1 kind: MysqlCluster metadata: name: my-cluster spec: replicas: 2 secretName: my-secret kubectl apply -f mysql-cluster.yaml
  • 20. © 2019 Mesosphere, Inc. All Rights Reserved. 20 Developing Operators Operator Framework ● Redhat/IBM project ● Implement using Ansible, Helm charts, or Go ● Existing implementations often don’t cover the entire lifecycle ● Ansible and Helm are limited. Go requires 1,000s of lines of controller code Kubebuilder ● Kubernetes SIG API Machinery sub-project ● Operators written in Go with a focus on code generation ● Existing implementations often don’t cover the entire lifecycle
  • 21. © 2019 Mesosphere, Inc. All Rights Reserved. 21 Developing Operators Operators require deep knowledge of k8s internals May require thousands of lines of code
  • 22. © 2019Mesosphere, Inc. All Rights Reserved. Two level scheduling Mesos Master and Agents ● Abstract resources into single pool ● Offers and tracks resources ● Guarantees isolation ● Handles workload restart on failure Mesos Framework ● Consumes resources ● Deploys tasks ● Provides application specific logic for deployment, recovery, upgrade Zookeeper Quorum Master Master (Standby) Master (Standby) Frameworks Agent Spark Agent Kubernetes Agent Spark Kubernetes Agent Kafka Kubernetes Executor Task 22
  • 23. © 2019Mesosphere, Inc. All Rights Reserved. Developing Frameworks ... 23 Frameworks require deep knowledge of Mesos internals May require thousands of lines of code
  • 24. © 2019Mesosphere, Inc. All Rights Reserved. Complexity but .. 24 ● Commonality between lifecycle states ● Possible to build abstraction SDK
  • 25. © 2019Mesosphere, Inc. All Rights Reserved. KUDO 25 ● Kubernetes Universal Declarative Operator ○ Universal operator configured via YAML ○ Encodes commonality between lifecycle operations ● OS project licensed as Apache 2.0 ● Open Development model
  • 26. © 2019Mesosphere, Inc. All Rights Reserved. Operator Development 26 Kubebuilder ● Kubernetes SIG API Machinery sub-project ● Operators written in Go with a focus on code generation ● Existing implementations often don’t cover the entire lifecycle Operator Framework ● Redhat/IBM project ● Implement using Ansible, Helm charts, or Go ● Existing implementations often don’t cover the entire lifecycle ● Ansible and Helm are limited. Go requires 1,000s of lines of controller code KUDO ● Universal Operator ● Built using community projects (Kubebuilder, Kustomize, ...) ● Write Operators as templated YAML manifests ● Provide high level CRDs that represent workloads ● Focused on higher level coordination of software lifecycles ● “Day 2 Operators”
  • 27. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Concepts 27 Framework apiVersion: kudo.k8s.io/v1alpha1 kind: Framework metadata: labels: controller-tools.k8s.io: "1.0" name: kafka ● High level description of a service ● Represented as a CRD
  • 28. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Concepts 28 Framework apiVersion: kudo.k8s.io/v1alpha1 kind: FrameworkVersion metadata: labels: controller-tools.k8s.io: "1.0" name: kafka-2.11-2.4.0 namespace: default spec: serviceSpec: version: "2.11-2.4.0" connectionString: "" framework: name: kafka kind: Framework parameters: - name: BROKER_COUNT description: "Number of brokers spun up for Kafka" default: "3" displayName: "Broker Count" ... plans: deploy: strategy: serial phases: - name: deploy-kafka strategy: serial steps: - name: deploy tasks: - deploy● Implementation of a framework ● Contains parameters, objects, plans Framework Version
  • 29. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Concepts 29 Framework ● Ties application instantiation to a framework version Framework Version Instance
  • 30. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Concepts - Plans 30 ● Describe progress through operations ● 3 level hierarchy Plan - Phase - Steps ● Status captured by PlanExecution CRD Plan foo ├─ Phase bar │ ├─ Step qux │ └─ Step quux └─ Phase baz ├─ Step quuz ├─ Step corge └─ Step grault
  • 31. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Concepts - Deployment Strategy 31 ● Indicates the way in which a plan, or Step must be executed. ● If a Step requires another Step to complete first it is necessary to declare them as serial ● Serial and Parallel are the defaults, but others can be defined
  • 32. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Concepts - Trigger 32 ● Defines what actions to take when a parameter changes ● Gives additional customization capabilities parameters: - name: BACKUP_FILE description: "Filename to save the backups to" default: "backup.sql" displayName: "BackupFile" trigger: backup
  • 33. FrameworkVersion Spec Examples - Plans plans: deploy: strategy: serial phases: - name: deploy strategy: serial steps: - name: deploy tasks: - deploy - name: init tasks: - init backup: strategy: serial phases: - name: backup strategy: serial steps: - name: backup tasks: - backup restore: strategy: serial phases: - name: restore strategy: serial steps: - name: restore tasks: - restore Serial or parallel Serial or parallel Tasks can be reused in multiple plans
  • 34. FrameworkVersion Spec Examples - Tasks tasks: deploy: resources: - mysql.yaml init: resources: - init.yaml backup: resources: - backup-pv.yaml - job.yaml patches: - backup.yaml restore: resources: - job.yaml patches: - restore.yaml Mustached k8s objects Tasks can be reused in multiple plans Patches on the roadmap
  • 35. parameters: - name: BROKER_COUNT description: "Number of brokers spun up for Kafka" default: "3" displayName: "Broker Count" required: false trigger: deploy … statefulset.yaml: | apiVersion: apps/v1 kind: StatefulSet metadata: name: {{NAME}} namespace: {{NAMESPACE}} spec: replicas: {{BROKER_COUNT}} … Define parameter Default value Use parameters in spec Plan to use for upgrading value FrameworkVersion Spec Examples - Parameters
  • 36. apiVersion: maestro.k8s.io/v1alpha1 kind: Instance metadata: name: kafka-instance spec: frameworkVersion: name: kafka-2.11-2.4.0 namespace: default type: FrameworkVersion parameters: KAFKA_ZOOKEEPER_URI: zk-zk-0.zk-hs:2181,zk-zk-1.zk-hs:2181,zk- zk-2.zk-hs:2181 KAFKA_ZOOKEEPER_PATH: "/kafka" BROKER_COUNT: "1" Currently a single CRD for Instantiations of a FrameworkVersion Reference FrameworkVersion to use Define parameters for instance FrameworkVersion Spec Examples - Instance
  • 37. © 2019Mesosphere, Inc. All Rights Reserved. Kudo - CLI 37 ● CLI extension to kubectl # Install a KUDO package from the official GitHub repo. kubectl kudo install <name> [flags] # View plan history of a specific package kubectl kudo plan history <name> [flags] # View all plan history of a specific package kubectl kudo plan history [flags] # List instances kubectl kudo list instances [flags] # View plan status kubectl kudo plan status [flags]
  • 38. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Futures - Dynamic CRD’s 38 ● Create new CRD’s during runtime operation ● Update existing CRD’s $ kubectl apply -f new-plan.yaml plan.kafka.kudo.dev/latest blue-green created $ kubectl kudo update-parameter-trigger --framework kafka --framework-version 1.1 --parameter IMAGE_TAG blue-green Update successful. IMAGE_TAG updates will now trigger the `blue-green` plan
  • 39. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Futures - Dynamic CRD’s 39 ● Represent components as first-class Kubernetes objects ● Represent operations as first-class Kubernetes objects ○ Kind: Kafka ○ Kind: Topic ○ Kind: User ○ Backup ■ maxAge: 24h ○ Backup / Restore ○ Index
  • 40. © 2019Mesosphere, Inc. All Rights Reserved. Kudo Futures - Framework Extensions 40 MySQL “Standard” infrastructure, plans, CRDs, etc. MySQL + GKE Istio, Cloud Storage, GCP Security Rules, StackDriver Monitoring, etc. ACME Corp ACME specific plans. Network policy, special operations, cached queries, custom functions, etc. Framework Developer Maintained ACME Corp Maintained
  • 41. 41 Problems with Kustomize: ● YAML, YAML, and more YAML ○ Strings of Mustached YAML! ● Strategic Merge Patches for YAML ○ Patching parameters become brittle with Kustomize ● Configuration still has to be templated separately ● Mustache -> Kustomize flow can be confusing to work with ● Kustomize is designed as a CLI tool - KUDO uses a virtual filesystem Futures - Framework Development SDK
  • 42. 42 ● Configure, Unify, Execute ● Superset of JSON ● Heavily influenced by Borg Configuration Language (BCL) ● Data Constraints ● Basic Types ● Union types ● Disjunctions CUE
  • 43. 43
  • 44. 44
  • 45. © 2019 Mesosphere, Inc. All Rights Reserved. 45 DEMO ….
  • 46. © 2019 Mesosphere, Inc. All Rights Reserved. 46 Get Involved ! https://kudo.dev/ https://groups.google.com/forum/#!forum/kudobuilder #kudo http://slack.k8s.io/ https://github.com/kudobuilder/kudo Community Meeting - weekly Thursdays 10am PT
  • 47. © 2019 Mesosphere, Inc. All Rights Reserved. 47 Thank You for Listening ! Matt Jarvis Twitter: @mattj-io Email: mjarvis@mesosphere.com