SlideShare uma empresa Scribd logo
1 de 46
Baixar para ler offline
Operators ABC
Robert Bohne
SR. SPECIALIST SOLUTION ARCHITECT | OPENSHIFT
Twitter: @RobertBohne
1
2
What is an Operator?
Operator is a
automated software manager
that deals with the installation and life cycle of
an applications on top of Kubernetes/OpenShift.
3
Controller
Piece of software that deals
with the installation and life cycle of
an applications on top of OpenShift.
Custom Resource Definition (CRD)
OpenShift API extension to interact and
communicate with the Controller.
4
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
name: cars.openshift.pub
spec:
group: openshift.pub
names:
kind: Car
listKind: CarList
plural: cars
singular: car
scope: Namespaced
subresources:
status: {}
version: v1
apiVersion: openshift.pub/v1
kind: Car
metadata:
name: bmw
spec:
date_of_manufacturing: "2014-07-01T00:00:00Z"
engine: N57D30
Custom Resource Definition (CRD) Custom Resource (CR)
Custom Resource Definition (CRD)
5
[..snipped..]
additionalPrinterColumns:
- JSONPath: .status.conditions[?(@.type=="Succeeded")].status
name: Succeeded
type: string
- JSONPath: .status.conditions[?(@.type=="Succeeded")].reason
name: Reason
type: string
- JSONPath: .spec.date_of_manufacturing
name: Produced
type: date
- JSONPath: .spec.engine
name: Engine
type: string
priority: 1
6
apiVersion: apps/v1
kind: Deployment
metadata:
name: operator
spec:
replicas: 1
selector:
matchLabels:
name: operator
template:
metadata:
labels:
name: operator
spec:
containers:
- name: operator
Image: "quay.io/org/operator:v0.0.1"
Controller
Peace of software running
on top of OpenShift
7
{
}
Custom Resource
8
{
}
Custom Resource
Custom Resource
MyApplication
State
k8s API
Controller
Watch Events Reconciliation
My Application
Kubernetes Resources
for My App
Operator Pattern
9
10
How to create an Operator?
11
OPERATOR
SDK
KUBERNETES
OPERATOR
+ =
DEVELOPER
“create new
operator”
scaffolding custom logic
Operator Framework in Action
Deployment
Role
ClusterRole
RoleBinding
ClusterRoleBinding
ServiceAccount
CustomResourceDefinition
implemented as a container image plus:
Ansible SDKHelm SDK Go SDK
Helm Chart
Ansible Playbooks
APBs
Build operators from
Helm chart, without any
coding
Build operators from
Ansible playbooks and
APBs
Build advanced operators
for full lifecycle
management
Operator Adoption Patterns
12
13
Types of Operators
14
Use Cases ideal for operator development
● stateful applications (such as databases)
● clustered or high-availability applications (clustered databases, key value stores such as etcd,
in-memory cache clusters such as redis)
● multiservice applications (an application which needs dependent services to come online first)
● microservices (numerous small components that together make up a cohesive product or app)
Use cases less ideal for operator development
● stateless apps (most web apps or front-ends)
● infrastructure/host agents (monitoring agents or log forwarders)
Demo
15
Custom Resource
MyApplication
State
k8s API
Ansible Operator
Operator-S
DK
Ansible
Role
My Application
Kubernetes Resources
for My App
Ansible Operator
File
Mapping
Ansible k8s modules will be
used to create resources in
kubernetes
16
What you need to create an Ansible
Operator
● A CustomResourceDefinition (CRD)
● An Ansible Playbook or Role
● A mapping from CRD to Ansible playbook / roles
● operator-sdk
17
Create the Operator with the SDK
$ operator-sdk new memcached-operator 
--api-version=cache.example.com/v1alpha1 
--kind=Memcached --type=ansible
Creates:
● Ansible Role
● Mapping File (watches.yaml)
● Custom Resource Definition
● Deploy manifest for the new Operator
18
Custom Resource (CR)
apiVersion: <Group/Version>
kind: <kind>
metadata:
name: <name>
spec:
<key>: <value>
….
status:
<key>: <value>
….
Ansible Operator
Status will be a generic status defined
by the operator. This will use ansible
runner output to generate meaningful
output for the user.
Spec values will be translated to
Ansible extra vars.
19
Ansible Role
Create a Role that deploys and
manages your application
memcached/
├── defaults
│ └── main.yml
├── files
├── handlers
│ └── main.yml
├── meta
│ └── main.yml
├── README.md
├── tasks
│ └── main.yml
├── templates
├── tests
│ ├── inventory
│ └── test.yml
└── vars
└── main.yml
20
Mapping between CRDs and Ansible
Maps a Group Version Kind (GVK) to a role or playbook.
# watches.yaml
---
- version: v1alpha1
- group: cache.example.com
kind: Memcached
playbook: /path/to/playbook
21
Build the Operator with the SDK
$ operator-sdk build memcached-operator:v0.0.1
Creates:
● A Dockerfile that creates the Operator
● Builds the container on top of ansible-runner image
22
23
What is an Operator?
● Container Image ( contains the software manager )
● Deployment
● Custom Resource Definition (CRD) Metadata
● Role Bindings
● ...
24
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
DEVELOPER
“create new
operator”
scaffolding custom logic metadata
package
What is an Operator?
25
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
OPERATOR
LIFECYCLE
MANAGER
DEVELOPER
quay.io /
Image Registry
ADMINISTRATOR
“create new
operator”
scaffolding custom logic metadata
package
Catalog Source
“list packages”
Package Discovery:
$ oc get packagemanifests
How to ship an Operator?
26
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
OPERATOR
LIFECYCLE
MANAGER
DEVELOPER
quay.io /
Image Registry
ADMINISTRATOR
“create new
operator”
scaffolding custom logic metadata
package
Catalog Source
“list packages”
Package Discovery:
$ oc get packagemanifests
How to ship an Operator?
27
Operator Deployment
Custom Resource
Definitions
RBAC
API Dependencies
Update Path
Metadata
YourOperator v1.1.2
Bundle
OPERATOR
LIFECYCLE MANAGER
Deployment
Role
ClusterRole
RoleBinding
ClusterRoleBinding
ServiceAccount
CustomResourceDefinition
28
OPERATOR
LIFECYCLE MANAGER
Deployment
Role
ClusterRole
RoleBinding
ClusterRoleBinding
ServiceAccount
CustomResourceDefinition
29
OperatorHub
OperatorHub data sources
Operator Metadata from quay.io
● Backend for all default sources, cluster needs to be online
● Supplies Red Hat Operators, ISV Operators and Community
Operator
● Custom sources supported in customer-owned quay.io
namespaces
Operator Metadata in container images
● Already used internally used by OLM
● Operator package data is served from a SQlite database,
bundled up in a container image
● Custom sources supported in customer-owned image registries
● Cluster can be disconnected / air-gapped
Package name
e.g. prometheus
Channel name
e.g. stable
Operator
Bundle 1
Operator
Bundle 2
Channel name
e.g. tech-preview
Operator
Bundle 3
...
Operator Package Metadata
30
31
● Certified Operators
submitted through Red Hat Connect - listed
in OpenShift OperatorHub
● Community Operators
submitted through GitHub - listed in both
OpenShift and OKD OperatorHub
● Upstream Community Operators
also submitted through GitHub - listed in
the OperatorHub.io community website
34
OPERATOR
LIFECYCLE MANAGER
YourOperator v1.1.2
YourOperator v1.1.3
YourOperator v1.2.0
YourOperator v1.2.2
Subscription for
YourOperator
Time
VersionOperator Catalog
Operator Updates
35
Proxy Support
OpenShift 4.2 Cluster
OPERATOR
LIFECYCLE MANAGER
Pod
spec:
containers:
- name: my-container
image: ...
env:
- name: HTTP_PROXY
value: "..."
- name: HTTPS_PROXY
value: "..."
Cluster Proxy
Config
Operator
4.2 Automated Dependency Resolution
YourOperator v1.1.2
requires
requires
Jaeger Operatorjaeger.jaegertracing.io/v1
CockroachDB Operatorcockroachdb.charts.helm.k8s.io/v1alpha1
resolves to
resolves to
Operator Framework Dependency Graphs
OPERATOR
LIFECYCLE MANAGER
installed by
installed by
36
38
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
OPERATOR
LIFECYCLE
MANAGER
DEVELOPER
quay.io /
Image Registry
ADMINISTRATOR
“create new
operator”
scaffolding custom logic metadata
package
Catalog Source
“list packages”
Package Discovery:
$ oc get packagemanifests
39
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
OPERATOR
LIFECYCLE
MANAGER
DEVELOPER
quay.io /
Image Registry
ADMINISTRATOR
“create new
operator”
scaffolding custom logic metadata
package
Catalog Source
“list packages”
Package Discovery:
$ oc get packagemanifests
40
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
OPERATOR
LIFECYCLE
MANAGER
DEVELOPER
quay.io /
Image Registry
ADMINISTRATOR
“create new
operator”
scaffolding custom logic metadata
package
Catalog Source
“list packages”
+
“subscribe to an
operator”
subscriptionnamespaceoperator
instance
Operator Discovery:
$ oc get csv -n <namespace>
41
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
OPERATOR
LIFECYCLE
MANAGER
DEVELOPER
quay.io /
Image Registry
ADMINISTRATOR
“create new
operator”
scaffolding custom logic metadata
package
Catalog Source
“list packages”
+
“subscribe to an
operator”
subscriptionnamespaceoperator
instance
managed
application
“create
application”
USER
42
Operator Hub - Allows
administrators to
selectively make
operators available from
curated sources to users
in the cluster.
Operators in OpenShift
43
● Operator SDK - Allows developers to build, package and test an Operator
based on your expertise without requiring all the knowledge of Kubernetes
API complexities
● Operator Lifecycle Manager - Helps you to install, and update, and
generally manage the lifecycle of all of the Operators (and their associated
services) running across your clusters
● Operator Metering - Enable usage reporting for Operators and resources
within Kubernetes
44
Insights from
Cluster Monitoring
App-specific
Insights from
Operators
21
Use SDK libraries to
export metrics
Built Operator is run by
the lifecycle manager
46
OPTIONALSECTIONMARKERORTITLE
Roadmap for
Operator
Framework
Custom Operators Catalogs
Operator Metadata from quay.io
● Backend for all default sources, cluster needs to be online
● Supplies Red Hat Operators, ISV Operators and Community
Operator
● Custom sources supported in customer-owned quay.io
namespaces
Operator Metadata in container images
● Already used internally used by OLM
● Operator package data is served from a SQlite database,
bundled up in a container image
● Custom sources supported in customer-owner image
registries
● Cluster can be disconnected / air-gapped
47
48
Regular users can install Operators
Release Channel for
YourOperator
Catalog containing
YourOperator
Instance of
YourOperator
(global)
+ =
ADMINISTRATOR
USER
Release Channel for
YourOperator
Catalog containing
YourOperator
Instance of
YourOperator
(namespaced)
+ =
ServiceAccount created by
Administrator
+
Operator Framework Roadmap
49
Q4 CY19 1H CY20 2H CY20
Automatic Dependency Resolution
Delegation of Operator installation
to regular users
Proxy / Disconnected Support
Custom Operator Catalogs
OLM
SDK
Helm v2.14 support
Kubernetes 1.14 support
Prometheus metrics
UBI as base-image
OLM
Single Object to represent an
Operator
Container Images as Operator
Bundles
Container Registries as Operator
Catalogs
SDK
Kubebuilder support
OLM integration (“install” / “run”)
OLM
Investigation support for helm and
OCI as bundle formats
SDK
Investigation of Java and Python
support
linkedin.com/company/red-hat
youtube.com/user/RedHatVideos
facebook.com/redhatinc
twitter.com/RedHat
50
Red Hat is the world’s leading provider of enterprise
open source software solutions. Award-winning support,
training, and consulting services make Red Hat a trusted
adviser to the Fortune 500.
Thank you
OPTIONALSECTIONMARKERORTITLE

