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

NETWAYS
NETWAYSNETWAYS
© 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
1 von 47

Más contenido relacionado

Was ist angesagt?(20)

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

Último(20)

Best Mics For Your Live StreamingBest Mics For Your Live Streaming
Best Mics For Your Live Streaming
ontheflystream6 views
LAVADORA ROLO.docxLAVADORA ROLO.docx
LAVADORA ROLO.docx
SamuelRamirez835247 views
El Arte de lo PossibleEl Arte de lo Possible
El Arte de lo Possible
Neo4j28 views
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j27 views
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 views

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