SlideShare uma empresa Scribd logo
1 de 58
Baixar para ler offline
Automating with Operators
Marek Jelen
Red Hat
@marek_jelen
Jorge Morales
Red Hat
@jorgemoralespou
@jorgemoralespou / @marek_jelen
● OpenShift Developer Advocate @ Red Hat
● Python, Ruby, Java, PHP developer
● Automation and cloud specialist
● OpenShift Developer Advocate @ Red Hat
● Java developer
● Developer experience and devops fanboy
Marek Jelen Jorge Morales
@jorgemoralespou / @marek_jelen
● Why you should care about Operators
● What are Operators?
● How Operators work
● Building Operators
● Managing Operators
● Examples
● Installing OpenShift via Operators
What we’ll cover
@jorgemoralespou / @marek_jelen
Scaling stateless apps: Easy
@jorgemoralespou / @marek_jelen
$ kubectl scale deploy/staticweb --replicas=3
@jorgemoralespou / @marek_jelen
@jorgemoralespou / @marek_jelen
@jorgemoralespou / @marek_jelen
What about apps that… store data?
Or have their own notion of a “cluster”?
Databases?
@jorgemoralespou / @marek_jelen
Running a database is easy
@jorgemoralespou / @marek_jelen
$ kubectl run db --image=quay.io/my/db
@jorgemoralespou / @marek_jelen
Running it over time is harder
@jorgemoralespou / @marek_jelen
⏣ Resize/Upgrade
⏣ Reconfigure
⏣ Backup
⏣ Healing
@jorgemoralespou / @marek_jelen
Every application on any platform must
be installed, configured, managed, and
upgraded over time
Patching is critical to security
@jorgemoralespou / @marek_jelen
“Anything not automated is slowing
you down.”
@jorgemoralespou / @marek_jelen
If only k8s knew…
@jorgemoralespou / @marek_jelen
Grant Pequeño Hombre
MEET THIS
GUY
@jorgemoralespou / @marek_jelen
KNOWLEDGE
IN A BOX
@jorgemoralespou / @marek_jelen
PRODUCTION
READY DBs
@jorgemoralespou / @marek_jelen
Operators are automated software
managers for Kubernetes applications:
Install and Lifecycle
@jorgemoralespou / @marek_jelen
The recipe
@jorgemoralespou / @marek_jelen
Extend Kubernetes
@jorgemoralespou / @marek_jelen
Application-specific controllers that extend the Kubernetes
API to create, configure, and manage instances of complex
stateful applications on behalf of a Kubernetes user
@jorgemoralespou / @marek_jelen
kind: ProductionReadyDatabase
apiVersion: database.example.com/v1alpha1
metadata:
name: my-production-ready-database
spec:
clusterSize: 3
readReplicas: 2
version: v4.0.1
Extend the Kubernetes API through the Custom Resource
Definition (CRD) mechanism
@jorgemoralespou / @marek_jelen
Extend the Kubernetes API through the Custom Resource
Definition (CRD) mechanism
{
}
@jorgemoralespou / @marek_jelen
Reconciling desired state for your application
{
}
@jorgemoralespou / @marek_jelen
https://github.com/operator-framework
Keep Operators up to date
@jorgemoralespou / @marek_jelen
An Operator for Operators
OPERATOR
LIFECYCLE MANAGER
@jorgemoralespou / @marek_jelen
Over-the-air updates
@jorgemoralespou / @marek_jelen
https://github.com/operator-framework/awesome-operators
@jorgemoralespou / @marek_jelen
OPERATOR
MARKETPLACE
@jorgemoralespou / @marek_jelen
OPERATOR
METERING
@jorgemoralespou / @marek_jelen
Build your own operator
@jorgemoralespou / @marek_jelen
makes it easier to build Operators
OPERATOR
SDK
@jorgemoralespou / @marek_jelen
1.
Scaffolding and code generation to
bootstrap new projects
@jorgemoralespou / @marek_jelen
2.
Extension points that cover common
Operator use cases
@jorgemoralespou / @marek_jelen
3.
High level APIs and abstractions to
write operational logic
@jorgemoralespou / @marek_jelen
Step by step
@jorgemoralespou / @marek_jelen
1.
Create a new operator project using the
SDK Command Line Interface(CLI)
$ operator-sdk new prodready-db-operator 
--api-version=database.example.com/v1alpha1 
--kind=ProductionReadyDatabase
@jorgemoralespou / @marek_jelen
kind: ProductionReadyDatabase
apiVersion: database.example.com/v1alpha1
metadata:
name: my-production-ready-database
spec:
clusterSize: 3
readReplicas: 2
version: v4.0.1
2.
Define new resource APIs by adding
Custom Resource Definitions(CRD)
@jorgemoralespou / @marek_jelen
3.
Specify resources to watch using the
SDK API
func main() {
printVersion()
sdk.Watch("database.example.com/v1alpha1",
"ProductionReadyDatabase",
"default",5)
sdk.handle(stub.newHandler())
sdk.Run(context.TODO())
}
@jorgemoralespou / @marek_jelen
4.
Define the operator reconciliation logic
in a designated handler and use the SDK
API to interact with resources
@jorgemoralespou / @marek_jelen
5.
Use the SDK CLI to build and generate
the operator and deployment manifests
$ operator-sdk generate k8s
@jorgemoralespou / @marek_jelen
6.
Deploy and run the operator in the
cluster
$ operator-sdk build example/prodreadydb:v0.0.1
$ docker push example/prodreadydb:v0.0.1
$ k apply -f deploy/rbac.yaml
$ k apply -f deploy/operator.yaml
@jorgemoralespou / @marek_jelen
7.
Deploy your own kubernetes
applications
$ cat <<EOF | k apply -f -
kind: ProductionReadyDatabase
apiVersion: database.example.com/v1alpha1
metadata:
name: my-production-ready-database
spec:
clusterSize: 3
readReplicas: 2
version: v4.0.1
EOF
@jorgemoralespou / @marek_jelen
Taste it!
@jorgemoralespou / @marek_jelen
etcd Operator
@jorgemoralespou / @marek_jelen
etcd Operator
3.3.8
3.3.8
3.3.9
@jorgemoralespou / @marek_jelen
@jorgemoralespou / @marek_jelen
Database
@jorgemoralespou / @marek_jelen
Deploying OpenShift via Operators
@jorgemoralespou / @marek_jelen
DEMO
● Installer
○ Provision the infrastructure
○ Deploy temporary K8s cluster
○ Ignite the deployment process
● Operators
○ Do the rest ...
@jorgemoralespou / @marek_jelen
@jorgemoralespou / @marek_jelen
DEMO
cluster-kube-apiserver-operator*
cluster-kube-controller-manager-operator*
cluster-kube-scheduler-operator*
cluster-openshift-api-server-operator
cluster-openshift-controller-manager-operator
cluster-monitoring-operator
cluster-network-operator
cluster-dns-operator
cluster-ingress-operator
machine-api-operator
auth-config-operator
cluster-autoscaler-operator
cluster-node-tuning-operator
cluster-storage-operator
cluster-samples-operator
cluster-image-registry-operator
cluster-logging-operator
cluster-service-catalog-operator
console-operator
machine-config-operator
service-serving-cert-signer
olm-operator
@jorgemoralespou / @marek_jelen
Helpful resources
@jorgemoralespou / @marek_jelen
Resources
● Operator Framework and SDK on Github
https://github.com/operator-framework/
● Awesome Operators!
https://github.com/operator-framework/awesome-operators
● Introducing the Operator Framework
https://coreos.com/blog/introducing-operator-framework
● Make a Kubernetes Operator in 15 mins with Helm
https://blog.openshift.com/make-a-kubernetes-operator-in-15-minutes-with-hel
m/
● Kubernetes Custom Resources Grow up in v1.10.0
https://blog.openshift.com/kubernetes-custom-resources-grow-up-in-v1-10/
Coming Soon: Operators tutorials
OpenShift Learning Portal
http://learn.openshift.com
Automating with Operators
Jorge Morales
Red Hat
@jorgemoralespou
Marek Jelen
Red Hat
@marek_jelen
Thanks for attending