Mais conteúdo relacionado

Mais procurados

Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Vietnam Open Infrastructure User Group
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법Open Source Consulting
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요Jo Hoon
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfssuser31375f
 
Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4HngNguyn748044
 
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링OpenStack Korea Community
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
 
CNCF Meetup - OpenShift Overview
CNCF Meetup - OpenShift OverviewCNCF Meetup - OpenShift Overview
CNCF Meetup - OpenShift OverviewSumit Shatwara
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDSunnyvale
 
Operator Framework Overview
Operator Framework OverviewOperator Framework Overview
Operator Framework OverviewRob Szumski
 
OpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platformOpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platformKangaroot
 
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShiftKubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShiftDevOps.com
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes waysparkfabrik
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfJuanSalinas593459
 
GitOps is the best modern practice for CD with Kubernetes
GitOps is the best modern practice for CD with KubernetesGitOps is the best modern practice for CD with Kubernetes
GitOps is the best modern practice for CD with KubernetesVolodymyr Shynkar
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introductionDongwon Kim
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101Weaveworks
 

Mais procurados (20)

Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
Room 1 - 4 - Phạm Tường Chiến & Trần Văn Thắng - Deliver managed Kubernetes C...
 
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교  및 구축 방법
[오픈소스컨설팅] 쿠버네티스와 쿠버네티스 on 오픈스택 비교 및 구축 방법
 
