Home Backend Development Golang Introducing Kontroler: A Kubernetes Scheduling Engine for DAGs

Introducing Kontroler: A Kubernetes Scheduling Engine for DAGs

Nov 22, 2024 pm 03:59 PM

What is Kontroler?

Kontroler is an open-source Kubernetes scheduling engine designed to simplify the management of Directed Acyclic Graphs (DAGs). With Kontroler, you can define workflows in YAML, run tasks as containerized jobs, and even visualize them through an optional web-based UI. Whether you need to execute workflows on a schedule or respond to real-time events, Kontroler offers a flexible, Kubernetes-native solution.

That said, I must caveat that Kontroler is currently in its alpha state. It is ideal for experimentation and prototyping but may not yet be ready for production use. As a side project, Kontroler does not come with support, so use it in production at your own risk!

If you'd like to check out the GitHub repository, here it is: https://github.com/GreedyKomodoDragon/Kontroler

Why use Kontroler?

Managing workflows on Kubernetes can be challenging. While Kubernetes offers powerful primitives like CronJobs and Jobs, coordinating complex workflows with dependencies, retries, and dynamic triggers often requires custom scripts or external tools. Kontroler simplifies this process by providing a Kubernetes-native solution to define, schedule, and manage workflows as Directed Acyclic Graphs (DAGs).

Here’s what makes Kontroler stand out:

1. Gitops DAG Management with YAML

Kontroler enables you to define your entire workflow—including tasks, dependencies, retry logic, and conditional execution—using straightforward YAML files. This approach keeps your workflows declarative, version-controlled, and easy to share across teams.

Wrap them in a Helm chart and use an automated deployment system such as ArgoCD or FluxCD, and you’ve got your DAGs managed within a GitOps workflow.

2. Supports Event-Driven and Scheduled Workflows

Whether you need workflows to run on a regular schedule (like CronJobs) or react to real-time triggers (such as a message from a queue), Kontroler has you covered. It seamlessly integrates both scheduling paradigms, making it versatile for a wide range of use cases.

Kontroler operates using DagRuns (a Custom Resource Definition, or CRD, that Kontroler can monitor). To execute a DAG run, you simply create a DagRun, and Kontroler manages the execution. By exposing this functionality outside the controller, Kontroler allows seamless integration with external systems. See an example of a DagRun below:

apiVersion: kontroler.greedykomodo/v1alpha1
kind: DagRun
metadata:
  labels:
    app.kubernetes.io/name: dagrun
    app.kubernetes.io/instance: dagrun-sample
  name: dagrun-sample
spec:
  dagName: dag-sample
  parameters:
    - name: first
      fromSecret: secret-name-new
    - name: second
      value: value_new
Copy after login

You simply provide the name of the DAG, optionally including any parameters. Parameters will use their default values if none are specified.

3. Integrates Seamlessly with Containers

As a Kubernetes-native application, Kontroler leverages the platform’s advantages. From simple scripts to complex applications, Kontroler’s container-first design ensures that any workload can be easily integrated into a DAG.

To further reduce duplication of effort, we are adding support for Tasks as CRDs.

4. Offers Optional UI for Better Visibility

While YAML is excellent for infrastructure as code, visualizing workflows and tracking their execution can significantly simplify debugging and optimization. Kontroler offers an optional web-based UI for creating and monitoring DAGs, providing teams with an intuitive way to manage workflows.

Introducing Kontroler: A Kubernetes Scheduling Engine for DAGs

In the screenshot above it shows you the:

  • Connections between tasks
  • In a DagRun it will show the status
  • Pod Outcomes if you click on the network

Under the hood, this functionality is powered by vis-network, an open-source project for creating graphs. You can find their GitHub repository here. Initially, we developed our own graphing tool but found it difficult to scale and challenging to make complex graphs readable. As a result, we adopted this open-source solution.

5. Flexible Pod Templates for Advanced Configurations

Kontroler’s pod templates let you customize your tasks with advanced Kubernetes features like secrets, PVCs, node affinity, security contexts, and more. This gives you fine-grained control over how tasks are executed, ensuring compatibility with your cluster's specific requirements.

Flexibility of Datastores

One of the key challenges in managing workflows is ensuring that the underlying infrastructure can scale with your needs. Kontroler offers flexible database support and logging capabilities to make it easier for teams to manage DAGs and capture detailed execution logs. Whether you're working with a lightweight setup or a more robust production environment, Kontroler has options that can fit your needs.

SQLite (Default Small Scale)

