Nov 3 – 5, 2023
Riga, Latvia
Europe/Riga timezone

PyKubeSlurm: A Python Operator for Efficient Job Scheduling in Slurm using Kubernetes

Nov 4, 2023, 2:00 PM
Lambda – Talks (Radisson Blu Latvija)

Lambda – Talks

Radisson Blu Latvija

Talk (25 Minutes) Infrastructure


Matheus Tosta



Scheduling jobs in Kubernetes can be a challenging task that often requires programming skills and a steep learning curve. Many engineers struggle with the complexities of managing job scheduling efficiently. Today, we are excited to present a solution that simplifies this process. PyKubeSlurm is a Python package built on top of Kopf, specifically designed to run as a Kubernetes operator, addressing the job scheduling challenges engineers face.

Problem Statement

Scheduling jobs is not always as straightforward as it seems. It demands programming skills that not all engineers possess, which becomes a barrier for efficient job management. Learning and adapting to new technologies and tools can be time-consuming and hinder productivity. This problem calls for a solution that empowers engineers with an easy-to-use tool while minimizing the learning curve.

Software Solution

PyKubeSlurm is the answer to the job scheduling challenge in HPC environments. It serves as a Python package that functions as a Kubernetes operator. Leveraging the power of multithreading, it integrates seamlessly into your Kubernetes environment, providing a user-friendly experience for job scheduling. By leveraging Python, engineers can now schedule jobs with ease, eliminating the need for extensive programming expertise.

Operational Workflow

To facilitate the efficient execution of job scheduling, PyKubeSlurm operates by submitting jobs to slurmrestd. It is essential to ensure a public endpoint is available within the same network as the operator, enabling seamless access to the Slurm API.

By embracing traditional Kubernetes, PyKubeSlurm empowers engineers to effortlessly manage job scheduling across different environments. This unified operational workflow ensures consistent and reliable job execution, regardless of the underlying infrastructure.

Benefits and Conclusion

The benefits of adopting PyKubeSlurm are numerous. Engineers can embrace a more "GitOps" oriented workflow, seamlessly integrating job manifests into their existing Git flow. This approach allows for better resource management, enhanced replicability, and a more efficient overall workflow. With PyKubeSlurm, engineers can focus on the logic and requirements of their jobs, rather than grappling with the complexities of job scheduling.

In conclusion, PyKubeSlurm revolutionizes job scheduling in Kubernetes by providing a Python-based solution that simplifies the process and eliminates the need for extensive programming skills. It empowers engineers to embrace a more "GitOps" oriented workflow, enabling seamless integration of job manifests. With PyKubeSlurm, engineers can unlock the full potential of job scheduling while optimizing resource management and replicability in their Kubernetes environments.

Session author's bio

Matheus Tosta is a dynamic software engineer specializing in architecting scalable cloud solutions. With a strong foundation in electronic engineering, Matheus is also currently pursuing a degree in the field, with a particular focus on RF systems and their application in satellites. His technical expertise and passion for cutting-edge technology have fueled his drive to develop innovative solutions that optimize performance and efficiency in cloud environments.

In addition to his professional pursuits, Matheus is a passionate music lover, finding solace and inspiration in creating and listening to various genres. He believes that music not only enriches his personal life but also enhances his creativity and problem-solving abilities in his professional work.

Above all, Matheus is a devoted father who cherishes the joy and responsibility of parenthood. Balancing his career and family life, he strives to create a nurturing and supportive environment for his children. Matheus approaches every endeavor, whether it's tackling complex technical challenges or sharing musical experiences, with unwavering dedication, enthusiasm, and love.

Level of Difficulty Intermediate
Social Media @matheushent

Presentation materials

There are no materials yet.