OpenShift Enterprise
OpenShift EnterpriseOpenShift Enterprise
OpenShift Enterprise
 
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
왜 쿠버네티스는 systemd로 cgroup을 관리하려고 할까요
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdf
 
Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4Introduction to Red Hat OpenShift 4
Introduction to Red Hat OpenShift 4
 
OpenShift Introduction
OpenShift IntroductionOpenShift Introduction
OpenShift Introduction
 
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
CNCF Meetup - OpenShift Overview
CNCF Meetup - OpenShift OverviewCNCF Meetup - OpenShift Overview
CNCF Meetup - OpenShift Overview
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCDKubernetes GitOps featuring GitHub, Kustomize and ArgoCD
Kubernetes GitOps featuring GitHub, Kustomize and ArgoCD
 
Operator Framework Overview
Operator Framework OverviewOperator Framework Overview
Operator Framework Overview
 
OpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platformOpenShift 4, the smarter Kubernetes platform
OpenShift 4, the smarter Kubernetes platform
 
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShiftKubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
Kubernetes 101 - an Introduction to Containers, Kubernetes, and OpenShift
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
OpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdfOpenShift-Technical-Overview.pdf
OpenShift-Technical-Overview.pdf
 
GitOps is the best modern practice for CD with Kubernetes
GitOps is the best modern practice for CD with KubernetesGitOps is the best modern practice for CD with Kubernetes
GitOps is the best modern practice for CD with Kubernetes
 
