Kubernetes is a fast-paced project and things move really fast. In deploying applications, you have several options like raw YAML files, Helm, or Operator but what are the pros and cons of each?
This talk will explore the right ways to manage your production applications through seamless installation, the patch fixes, and upgrades. Several demos will be used on a live cluster to illustrate how things can be done the right way that makes life very easy for the DevOps.
Decarbonising Commercial Real Estate: The Role of Operational Performance
Managing kubernetes deployment with operators
1. @Copyright, Cloud Technology Experts Inc@Copyright, Cloud Technology Experts Inc
Managing your Kubernetes
Application Deployment
with Helm and Operator
2. @Copyright, Cloud Technology Experts Inc
Hello!
I am Damian Igbe, PhD
● Certified Kubernetes Administrator (CKA), AWS Certified Solutions Architect,
Developer and SysOps. CCNA, CCIE (Theory), Linux LPI-levels 1 and 2
● Several years as a Technical Trainer
● CTO of Cloud Technology Experts
● Loves Running, at least one Marathon every year (if no pandemic J)
● One of the organizers of this meetup https://www.meetup.com/Kubernetes-
and-Cloud-Native-North-Dallas/
● You can find me at damianigbe@cloudtechnologyexperts.com
3. @Copyright, Cloud Technology Experts Inc
Main Objective
• Get you to be aware of the K8S application
deployment tools: YAML, Helm, Operator
• Know their Capabilities
• Help clarify the differences between them
4. @Copyright, Cloud Technology Experts Inc
The Agenda
• Kubernetes Architecture Review
• Managing Kubernetes Applications
• Extending Kubernetes the Operator Way
• Custom Resource Definitions (CRD)
• Controllers
• Demo: Using the ETCD Operator
• Writing your Own Operators
• Conclusion
7. @Copyright, Cloud Technology Experts Inc
Demo: The K8S Cluster
• Show the Cluster
• The K8S control plane components
8. @Copyright, Cloud Technology Experts Inc
Managing Kubernetes
• Traditional Way
• Kubectl
• Kubernetes DashBoard
• Kubernetes the OS of the Cloud
• Helm - Stateless
• Operator - Stateful
9. @Copyright, Cloud Technology Experts Inc
Demo: Creating Objects in K8S
• Show the Creation of Pod (orphan Pod) using kubectl
and Kubernetes Dashboard
• Show using ReplicatSets and Deployment objects as
a controller
10. @Copyright, Cloud Technology Experts Inc
Extending Kubernetes With Operators
• Automation Automation Automation
• Operators are Robots
• They have to do specific jobs to every application e.g
Prometheus Operators, etcd operator, MongoDB operator
• They put the human knowledge into the Application:
In coreOs words
An operator is a controller that encodes human operational
knowledge: how do I run and manage a specific piece of
complex software.
12. @Copyright, Cloud Technology Experts Inc
Operator Definition
• An Operator is an application-specific controller that extends the
Kubernetes API to:
• create,
• configure,
• and manage instances of complex stateful applications on behalf of a Kubernetes
user.
• It builds upon the basic Kubernetes resource and controller concepts but
includes domain or application-specific knowledge to automate common
tasks.
Brandon Philips, Former CTO of CoreOS
13. @Copyright, Cloud Technology Experts Inc
Operator Cont.
• An Operator builds upon the basic Kubernetes resource and controller
concepts and adds a set of knowledge or configuration that allows the
Operator to execute common application tasks.
• For example, when scaling an etcd cluster manually:
• a user has to perform a number of steps:
• create a DNS name for the new etcd member,
• launch the new etcd instance,
• and then use the etcd administrative tools (etcdctl member add) to tell the existing
cluster about this new member.
• Instead with the etcd Operator a user can simply increase the etcd cluster size field
by 1.
Brandon Philips, former CTO of CoreOS
15. @Copyright, Cloud Technology Experts Inc
Demo: ETCD Operator
• Before doing the exercises, first deploy ETCD Operator
using Helm
helm install stable/etcd-operator --generate-name
• Create and Destroy
• Resize
• Failover
• Rolling upgrade
• Backup and Restore
https://github.com/coreos/etcd-operator#create-and-
destroy-an-etcd-cluster
16. @Copyright, Cloud Technology Experts Inc
Deploying Applications on Kubernetes
Which one should I use?
• They complement each other
• Helm mostly for direct installation of stateless apps
• Operator mostly for automation of day-2 operations of stateful apps
• Helm for installing Operators
https://cloudblogs.microsoft.com/opensource/2020/04/02/when-to-
use-helm-operators-kubernetes-ops/
https://coreos.com/blog/introducing-operators.html
17. @Copyright, Cloud Technology Experts Inc
Writing an Operator
• You can write an Operator for your application
• You can use SDKS
1. Operator Framework
• https://github.com/operator-framework
• Operator SDK:
• https://github.com/operator-framework/operator-sdk
2. Kubebuilder
• https://github.com/kubernetes-sigs/kubebuilder
• https://book.kubebuilder.io/cronjob-tutorial/controller-
implementation.html