For smaller setups or during development, SQLite is the default database used by Kontroler. It’s simple, lightweight, and doesn’t require much configuration. If you’re just getting started or running Kontroler for testing purposes, SQLite is a convenient choice as it works "out-of-the-box" with no additional database setup.

If you prefer to use SQLite, you don’t need to make any additional changes to the deployment. Just follow the installation instructions, and Kontroler will handle the rest.

PostgreSQL (For Production/Large Scale)

For larger, production-grade deployments, PostgreSQL is the recommended database for storing DAGs and DagRuns. Kontroler uses PostgreSQL to provide higher performance, scalability, and reliability needed for handling large volumes of workflow data. Kontroler is compatible with PostgreSQL 16 and above

Log Collection

For many Kubernetes users, centralized log storage is a crucial requirement for observability and troubleshooting. Kontroler integrates seamlessly with Amazon S3 for log storage, making it easy to collect, store, and analyze logs from DAG executions. This integration ensures that you can capture detailed logs, keep them long-term for auditing, and use them for post-mortem analysis when something goes wrong.

We are testing with MinIO to avoid costs, but under the hood, it uses the AWS S3 API and should be able to detect your IAM attributes to grant access to your S3 buckets.

Final Remarks

We hope you’ll check out Kontroler! You can find it here: https://github.com/GreedyKomodoDragon/Kontroler.

Although still in alpha, Kontroler has significant potential for teams looking to streamline their Kubernetes operations. As it evolves, Kontroler aims to become a powerful tool for orchestrating workflows in Kubernetes, delivering the reliability and scalability teams need to automate complex processes with ease.

Kontroler is constantly improving, so keep an eye out for future updates! If you’d like to contribute to the project, we welcome all forms of contributions.

The above is the detailed content of Introducing Kontroler: A Kubernetes Scheduling Engine for DAGs. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the vulnerabilities of Debian OpenSSL What are the vulnerabilities of Debian OpenSSL Apr 02, 2025 am 07:30 AM

OpenSSL, as an open source library widely used in secure communications, provides encryption algorithms, keys and certificate management functions. However, there are some known security vulnerabilities in its historical version, some of which are extremely harmful. This article will focus on common vulnerabilities and response measures for OpenSSL in Debian systems. DebianOpenSSL known vulnerabilities: OpenSSL has experienced several serious vulnerabilities, such as: Heart Bleeding Vulnerability (CVE-2014-0160): This vulnerability affects OpenSSL 1.0.1 to 1.0.1f and 1.0.2 to 1.0.2 beta versions. An attacker can use this vulnerability to unauthorized read sensitive information on the server, including encryption keys, etc.

Transforming from front-end to back-end development, is it more promising to learn Java or Golang? Transforming from front-end to back-end development, is it more promising to learn Java or Golang? Apr 02, 2025 am 09:12 AM

Backend learning path: The exploration journey from front-end to back-end As a back-end beginner who transforms from front-end development, you already have the foundation of nodejs,...

What libraries are used for floating point number operations in Go? What libraries are used for floating point number operations in Go? Apr 02, 2025 pm 02:06 PM

The library used for floating-point number operation in Go language introduces how to ensure the accuracy is...

What is the problem with Queue thread in Go's crawler Colly? What is the problem with Queue thread in Go's crawler Colly? Apr 02, 2025 pm 02:09 PM

Queue threading problem in Go crawler Colly explores the problem of using the Colly crawler library in Go language, developers often encounter problems with threads and request queues. �...

How to specify the database associated with the model in Beego ORM? How to specify the database associated with the model in Beego ORM? Apr 02, 2025 pm 03:54 PM

Under the BeegoORM framework, how to specify the database associated with the model? Many Beego projects require multiple databases to be operated simultaneously. When using Beego...

In Go, why does printing strings with Println and string() functions have different effects? In Go, why does printing strings with Println and string() functions have different effects? Apr 02, 2025 pm 02:03 PM

The difference between string printing in Go language: The difference in the effect of using Println and string() functions is in Go...

How to solve the user_id type conversion problem when using Redis Stream to implement message queues in Go language? How to solve the user_id type conversion problem when using Redis Stream to implement message queues in Go language? Apr 02, 2025 pm 04:54 PM

The problem of using RedisStream to implement message queues in Go language is using Go language and Redis...

What should I do if the custom structure labels in GoLand are not displayed? What should I do if the custom structure labels in GoLand are not displayed? Apr 02, 2025 pm 05:09 PM

What should I do if the custom structure labels in GoLand are not displayed? When using GoLand for Go language development, many developers will encounter custom structure tags...

See all articles