KubeAdaptor: A docking framework for workflow containerization on Kubernetes

Chenggang Shan, Yuanqing Xia, Yufeng Zhan, Jinhui Zhang

Introduction

Kubernetes (K8s) has become the undisputed standard for container orchestration, primarily optimized for long-running microservices. However, scientific research often relies on complex workflows—sequences of interdependent tasks represented as Directed Acyclic Graphs (DAGs). When these workflows are migrated to K8s, a significant mismatch occurs. The native K8s scheduler operates in a "disordered" and "unpredictable" manner relative to the workflow's optimized task order, leading to "scattered scheduling" that results in resource idle time and increased execution latency.

Native Kubernetes scheduling often leads to scattered and disorderly execution of workflow tasks.

The KubeAdaptor Framework

To bridge this gap, KubeAdaptor is introduced as a "docking framework" that acts as a logic interface between high-level workflow scheduling and low-level K8s pod orchestration. Unlike traditional controllers that rely on periodic polling, KubeAdaptor utilizes an event-driven architecture to maintain the integrity of the workflow's intended execution order.

Key Technical Features

  • Two-Level Scheduling: KubeAdaptor respects the optimized task sequence determined by the workflow engine while managing the specific container requirements within the K8s environment.
  • Event-Trigger Mechanism: By leveraging the Kubernetes Informer toolkit, the framework monitors the K8s API server for real-time state changes. This eliminates the latency associated with constant polling; as soon as a task pod completes, the next dependent task is immediately triggered.
  • Modular Architecture: The system is composed of several specialized modules, including a Workflow Injection Module (via gRPC), a Namespace Creator for workload isolation, and a Task Container Creator for rapid pod deployment. It also utilizes StorageClass and NFS to allow seamless data sharing between task containers.
The detailed internal architecture of KubeAdaptor, highlighting the modular components and event-driven workflow injection.

Experimental Evaluation

The performance of KubeAdaptor was evaluated using four real-world scientific workflows from the Pegasus repository: Montage (astronomy), Epigenomics (genomics), CyberShake (seismology), and LIGO (physics). These benchmarks cover various structural patterns like fork-join and complex pipelines, providing a robust test for the framework.

Key Results

When compared against the industry-standard Argo workflow engine and a basic Batch Job baseline, KubeAdaptor demonstrated significant improvements:

  • Reduced Execution Time: Task pod execution times were reduced by 24.45% (Montage) to as much as 47.57% (Epigenomics) compared to Argo.
  • Lifecycle Efficiency: The total workflow lifecycle duration—from the first task to the last—decreased by approximately 43% to 49% across all benchmarks.
  • Resource Utilization: By minimizing the gap between task transitions, KubeAdaptor maintains higher average CPU and memory utilization, ensuring cloud hardware is used more effectively.

Conclusion and Future Work

KubeAdaptor proves that strictly enforcing a pre-optimized task order within Kubernetes significantly enhances performance for short-lived, interdependent tasks. Future developments will focus on creating a graphical user interface (GUI) for better accessibility and exploring "cloud-edge" cooperation to manage workflows across geographically distributed resources.

Summary updated

BibTeX
@article{shan2022kubeadaptor,
  author = {Chenggang Shan and Yuanqing Xia and Yufeng Zhan and Jinhui Zhang},
  title = {{KubeAdaptor: A docking framework for workflow containerization on Kubernetes}},
  journal = {Future Generation Computer Systems},
  year = {2022},
}
Figure