Mais conteúdo relacionado

Mais procurados

01. lab instructions starting project
01. lab instructions   starting project01. lab instructions   starting project
01. lab instructions starting project
rajul14
 
Using React with Grails 3
Using React with Grails 3Using React with Grails 3
Using React with Grails 3
Zachary Klein
 

Mais procurados (20)

Crossing the Streams! Rollout Strategies to Keep Your Users Happy!
Crossing the Streams! Rollout Strategies to Keep Your Users Happy!Crossing the Streams! Rollout Strategies to Keep Your Users Happy!
Crossing the Streams! Rollout Strategies to Keep Your Users Happy!
 
Swagger code motion talk
Swagger code motion talkSwagger code motion talk
Swagger code motion talk
 
Bootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario GrayBootiful Reactive Testing - Mario Gray
Bootiful Reactive Testing - Mario Gray
 
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
Selenium Testing your Kubernetes Apps with Machine Learning and TestimSelenium Testing your Kubernetes Apps with Machine Learning and Testim
Selenium Testing your Kubernetes Apps with Machine Learning and Testim
 
Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous DeliverySpinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
Spinnaker Summit 2019: Where are we heading? The Future of Continuous Delivery
 
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
Cloud Foundry Summit 2015: 12 Factor Apps For OperationsCloud Foundry Summit 2015: 12 Factor Apps For Operations
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
 
