With the Operator Lifecycle Manager
Operator Hub and your
Kubernetes Cluster
Josh Wood
Developer Advocate, Red Hat
joshix@redhat.com – @joshixisjosh9 – joshix.com
1
2
Why should you care about Operators?
3
Any application in any system must be
installed, configured, managed and
upgraded over time
Patching is critical to security
“Anything that isn’t
automated is slowing you
down”
4
5
What is Kubernetes?
An open source orchestration system for
managing containerized workloads across
a cluster of nodes.
6
Kubernetes Object Definitions
kind: Pod
apiVersion: v1
metadata:
name: example-app
spec:
containers:
- name: example
image: quay.io/my/app:v1.2.0
[...]
Kubernetes is a declarative
platform
7
8
Scaling stateless apps: easy
9
$ kubectl scale deploy/staticweb --replicas=3
10
scale up
count=1desired=3
ReplicaSet
11
start
count=3desired=3
ReplicaSet
12
What about apps that store data?
13
Deploying a database is easy
14
$ kubectl create deployment db --image=quay.io/my/db
15
Running a database over time is harder
16
● Resize/Upgrade
● Reconfigure
● Backup
● Healing
17
If only Kubernetes knew...
18
1. Application-specific custom controllers
2. Custom resource definitions (CRD)
Extending the Kubernetes API
19
Custom Resource
Developer /
Kubernetes User
Deployments
StatefulSets
Autoscalers
Secrets
Config maps
PersistentVolume
How Does an Operator Work?
K8s API
kind: ProductionReadyDatabase
apiVersion:
database .example.com/v1alpha1
metadata:
name: my-important -database
spec:
connectionPoolSize: 300
readReplicas: 2
version: v4.0.1
Custom Kubernetes
Controller
Watch Events
Reconciliation
+
Custom Resource Definition
Kubernetes Operator Native Kubernetes
Resources
20
Custom Resource (CR)
kind: ProductionReadyDatabase
apiVersion: database.example.com/v1alpha1
metadata:
name: my-production-ready-database
spec:
clusterSize: 3
readReplicas: 2
version: v4.0.1
[...]
21
22
23
Operators are automated software
managers that manage the entire
lifecycle of Kubernetes applications
Value of Operators
24
Improve the “time to
first value” for your
customers
Minimize software upgrade
risk and associated
operational costs
Embed best practices
from the experts – you
– into the Operator
Provide a cloud-like
"As a Service"
experience
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
OPERATOR LIFECYCLE MANAGER: The Operator Operator
25
26
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 LIFECYCLE MANAGEMENT
OPERATOR
SDK
KUBERNETES
OPERATOR
+ = +
OPERATOR
LIFECYCLE
MANAGER
+
USER
“create new
operator”
scaffolding custom logic metadata
package
“make available to”
“list packages”
“subscribe to
channel”
subscriptionnamespaceoperator
instance
managed
application
“Create
application”
SERVICE INSTANTIATION
PUBLISHER
ADMINISTRATOR
+
27
AUTHOR
28
Use Operators Today
OperatorHub.io is a home
for the Kubernetes
community to share
Operators.
Find an existing Operator
or list your own today.
29
Red Hat Products
ISV Partners
Community
TYPES OF OPERATORS
OPERATOR HUB
Operator Hub - Allows
administrators to
selectively make
operators available from
curated sources to users
in the cluster.
30
31
Easy self service of Operator-backed Services
Reduce friction for deploying operator
backed applications
● Rich UI for creating and mutating the
app instances
32
...and many more
OPERATORS ACROSS THE INDUSTRY
33
Operator Maturity Model
Phase I Phase II Phase III Phase IV Phase V
Basic Install
Automated application
provisioning and
configuration management
Seamless Upgrades
Patch and minor version
upgrades supported
Full Lifecycle
App lifecycle, storage
lifecycle (backup, failure
recovery)
Deep Insights
Metrics, alerts, log
processing and workload
analysis
Auto Pilot
Horizontal/vertical scaling,
auto config tuning, abnormal
detection, scheduling tuning
34
https://github.com/operator-framework
https://operatorhub.io
https://learn.openshift.com/operatorframework/
http://bit.ly/kubernetes-operators
Resources
Thank you linkedin.com/showcase/red-hat-developer
youtube - bit.ly/2YRIWTk
facebook.com/redhatdeveloperprogram
twitter.com/rhdevelopers
35
Josh Wood
joshix@redhat.com
@joshixisjosh9
joshix.com

Operatorhub.io and your Kubernetes cluster | DevNation Tech Talk