Kubernetes introduction
Kubernetes introductionKubernetes introduction
Kubernetes introduction
 
Kubernetes Networking 101
Kubernetes Networking 101Kubernetes Networking 101
Kubernetes Networking 101
 

Semelhante a Red Hat OpenShift Operators - Operators ABC

Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using GoCloudOps2005
 
Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk
Operatorhub.io and your Kubernetes cluster | DevNation Tech TalkOperatorhub.io and your Kubernetes cluster | DevNation Tech Talk
Operatorhub.io and your Kubernetes cluster | DevNation Tech TalkRed Hat Developers
 
An intro to Kubernetes operators
An intro to Kubernetes operatorsAn intro to Kubernetes operators
An intro to Kubernetes operatorsJ On The Beach
 
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019UA DevOps Conference
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonIvan Ma
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudMassimiliano Dessì
 
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e JavaCome costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e JavaCodemotion
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesQAware GmbH
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusEmily Jiang
 
使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster 使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster inwin stack
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpToshiaki Maki
 
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAconCloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAconMario-Leander Reimer
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...DevDay.org
 
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...Tobias Schneck
 
Application Development on Metapod
Application Development on MetapodApplication Development on Metapod
Application Development on MetapodCisco DevNet
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesChris Bailey
 
Build your operator with the right tool
Build your operator with the right toolBuild your operator with the right tool
Build your operator with the right toolRafał Leszko
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxNebulaworks
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesSamuel Terburg
 

