Dynamic resource allocation

동적 자원 할당

Match a pod request to a suitable device through resource claims.

···
html
<div class="stage" data-phase="0"><div class="title">RESOURCE CLAIM · GPU ≥ 16 GB</div><div class="row devices"><div class="panel gpu">GPU A<br>8 GB</div><div class="panel gpu match">GPU B<br>24 GB</div><div class="panel gpu">GPU C<br>12 GB</div></div><div class="request panel">training pod → claim</div><div class="sub">scheduler binds the matching device</div></div>
css
.stage{width:min(94vw,760px);height:min(88vh,330px);padding:clamp(9px,2.6vmin,20px);border:1px solid var(--line);border-radius:14px;background:var(--surface);font:600 clamp(12px,2.5vmin,16px)/1.3 "Pretendard Variable",Pretendard,-apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif;display:flex;flex-direction:column;gap:clamp(6px,1.7vmin,12px);overflow:hidden;position:relative}.stage *{min-width:0}.stage .title{color:var(--accent);font-weight:800}.stage .sub{color:var(--muted)}.stage .row{display:flex;align-items:center;gap:clamp(5px,1.6vmin,12px)}.stage .panel{border:1px solid var(--line);border-radius:8px;background:var(--bg);padding:clamp(6px,1.6vmin,12px)}.stage .mono{font-family:ui-monospace,SFMono-Regular,monospace;font-size:clamp(12px,2.5vmin,15px)}.stage .grow{flex:1}.stage .on{color:var(--accent)}.devices{flex:1;justify-content:space-around}.gpu{width:29%;display:grid;place-items:center;text-align:center;color:var(--muted);transition:color .3s,transform .3s}.request{text-align:center;border-color:var(--accent)!important}.stage[data-phase="1"] .match{color:var(--fg);border-color:var(--accent);transform:translateY(7px)}.stage[data-phase="2"] .match{color:var(--fg);background:color-mix(in srgb,var(--accent) 22%,var(--surface));border-color:var(--accent)}.stage[data-phase="2"] .request:after{content:' · bound to GPU B';color:var(--accent)}
js
const stage=document.querySelector('.stage');let phase=0;function advance(){phase=(phase+1)%3;stage.dataset.phase=String(phase)}const timer=setInterval(advance,1200);stage.addEventListener('pointerdown',()=>{clearInterval(timer);advance()})

Kubernetes DRA lets workloads request devices such as GPUs using attributes and capacity conditions, with resource claims connecting selection and allocation.

The demo compares a workload requirement with device slots and assigns the matching slot. DRA features have different maturity levels in Kubernetes 1.36, so check the status of each feature you use.

When to use

Use it in clusters that need conditional selection or sharing of specialized devices.

Open as page ↗