01. lab instructions starting project
01. lab instructions   starting project01. lab instructions   starting project
01. lab instructions starting project
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
 
5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)5 cool ways to get started with Cloud Native Development ( with Okteto)
5 cool ways to get started with Cloud Native Development ( with Okteto)
 
Kenzan Spinnaker Meetup
Kenzan Spinnaker MeetupKenzan Spinnaker Meetup
Kenzan Spinnaker Meetup
 
Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"Alexey Kupriyanenko "Release Early, Often, Stable"
Alexey Kupriyanenko "Release Early, Often, Stable"
 
Arquitecturas de microservicios - Medianet Software
Arquitecturas de microservicios   -  Medianet SoftwareArquitecturas de microservicios   -  Medianet Software
Arquitecturas de microservicios - Medianet Software
 
Gabriele Provinciali/Gabriele Folchi/Luca Postacchini - Sviluppo con piattafo...
Gabriele Provinciali/Gabriele Folchi/Luca Postacchini - Sviluppo con piattafo...Gabriele Provinciali/Gabriele Folchi/Luca Postacchini - Sviluppo con piattafo...
Gabriele Provinciali/Gabriele Folchi/Luca Postacchini - Sviluppo con piattafo...
 
Setting Up Development Environment For Google App Engine & Python | Talentica
Setting Up Development Environment For Google App Engine & Python | TalenticaSetting Up Development Environment For Google App Engine & Python | Talentica
Setting Up Development Environment For Google App Engine & Python | Talentica
 
ng4 webpack and yarn in JHipster
ng4 webpack and yarn in JHipsterng4 webpack and yarn in JHipster
ng4 webpack and yarn in JHipster
 
Java 9 and Beyond
Java 9 and BeyondJava 9 and Beyond
Java 9 and Beyond
 
Using React with Grails 3
Using React with Grails 3Using React with Grails 3
Using React with Grails 3
 
12 factor apps
12 factor apps12 factor apps
12 factor apps
 
The 12 Factor App
The 12 Factor AppThe 12 Factor App
The 12 Factor App
 
Spring Webflux
Spring WebfluxSpring Webflux
Spring Webflux
 

Semelhante a Automating stateful applications with kubernetes operators - Openstack Summit EU 2018

Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
Elizabeth Quinn-Woods
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
Madeline Gauthier
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
K. Dachos
 

Semelhante a Automating stateful applications with kubernetes operators - Openstack Summit EU 2018 (20)

Automating with operators - FossAsia Summit 2019
Automating with operators - FossAsia Summit 2019Automating with operators - FossAsia Summit 2019
Automating with operators - FossAsia Summit 2019
 
Chasing the RESTful Trinity - Client CLI and Documentation
Chasing the RESTful Trinity - Client CLI and DocumentationChasing the RESTful Trinity - Client CLI and Documentation
Chasing the RESTful Trinity - Client CLI and Documentation
 
Resful Trinity Code One - San Francisco
Resful Trinity Code One - San FranciscoResful Trinity Code One - San Francisco
Resful Trinity Code One - San Francisco
 
Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18Improving the developer experience on OpenShift - devconf-india-18
Improving the developer experience on OpenShift - devconf-india-18
 