Semelhante a Red Hat OpenShift Operators - Operators ABC (20)

Operator SDK for K8s using Go
Operator SDK for K8s using GoOperator SDK for K8s using Go
Operator SDK for K8s using Go
 
Crafting Kubernetes Operators
Crafting Kubernetes OperatorsCrafting Kubernetes Operators
Crafting Kubernetes Operators
 
Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk
Operatorhub.io and your Kubernetes cluster | DevNation Tech TalkOperatorhub.io and your Kubernetes cluster | DevNation Tech Talk
Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk
 
An intro to Kubernetes operators
An intro to Kubernetes operatorsAn intro to Kubernetes operators
An intro to Kubernetes operators
 
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
ОЛЕГ МАЦЬКІВ «Crash course on Operator Framework» Lviv DevOps Conference 2019
 
Exploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in PythonExploring MySQL Operator for Kubernetes in Python
Exploring MySQL Operator for Kubernetes in Python
 
Dessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloudDessi docker kubernetes paas cloud
Dessi docker kubernetes paas cloud
 
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e JavaCome costruire una Platform As A Service con Docker, Kubernetes Go e Java
Come costruire una Platform As A Service con Docker, Kubernetes Go e Java
 
Cloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit KubernetesCloud-native .NET Microservices mit Kubernetes
Cloud-native .NET Microservices mit Kubernetes
 
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexusMicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
MicroProfile, Docker, Kubernetes, Istio and Open Shift lab @dev nexus
 
使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster 使用 Prometheus 監控 Kubernetes Cluster
使用 Prometheus 監控 Kubernetes Cluster
 
