- Student Developer Info
- Project Overview
- Communication and Work Management
- Primary Features/Components I Worked On
- Challenges Encountered
- Future Scope of the Project
- Key Learnings
- Acknowledgments
- Important Links
Name: Sibasish Behera (@TheRealSibasishBehera)
Organization: KubeVirt Community
Project: Persistent Device Claims for KubeVirt
The project focused on implementing Persistent Device Claims (PDC) within KubeVirt, enabling Kubernetes users to request and utilize specific hardware devices, such as GPUs or NICs, across KubeVirt virtual machines (VMs). This functionality is a significant milestone for integrating Dynamic Resource Allocation (DRA) into KubeVirt, a new alpha API available since Kubernetes 1.26+. DRA provides a more flexible method for requesting resources compared to the traditional device plugin framework.
This project involved creating a proof-of-concept (POC) DRA-based driver for PCI devices. The POC included a fork of KubeVirt where DRA is enabled, allowing users to declare and use ResourceClaims within their VM manifests.
-
DRA-PCI Driver:
- The DRA-PCI driver was developed as part of this project to handle device requests, allocation, and management of PCI devices using DRA.
- This driver ensures that specific hardware devices can be claimed by KubeVirt VMs while maintaining compatibility with the Kubernetes Dynamic Resource Allocation (DRA) API.
- The driver was tested using kubevirtci and emulated NVMe devices.
- The driver consists of two components: the
kubelet-plugin
, which manages the state of devices at the node level, and thedra-controller
, which communicates with the Kubernetes API to make scheduling decisions.
-
KubeVirt Integration:
- The integration with KubeVirt, as demonstrated in KubeVirt PR #12533, allows VMs to request and attach specific hardware devices via ResourceClaims using the DRA-PCI driver.
- This integration also involved designing a feature gate
DynamicResourceAllocation
, as the DRA API and DRA-PCI driver are still evolving.
- The project was managed and hosted under the KubeVirt GitHub repository.
- Weekly meetings were held with mentors from the KubeVirt team to discuss progress, address blockers, and review code.
- Communication was facilitated through Slack and video calls, providing a platform for real-time collaboration and feedback.
- Code reviews were conducted on GitHub, with feedback from multiple maintainers and contributors.
-
Translation of Device Data in Libvirt XML:
- One of the challenges was translating the device data into the correct Libvirt XML format required by KubeVirt. This translation required careful consideration of the device specifications and ensuring that the XML accurately represented the requested resources.
-
Navigating Kubernetes DRA Implementation:
- Understanding and integrating the Dynamic Resource Allocation (DRA) implementation within Kubernetes presented challenges, particularly with respect to aligning it with KubeVirt’s existing infrastructure and ensuring smooth operation.
-
Expanding Device Support:
- Expanding the range of supported hardware devices to include mediated devices, USB devices, and others.
-
Enhancing Security and Access Control:
- Implementing improved communication strategies and access control mechanisms to enhance security in the device claim and allocation process.
-
Device Management in Kubernetes:
- Gained in-depth knowledge of Kubernetes and its device management mechanisms, including the DRA API and device plugin mechanisms.
-
KubeVirt Architecture:
- Developed a comprehensive understanding of KubeVirt’s architecture, virtualization, and distributed systems.
-
Collaboration in Open Source:
- Learned the importance of effective communication and collaboration in open-source projects, particularly within a distributed team.
I would like to express my heartfelt gratitude to:
- My mentors, Alice Frosi (@alicefr) and Victor Toso (@victortoso), for their invaluable time, detailed reviews, and guidance.
- The entire KubeVirt Community for their warm support and assistance.
Documentation can be found in the respective repositories.