Replies: 1 comment 1 reply
-
@Airren Thanks for your contribution! NRI will bring significant functionality and performance enhancements to Katalyst’s ORM framework. I have a small question: similar to the Device Plugin interface, there is a |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In this discussion, we explore the rationale behind utilizing the Node Resource Interface (NRI) on Katalyst, detailing both its significance and implementation strategies. This is a part of ORM #430.
What is NRI
Background
As of now, Kubernetes does not offer a fully comprehensive resource management solution. Many open-source projects in the Kubernetes ecosystem have devised their methods to modify the deployment and management processes of pods, enabling fine-grained resource allocation.
There are various approaches to extending Kubernetes, which we have summarized as follows.
NRI
To address the need for intrusive modifications to Kubernetes and changes to the default process, enabling developers to have a more unified implementation approach, NRI has emerged.
Use NRI In Katalyst
Katalyst QRM mode
Katalyst ORM mode(kubelet listener)
NRI Enhanced ORM(Along with kubelet polling)
Benefits
Features can be done by NRI:
Design Details: NRI Enhanced ORM(Along with kubelet listener)
In this part, the method based on the Kubelet API polling is referred to as Bypass Mode, while another method based on NRI is referred to as NRI Mode.
Addon
The ORM support two operational modes: Bypass or NRI. Only one mode can be active at any given time. When creating a new ORM Manger, the current operational mode can be determined by reading the configuration, and it does not support changing the mode during runtime.
The ORM ManagerImpl functions as an NRI stub, implementing processing logic within the corresponding hook event functions.
In enhancing the ORM implementation, three hook functions are required:
RunPodSandbox()
,CreateContainer()
, andRemovePodSandbox()
.Step 1, during
RunPodSanbox()
, theAdmit()
function is triggered. IfAdmit()
succeeds, resources are allocated for the container, and the pod creation process continues. IfAdmit()
fails, pod creation also fails. Step 2, after a successful
Admit()
, the process proceeds to theCreateContainer()
event. At this point, resources have been allocated for the container byAdmit()
. The corresponding resources are updated in the container's spec and returned. Step 3, During
RemovePodSandbox()
, all resource allocations related to the pod are returned.Modification
If using the NRI Mode, after the allocation of resources is completed in the
Admit()
, theAllocate()
does not need to executesyncContainer()
; it should simply return after the resources have been allocated.In NRI Mode, the executer in
syncContainer()
can be implemented through NRI'supdateContainer()
.The
metaServer
as a member variable of the ORMManagerImpl
because it is used in both Bypass and NRI modes.TBD: During NRI mode, halt the MetaManager's Reconcile.
Opens
Handling failure for Admit():
RunPodSandbox()
returns with an error(how to fix: integrated with scheduling ?)Admit()
failure in Bypass mode. (How to evict the Pod which does not admit?)Timeout:
OnClose()
invokestub.Restart
.Admit()
with a timeout (configured) context .The Containerd version is requited ≥ 1.7.0 and NRI feature enabled.
Co-work with other Plugin(RDT)
Releated Stuff
NRI : https://github.com/containerd/nri
NRI Introduction: https://juejin.cn/post/7221357811288293432
ORM PR: #406 #430
Beta Was this translation helpful? Give feedback.
All reactions