Connecting with the enterprise - The how and why of connecting to Enterprise ...
Connecting with the enterprise - The how and why of connecting to Enterprise ...Connecting with the enterprise - The how and why of connecting to Enterprise ...
Connecting with the enterprise - The how and why of connecting to Enterprise ...
 
Seattle bestpractices2010
Seattle bestpractices2010Seattle bestpractices2010
Seattle bestpractices2010
 
Do you really want to go fully micro?
Do you really want to go fully micro?Do you really want to go fully micro?
Do you really want to go fully micro?
 
"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi"The working architecture of NodeJs applications" Viktor Turskyi
"The working architecture of NodeJs applications" Viktor Turskyi
 
Merb For The Enterprise
Merb For The EnterpriseMerb For The Enterprise
Merb For The Enterprise
 
Legacy Code: Evolve or Rewrite?
Legacy Code: Evolve or Rewrite?Legacy Code: Evolve or Rewrite?
Legacy Code: Evolve or Rewrite?
 
JFall 2016: Oracle JET Session
JFall 2016: Oracle JET SessionJFall 2016: Oracle JET Session
JFall 2016: Oracle JET Session
 
Codename one
Codename oneCodename one
Codename one
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
 
Coding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever ChangedCoding With JRebel - Java Forever Changed
Coding With JRebel - Java Forever Changed
 
Write Once, Run Everywhere
Write Once, Run EverywhereWrite Once, Run Everywhere
Write Once, Run Everywhere
 
How backbone.js is different from ember.js?
How backbone.js is different from ember.js?How backbone.js is different from ember.js?
How backbone.js is different from ember.js?
 
Meteor Mobile App Development
Meteor Mobile App DevelopmentMeteor Mobile App Development
Meteor Mobile App Development
 
Intro to SpringBatch NoSQL 2021
Intro to SpringBatch NoSQL 2021Intro to SpringBatch NoSQL 2021
Intro to SpringBatch NoSQL 2021
 
Architecting applications for Windows 8 and Windows Phone 8 by Karl Ots / @f...
Architecting applications for Windows 8 and Windows Phone 8  by Karl Ots / @f...Architecting applications for Windows 8 and Windows Phone 8  by Karl Ots / @f...
Architecting applications for Windows 8 and Windows Phone 8 by Karl Ots / @f...
 

Mais de Jorge Morales

Mais de Jorge Morales (8)

OpenShift for developers in action! - jbcnconf19
OpenShift for developers in action! - jbcnconf19OpenShift for developers in action! - jbcnconf19
OpenShift for developers in action! - jbcnconf19
 
Put the dev back in devops - Cloud-native at local speed! - RH Summit 19
Put the dev back in devops - Cloud-native at local speed! - RH Summit 19Put the dev back in devops - Cloud-native at local speed! - RH Summit 19
Put the dev back in devops - Cloud-native at local speed! - RH Summit 19
 
Odo improving the developer experience on OpenShift - hack &amp; sangria
Odo   improving the developer experience on OpenShift - hack &amp; sangriaOdo   improving the developer experience on OpenShift - hack &amp; sangria
Odo improving the developer experience on OpenShift - hack &amp; sangria
 
Mastering java in containers - MadridJUG
Mastering java in containers - MadridJUGMastering java in containers - MadridJUG
Mastering java in containers - MadridJUG
 
Build and run applications in a dockerless kubernetes world - DevConf India 18
Build and run applications in a dockerless kubernetes world - DevConf India 18Build and run applications in a dockerless kubernetes world - DevConf India 18
Build and run applications in a dockerless kubernetes world - DevConf India 18
 
Build and run applications in a dockerless kubernetes world
Build and run applications in a dockerless kubernetes worldBuild and run applications in a dockerless kubernetes world
Build and run applications in a dockerless kubernetes world
 
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18Openshift: The power of kubernetes for engineers - Riga Dev Days 18
Openshift: The power of kubernetes for engineers - Riga Dev Days 18
 
I tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaSI tried to dockerize my app but I had to PaaS
I tried to dockerize my app but I had to PaaS
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 

Automating stateful applications with kubernetes operators - Openstack Summit EU 2018