Open Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjpOpen Service Broker APIとKubernetes Service Catalog #k8sjp
Open Service Broker APIとKubernetes Service Catalog #k8sjp
 
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAconCloud-native .NET-Microservices mit Kubernetes @BASTAcon
Cloud-native .NET-Microservices mit Kubernetes @BASTAcon
 
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
[DevDay 2017] OpenShift Enterprise - Speaker: Linh Do - DevOps Engineer at Ax...
 
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...Kubernetes Cluster API - managing the infrastructure of  multi clusters (k8s ...
Kubernetes Cluster API - managing the infrastructure of multi clusters (k8s ...
 
Application Development on Metapod
Application Development on MetapodApplication Development on Metapod
Application Development on Metapod
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
Build your operator with the right tool
Build your operator with the right toolBuild your operator with the right tool
Build your operator with the right tool
 
The App Developer's Kubernetes Toolbox
The App Developer's Kubernetes ToolboxThe App Developer's Kubernetes Toolbox
The App Developer's Kubernetes Toolbox
 
OpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetesOpenShift Enterprise 3.1 vs kubernetes
OpenShift Enterprise 3.1 vs kubernetes
 

Último

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[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.pdfhans926745
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
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 organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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...apidays
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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...Miguel Araújo
 
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 DevelopmentsTrustArc
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 

Último (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[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
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
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
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 

Red Hat OpenShift Operators - Operators ABC

  • 1. Operators ABC Robert Bohne SR. SPECIALIST SOLUTION ARCHITECT | OPENSHIFT Twitter: @RobertBohne 1
  • 2. 2 What is an Operator? Operator is a automated software manager that deals with the installation and life cycle of an applications on top of Kubernetes/OpenShift.
  • 3. 3 Controller Piece of software that deals with the installation and life cycle of an applications on top of OpenShift. Custom Resource Definition (CRD) OpenShift API extension to interact and communicate with the Controller.
  • 4. 4 apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: name: cars.openshift.pub spec: group: openshift.pub names: kind: Car listKind: CarList plural: cars singular: car scope: Namespaced subresources: status: {} version: v1 apiVersion: openshift.pub/v1 kind: Car metadata: name: bmw spec: date_of_manufacturing: "2014-07-01T00:00:00Z" engine: N57D30 Custom Resource Definition (CRD) Custom Resource (CR)
  • 5. Custom Resource Definition (CRD) 5 [..snipped..] additionalPrinterColumns: - JSONPath: .status.conditions[?(@.type=="Succeeded")].status name: Succeeded type: string - JSONPath: .status.conditions[?(@.type=="Succeeded")].reason name: Reason type: string - JSONPath: .spec.date_of_manufacturing name: Produced type: date - JSONPath: .spec.engine name: Engine type: string priority: 1
  • 6. 6 apiVersion: apps/v1 kind: Deployment metadata: name: operator spec: replicas: 1 selector: matchLabels: name: operator template: metadata: labels: name: operator spec: containers: - name: operator Image: "quay.io/org/operator:v0.0.1" Controller Peace of software running on top of OpenShift
  • 9. Custom Resource MyApplication State k8s API Controller Watch Events Reconciliation My Application Kubernetes Resources for My App Operator Pattern 9
  • 10. 10 How to create an Operator?
  • 11. 11 OPERATOR SDK KUBERNETES OPERATOR + = DEVELOPER “create new operator” scaffolding custom logic Operator Framework in Action Deployment Role ClusterRole RoleBinding ClusterRoleBinding ServiceAccount CustomResourceDefinition implemented as a container image plus:
  • 12. Ansible SDKHelm SDK Go SDK Helm Chart Ansible Playbooks APBs Build operators from Helm chart, without any coding Build operators from Ansible playbooks and APBs Build advanced operators for full lifecycle management Operator Adoption Patterns 12
  • 14. 14 Use Cases ideal for operator development ● stateful applications (such as databases) ● clustered or high-availability applications (clustered databases, key value stores such as etcd, in-memory cache clusters such as redis) ● multiservice applications (an application which needs dependent services to come online first) ● microservices (numerous small components that together make up a cohesive product or app) Use cases less ideal for operator development ● stateless apps (most web apps or front-ends) ● infrastructure/host agents (monitoring agents or log forwarders)
  • 16. Custom Resource MyApplication State k8s API Ansible Operator Operator-S DK Ansible Role My Application Kubernetes Resources for My App Ansible Operator File Mapping Ansible k8s modules will be used to create resources in kubernetes 16
  • 17. What you need to create an Ansible Operator ● A CustomResourceDefinition (CRD) ● An Ansible Playbook or Role ● A mapping from CRD to Ansible playbook / roles ● operator-sdk 17
  • 18. Create the Operator with the SDK $ operator-sdk new memcached-operator --api-version=cache.example.com/v1alpha1 --kind=Memcached --type=ansible Creates: ● Ansible Role ● Mapping File (watches.yaml) ● Custom Resource Definition ● Deploy manifest for the new Operator 18
  • 19. Custom Resource (CR) apiVersion: <Group/Version> kind: <kind> metadata: name: <name> spec: <key>: <value> …. status: <key>: <value> …. Ansible Operator Status will be a generic status defined by the operator. This will use ansible runner output to generate meaningful output for the user. Spec values will be translated to Ansible extra vars. 19
  • 20. Ansible Role Create a Role that deploys and manages your application memcached/ ├── defaults │ └── main.yml ├── files ├── handlers │ └── main.yml ├── meta │ └── main.yml ├── README.md ├── tasks │ └── main.yml ├── templates ├── tests │ ├── inventory │ └── test.yml └── vars └── main.yml 20
  • 21. Mapping between CRDs and Ansible Maps a Group Version Kind (GVK) to a role or playbook. # watches.yaml --- - version: v1alpha1 - group: cache.example.com kind: Memcached playbook: /path/to/playbook 21
  • 22. Build the Operator with the SDK $ operator-sdk build memcached-operator:v0.0.1 Creates: ● A Dockerfile that creates the Operator ● Builds the container on top of ansible-runner image 22
  • 23. 23 What is an Operator? ● Container Image ( contains the software manager ) ● Deployment ● Custom Resource Definition (CRD) Metadata ● Role Bindings ● ...
  • 24. 24 OPERATOR SDK KUBERNETES OPERATOR + = + DEVELOPER “create new operator” scaffolding custom logic metadata package What is an Operator?
  • 25. 25 OPERATOR SDK KUBERNETES OPERATOR + = + OPERATOR LIFECYCLE MANAGER DEVELOPER quay.io / Image Registry ADMINISTRATOR “create new operator” scaffolding custom logic metadata package Catalog Source “list packages” Package Discovery: $ oc get packagemanifests How to ship an Operator?
  • 26. 26 OPERATOR SDK KUBERNETES OPERATOR + = + OPERATOR LIFECYCLE MANAGER DEVELOPER quay.io / Image Registry ADMINISTRATOR “create new operator” scaffolding custom logic metadata package Catalog Source “list packages” Package Discovery: $ oc get packagemanifests How to ship an Operator?
  • 27. 27
  • 28. Operator Deployment Custom Resource Definitions RBAC API Dependencies Update Path Metadata YourOperator v1.1.2 Bundle OPERATOR LIFECYCLE MANAGER Deployment Role ClusterRole RoleBinding ClusterRoleBinding ServiceAccount CustomResourceDefinition 28
  • 30. OperatorHub data sources Operator Metadata from quay.io ● Backend for all default sources, cluster needs to be online ● Supplies Red Hat Operators, ISV Operators and Community Operator ● Custom sources supported in customer-owned quay.io namespaces Operator Metadata in container images ● Already used internally used by OLM ● Operator package data is served from a SQlite database, bundled up in a container image ● Custom sources supported in customer-owned image registries ● Cluster can be disconnected / air-gapped Package name e.g. prometheus Channel name e.g. stable Operator Bundle 1 Operator Bundle 2 Channel name e.g. tech-preview Operator Bundle 3 ... Operator Package Metadata 30
  • 31. 31 ● Certified Operators submitted through Red Hat Connect - listed in OpenShift OperatorHub ● Community Operators submitted through GitHub - listed in both OpenShift and OKD OperatorHub ● Upstream Community Operators also submitted through GitHub - listed in the OperatorHub.io community website
  • 32. 34 OPERATOR LIFECYCLE MANAGER YourOperator v1.1.2 YourOperator v1.1.3 YourOperator v1.2.0 YourOperator v1.2.2 Subscription for YourOperator Time VersionOperator Catalog Operator Updates
  • 33. 35 Proxy Support OpenShift 4.2 Cluster OPERATOR LIFECYCLE MANAGER Pod spec: containers: - name: my-container image: ... env: - name: HTTP_PROXY value: "..." - name: HTTPS_PROXY value: "..." Cluster Proxy Config Operator
  • 34. 4.2 Automated Dependency Resolution YourOperator v1.1.2 requires requires Jaeger Operatorjaeger.jaegertracing.io/v1 CockroachDB Operatorcockroachdb.charts.helm.k8s.io/v1alpha1 resolves to resolves to Operator Framework Dependency Graphs OPERATOR LIFECYCLE MANAGER installed by installed by 36
  • 35. 38 OPERATOR SDK KUBERNETES OPERATOR + = + OPERATOR LIFECYCLE MANAGER DEVELOPER quay.io / Image Registry ADMINISTRATOR “create new operator” scaffolding custom logic metadata package Catalog Source “list packages” Package Discovery: $ oc get packagemanifests
  • 36. 39 OPERATOR SDK KUBERNETES OPERATOR + = + OPERATOR LIFECYCLE MANAGER DEVELOPER quay.io / Image Registry ADMINISTRATOR “create new operator” scaffolding custom logic metadata package Catalog Source “list packages” Package Discovery: $ oc get packagemanifests
  • 37. 40 OPERATOR SDK KUBERNETES OPERATOR + = + OPERATOR LIFECYCLE MANAGER DEVELOPER quay.io / Image Registry ADMINISTRATOR “create new operator” scaffolding custom logic metadata package Catalog Source “list packages” + “subscribe to an operator” subscriptionnamespaceoperator instance Operator Discovery: $ oc get csv -n <namespace>
  • 38. 41 OPERATOR SDK KUBERNETES OPERATOR + = + OPERATOR LIFECYCLE MANAGER DEVELOPER quay.io / Image Registry ADMINISTRATOR “create new operator” scaffolding custom logic metadata package Catalog Source “list packages” + “subscribe to an operator” subscriptionnamespaceoperator instance managed application “create application” USER
  • 39. 42 Operator Hub - Allows administrators to selectively make operators available from curated sources to users in the cluster. Operators in OpenShift
  • 40. 43 ● Operator SDK - Allows developers to build, package and test an Operator based on your expertise without requiring all the knowledge of Kubernetes API complexities ● Operator Lifecycle Manager - Helps you to install, and update, and generally manage the lifecycle of all of the Operators (and their associated services) running across your clusters ● Operator Metering - Enable usage reporting for Operators and resources within Kubernetes
  • 41. 44 Insights from Cluster Monitoring App-specific Insights from Operators 21 Use SDK libraries to export metrics Built Operator is run by the lifecycle manager
  • 43. Custom Operators Catalogs Operator Metadata from quay.io ● Backend for all default sources, cluster needs to be online ● Supplies Red Hat Operators, ISV Operators and Community Operator ● Custom sources supported in customer-owned quay.io namespaces Operator Metadata in container images ● Already used internally used by OLM ● Operator package data is served from a SQlite database, bundled up in a container image ● Custom sources supported in customer-owner image registries ● Cluster can be disconnected / air-gapped 47
  • 44. 48 Regular users can install Operators Release Channel for YourOperator Catalog containing YourOperator Instance of YourOperator (global) + = ADMINISTRATOR USER Release Channel for YourOperator Catalog containing YourOperator Instance of YourOperator (namespaced) + = ServiceAccount created by Administrator +
  • 45. Operator Framework Roadmap 49 Q4 CY19 1H CY20 2H CY20 Automatic Dependency Resolution Delegation of Operator installation to regular users Proxy / Disconnected Support Custom Operator Catalogs OLM SDK Helm v2.14 support Kubernetes 1.14 support Prometheus metrics UBI as base-image OLM Single Object to represent an Operator Container Images as Operator Bundles Container Registries as Operator Catalogs SDK Kubebuilder support OLM integration (“install” / “run”) OLM Investigation support for helm and OCI as bundle formats SDK Investigation of Java and Python support
  • 46. linkedin.com/company/red-hat youtube.com/user/RedHatVideos facebook.com/redhatinc twitter.com/RedHat 50 Red Hat is the world’s leading provider of enterprise open source software solutions. Award-winning support, training, and consulting services make Red Hat a trusted adviser to the Fortune 500. Thank you OPTIONALSECTIONMARKERORTITLE