DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations

Trending

  • Front-End: Cache Strategies You Should Know
  • Auditing Tools for Kubernetes
  • Redefining DevOps: The Transformative Power of Containerization
  • Insider Threats and Software Development: What You Should Know
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Introduction to KUDO: Automate Day-2 Operations (I)

Introduction to KUDO: Automate Day-2 Operations (I)

Learn more about the Kubernetes Universal Declarative Operator and how it can make it easier to use Kubernetes Operators using YAML.

Sudip Sengupta user avatar by
Sudip Sengupta
CORE ·
Sep. 24, 20 · Tutorial
Like (2)
Save
Tweet
Share
3.25K Views

Join the DZone community and get the full member experience.

Join For Free

Operators are one of the most powerful tools when you are working with Kubernetes, especially when you are in a scenario where Stateful conditions are required like ordered and automated rolling updates, or graceful deployment/deletion and scaling/termination. The problem, however, is writing and building Operators require deep knowledge of Kubernetes internal and a lot lines of code.

Using Kubebuilder requires writing thousands lines of controller code in GO and existing implementations often don't cover the entire lifecycle. You can also go for Operator Framework in order to use Ansible or Helm charts but both have some limitations.

KUDO, The Kubernetes Universal Declarative Operator

KUDO (Kubernetes Universal Declarative Operator) is an open-source toolkit that makes it easy to build Operators using YAML. Additionally, it provides a set of pre-built Operators, that you can use out-of-the-box or easily customize to help you standardizing operations.

Some of the reasons to try KUDO are:

  • Provides abstractions for sequencing lifecycle operations using Kubernetes objects and plans (a kind of runbook).
  • You can reuse and extend previous base Operators for custom Operators.
  • Provides a kubectl plugin, so you can use 'kubectl kudo' to manage, deploy and debug all your workloads.
  • Workloads are managed as CRDs which helps to keep everything in your repository with versioning.
  • Existing Operators can be managed by KUDO.

How KUDO Works

KUDO uses different objects to handle workloads: Operator, OperatorVersion and Instance.

  • Operator is being represented by a CRD object and is the high-level description of a deployable service.
  • OperatorVersion represents implementation of an Operator's specific version of a deployable application. It contains objects, plans and parameters.
  • Instance is an application instantiation to an OperatorVersion. Once created, it renders all parameters in templates such as services, pods or StatefulSets. You can create multiple instances of an OperatorVersion on your Kubernetes cluster.
Operator OperatorVersions and Instances
Operator OperatorVersions and Instances

How Kudo Orchestrates Orders Tasks

Kudo uses plans to orchestrate tasks through phases and steps using a structured runbook. Phases and steps can be run serial or parallel depending on the needs of your application. Some usual plans would be deploy, backup, restore or upgrade.

KUDO plan components
KUDO plan components

Let us take an example of a couple of plans from a MySQL Operator. Here is an extract of the YAML definition file:

plans:  deploy:    strategy: serial    phases:      - name: deploy        strategy: serial        steps:          - name: deploy            tasks:              - deploy          - name: init            tasks:              - init          - name: cleanup            tasks:              - cleanup  backup:    strategy: serial    phases:      - name: backup        strategy: serial        steps:          - name: pv            tasks:              - pv          - name: backup            tasks:              - backup          - name: cleanup            tasks:              - backup-cleanup

As you can see above two different plans are defined: deploy and backup. Both are using a serial strategy and they are executing tasks for any specific step. For the plan named 'backup' we are going to create a PVC for backup purposes, then run the backup job and finally doing a cleanup task.

KUDO Repositories

One of the main advantages of using KUDO is deploying prebuilt Operators by official maintainers. You can find those on Github like these:

  • Apache Cassandra
  • Kafka
  • MySQL
  • Elastic
  • Redis
  • Apache Zookeeper
  • Apache Spark

Overview of the Architecture

The architecture diagram below helps to understand concepts explained above. We have a CLI to get Operators based on YAML from a repository, and also to manage our workload on the Kubernetes cluster. Kudo Controller takes care of all KUDO CRDs which are tied to objects. Also, we can see the relationship and inheritance between Operators, OperatorVersions and Instances.

KUDO Architecture  Source: D2iQ
KUDO Architecture  Source: D2iQ

There are some cool features in the roadmap like Dynamic CRDs, Operator Dependencies and Pipe Tasks which will turn out to be a more powerful and useful tool for our Operator workloads.

Just keep tuned as we are going to explain to you how to install KUDO, deploy, and manage KUDO workloads in a future hands-on article.

This article was originally published on https://appfleet.com/blog/introduction-to-kudo-automate-day-2-operations/.
Operator (extension) Kubernetes

Published at DZone with permission of Sudip Sengupta. See the original article here.

Opinions expressed by DZone contributors are their own.

Trending

  • Front-End: Cache Strategies You Should Know
  • Auditing Tools for Kubernetes
  • Redefining DevOps: The Transformative Power of Containerization
  • Insider Threats and Software Development: What You Should Know

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com

Let's be friends: