Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Extending Kubernetes with Operators http://bit.ly/k8s-ops
<section data-background='black' data-markdown>
## Extending Kubernetes
with
# Operators
http://bit.ly/k8s-ops
[1:15pm–2:05pm Tuesday, February 25, 2020 at #OReillySACon](https://conferences.oreilly.com/software-architecture/sa-ny/public/schedule/detail/83225)
</section>
<section data-background-transition='fade' data-background='black' id='presented-by-ryanj'>
<p>presented by <a href="http://twitter.com/ryanj/">@ryanj</a>, Developer Advocate at <a href='http://redhat.com' style='color:red;'>Red Hat</a></p>
<p><a href="http://twitter.com/ryanj/"><img alt="ryanj" src="http://ryanjarvinen.com/images/ryan-jarvinen-headshot.jpg" style="width:50%" /></p>
</section>
<section id='brought-to-you-by' data-background='black' data-background-color="black">
<p style="color:white;">brought to you by</p>
<p style="color:white;"><a href="https://redhat.com"><img alt="Red Hat logo" src="https://mariadb.com/wp-content/uploads/2018/10/customer-red-hat-logo-white-1.png" /></a></p>
</section>
<section data-markdown>
## the "State of Statefulness"
on Kubernetes:
* stateless is generally solved
* stateful workloads are still nontrivial
</section>
<section data-markdown>
### Operators Are&hellip;
</section>
<section data-markdown>
# WHAT?
* Custom Resource Definitions (CRDs)
* Custom Controller (domain expertise) -> { spec, status }
</section>
<section>
<h2>CRDs</h2>
<pre><code contenteditable>kind: ProductionReadyDatabase
apiVersion: database.example.com/v1alpha1
metadata:
name: my-production-ready-database
spec:
clusterSize: 3
readReplicas: 2
version: v4.0.1
[...]</code></pre>
</section>
<section>
<h2>CR</h2>
<pre><code contenteditable>kind: EtcdCluster
apiVersion: etcd.database.coreos.com/v1beta2
metadata:
name: example-etcd-cluster
spec:
size: 3
version: "3.1.0"</code></pre>
</section>
<section>
<h2>Controllers</h2>
<ul>
<li>ReplicaSet</li>
<li>https://github.com/coreos/rollback-controller</li>
</ul>
</section>
<section data-markdown>
## Imperative
vs
## Declarative
</section>
<section data-markdown>
Imperative:
> "Kubernetes, turn left at the next stop, then turn right and go 3 more blocks, park in the empty spot"
Declarative:
> "Kubernetes, take me home!"
</section>
<section>
<h3>Requirements from clients</h3>
<img src="https://www.mygnomes.co.uk/wp-content/uploads/2018/07/underpants-gnomes-business-plan.png"/>
</section><section data-markdown>
> Operators allow experts to pave over domain-specific gaps in functionality; freeing up developers to focus on their %dayjob%
</section><section data-markdown>
# WHY NOT?
* security
* consistency
* no need for a custom control interface?
* no need to extend the cluster?
* namespacing implications?
</section>
<section>
<h1>WHY?</h1>
<ul>
<li class='fragment'>security</li>
<li class='fragment'>consistency</li>
<li class='fragment'>ability to redistribute a clean and reliable developer interface</li>
<li class='fragment'>ability to redistribute custom platform logic </li>
<li class='fragment'>community (shared support via TSANet)</li>
<li class='fragment'>updates (updates via OLM)</li>
</ul>
</section>
<section data-markdown>
### Productivity
Productivity requires:
* reproducibility (service availability)
* observability (logs, metrics, traces)
* using the right tool for the job
</section><section data-markdown>
### Productivity
Production-like environments provide the best reproducibility, observability
1. Kubernetes provides a reproducible platform for cloud-native solutions
2. OpenShift provides a PaaS-like environment whith active management for cloud-native solutions (with maintainers, patch streams)
3. Portable app code from the neck up
</section>
<section data-markdown>
# OperatorHub
[operatorhub.io](http://operatorhub.io)
Sourcing a distribution full of cloud services from the CNCF landscape, available on any Kubernetes
</section>
<section data-markdown>
## Operator Lifecycle Manager
https://github.com/operator-framework/operator-lifecycle-manager
</section>
<section data-markdown>
## Operator Framework and SDK
https://github.com/operator-framework
</section>
<section data-markdown>
### Ways to get started with the OperatorSDK:
* go
* ansible
* helm charts
http://learn.openshift.com/operatorframework
</section>
<section data-markdown>
### Free O'Reilly Ebook!
http://bit.ly/kubernetes-operators
</section>
<section data-markdown>
# Try OpenShift
https://try.openshift.com
</section>
<section data-background-transition='fade' data-background='black' id='Q-and-A'>
<h1>Q&A</h1>
<p class=fragment>Have follow up questions? Find us at the Red Hat booth in the Expo Hall!</p>
</section>
<section data-background-transition='fade' data-background='black' id='thank-you'>
<h2>Thank You!</h2>
<p><a href="http://twitter.com/ryanj/"><img alt="ryanj" src="http://ryanjarvinen.com/images/ryanj-mestrefungo-com.gif" style="width:50%" /></p>
<p><a href="http://twitter.com/ryanj/">@ryanj</a></p>
<p><a href="http://bit.ly/k8s-ops">http://bit.ly/k8s-ops</a>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment