<!DOCTYPE html><htmllang="en"dir="auto"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=no"><metaname="description"content="Quick start Minimal steps to deploy latest released version of NFD in your cluster. Installation Deploy with kustomize – creates a new namespace, s..."><metaname="revised"content=""><metaname="author"content="Kubernetes SIGs"><metaname="generator"content="rundocs/jekyll-rtd-theme v2.0.10"><metaname="theme-color"content="#2980b9"><title>Quick start · Node Feature Discovery</title><metaname="twitter:title"content="Quick start · Node Feature Discovery"><metaname="twitter:description"content="Quick start Minimal steps to deploy latest released version of NFD in your cluster. Installation Deploy with kustomize – creates a new namespace, s..."><metaname="twitter:card"content="summary"><metaname="twitter:site"content="@Kubernetes SIGs"><metaname="twitter:url"content="https://kubernetes-sigs.github.com/node-feature-discovery/v0.11/get-started/quick-start.html"><metaname="twitter:creator"content="@rundocs/jekyll-rtd-theme v2.0.10"><metaproperty="og:title"content="Quick start · Node Feature Discovery"><metaproperty="og:description"content="Quick start Minimal steps to deploy latest released version of NFD in your cluster. Installation Deploy with kustomize – creates a new namespace, s..."><metaproperty="og:locale"content="en"><metaproperty="og:url"content="https://kubernetes-sigs.github.com/node-feature-discovery/v0.11/get-started/quick-start.html"><metaproperty="og:type"content="article"><metaproperty="article:author"content="Kubernetes SIGs"><metaproperty="article:published_time"content="2016-07-23T00:07:52-05:00"><metaproperty="article:modified_time"content="2022-10-31T07:20:02-05:00"><scripttype="application/ld+json">{"@context":"https://schema.org","@type":"Article","mainEntityOfPage":{"@type":"WebPage","@id":"https://kubernetes-sigs.github.com/node-feature-discovery/v0.11/get-started/quick-start.html"},"headline":"Quick start · Node Feature Discovery","image":[],"author":{"@type":"Person","name":"Kubernetes SIGs"},"datePublished":"2016-07-23T00:07:52-05:00","dateModified":"2022-10-31T07:20:02-05:00","publisher":{"@type":"Organization","name":"Kubernetes SIGs","logo":{"@type":"ImageObject","url":"https://avatars.githubusercontent.com/u/36015203?v=4"}},"description":"Quick start Minimal steps to deploy latest released version of NFD in your cluster. Installation Deploy with kustomize – creates a new namespace, s..."}</script><linkrel="dns-prefetch"href="https://cdn.jsdelivr.net"><linkrel="prev"href="https://kubernetes-sigs.github.com/node-feature-discovery/v0.11/get-started/introduction.html"><linkrel="next"href="https://kubernetes-sigs.github.com/node-feature-discovery/v0.11/get-started/deployment-and-usage.html"><linkrel="canonical"href="https://kubernetes-sigs.github.com/node-feature-discovery/v0.11/get-started/quick-start.html"><linkrel="icon"type="image/svg+xml"href="/node-feature-discovery/v0.11/assets/images/favicon.svg"><linkrel="icon"type="image/png"href="/node-feature-discovery/v0.11/assets/images/favicon-16x16.png"sizes="16x16"><linkrel="icon"type="image/png"href="/node-feature-discovery/v0.11/assets/images/favicon-32x32.png"sizes="32x32"><linkrel="icon"type="image/png"href="/node-feature-discovery/v0.11/assets/images/favicon-96x96.png"sizes="96x96"><linkrel="mask-icon"href="/node-feature-discovery/v0.11/assets/images/favicon.svg"color="#2980b9"><linkrel="apple-touch-icon"href="/node-feature-discovery/v0.11/assets/images/apple-touch-icon-300x300.jpg"><linkrel="stylesheet"href="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/css/theme.min.css"><style>@media(min-width:1280px){.content-wrap{max-width:1200px}}</style><script>window.ui={title:"NodeFeatureDiscovery",baseurl:"/node-feature-discovery/v0.11",i18n:{search_results:"SearchRe
</code></pre></div></div><h2id="verify">Verify</h2><p>Wait until NFD master and NFD worker are running.</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">$ </span>kubectl <spanclass="nt">-n</span> node-feature-discovery get ds,deploy
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
</code></pre></div></div><p>Check that NFD feature labels have been created</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">$ </span>kubectl get no <spanclass="nt">-o</span> json | jq .items[].metadata.labels
</code></pre></div></div><h2id="use-node-labels">Use node labels</h2><p>Create a pod targeting a distinguishing feature (select a valid feature from the list printed on the previous step)</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">$ </span><spanclass="nb">cat</span><spanclass="o"><<</span><spanclass="no">EOF</span><spanclass="sh"> | kubectl apply -f -
</code></pre></div></div><p>See that the pod is running on a desired node</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">$ </span>kubectl get po feature-dependent-pod <spanclass="nt">-o</span> wide
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
</code></pre></div></div><h2id="additional-optional-installation-steps">Additional Optional Installation Steps</h2><p>In order to deploy nfd-master and nfd-topology-updater daemons use <codeclass="language-plaintext highlighter-rouge notranslate">topologyupdater</code> overlay.</p><p>Deploy with kustomize – creates a new namespace, service and required RBAC rules and nfd-master and nfd-topology-updater daemons.</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>kubectl apply <spanclass="nt">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref<spanclass="o">=</span>v0.11.2
</code></pre></div></div><p><strong>NOTE:</strong></p><p><ahref="https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins/#monitoring-device-plugin-resources">PodResource API</a> is a prerequisite for nfd-topology-updater.</p><p>Preceding Kubernetes v1.23, the <codeclass="language-plaintext highlighter-rouge notranslate">kubelet</code> must be started with the following flag:</p><p><codeclass="language-plaintext highlighter-rouge notranslate">--feature-gates=KubeletPodResourcesGetAllocatable=true</code></p><p>Starting Kubernetes v1.23, the <codeclass="language-plaintext highlighter-rouge notranslate">GetAllocatableResources</code> is enabled by default through <codeclass="language-plaintext highlighter-rouge notranslate">KubeletPodResourcesGetAllocatable</code><ahref="https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates">feature gate</a>.</p><h2id="verify-1">Verify</h2><p>Wait until NFD master and NFD topologyupdater are running.</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">$ </span>kubectl <spanclass="nt">-n</span> node-feature-discovery get ds,deploy
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
</code></pre></div></div><p>Check that the NodeResourceTopology CR instances are created</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">$ </span>kubectl get noderesourcetopologies.topology.node.k8s.io
NAME AGE
kind-control-plane 23s
kind-worker 23s
</code></pre></div></div><h2id="show-the-cr-instances">Show the CR instances</h2><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">$ </span>kubectl describe noderesourcetopologies.topology.node.k8s.io kind-control-plane
</code></pre></div></div><p>The CR instances created can be used to gain insight into the allocatable resources along with the granularity of those resources at a per-zone level (represented by node-0 and node-1 in the above example) or can be used by an external entity (e.g. topology-aware scheduler plugin) to take an action based on the gathered information.</p><!-- Links --></div></div><divclass="navigation-bottom d-flex flex-justify-between py-3"role="navigation"aria-label="footer navigation"><divclass="prev"><ahref="/node-feature-discovery/v0.11/get-started/introduction.html"class="btn"title="Introduction"accesskey="p"rel="prev"><iclass="fa fa-arrow-circle-left"></i> Previous </a></div><divclass="next"><ahref="/node-feature-discovery/v0.11/get-started/deployment-and-usage.html"class="btn"title="Deployment and usage"accesskey="n"rel="next"> Next <iclass="fa fa-arrow-circle-right"></i></a></div></div><hr><divclass="copyright text-center text-gray"role="contentinfo"><iclass="fa fa-copyright"></i><spanclass="time">2016-2022,</span><aclass="text-gray"href="https://github.com/kubernetes-sigs"rel="noreferrer"target="_blank">Kubernetes SIGs</a> Revision <aclass="text-gray"href="https://github.com/kubernetes-sigs/node-feature-discovery/commit/"title=""rel="noreferrer"target="_blank"></a><br><divclass="generator"> Built with <ahref="https://pages.github.com"rel="noreferrer"target="_blank"title="github-pages v209">GitHub Pages</a> using a <ahref="https://github.com/rundocs/jekyll-rtd-theme"rel="noreferrer"target="_blank"title="rundocs/jekyll-rtd-theme v2.0.10">theme</a> provided by <ahref="https://rundocs.io"rel="noreferrer"target="_blank">RunDocs</a>. </div></div></div></div><divclass="addons-wrap d-flex flex-column overflow-y-auto"><divclass="status d-flex flex-justify-between p-2"><divclass="title p-1"><iclass="fa fa-book"></i> Node Feature Discovery </div><divclass="branch p-1"><spanclass="name"> v0.11 </span><iclass="fa fa-caret-down"></i></div></div><divclass="addons d-flex flex-column height-full p-2 d-none"><dlid="versions"><dt>Versions</dt><scriptsrc="/node-feature-discovery/versions.js"></script><script>vardt=document.getElementById('versions');varitems=getVersionListItems();for(vari=0;i<items.length;i++){vardd=document.createElement('dd');vara=dd.appendChild(document.createElement('a'));a.appendChild(document.createTextNode(items[i].name));a.href=items[i].url;dt.appendChild(dd);}</script></dl><dl><dt>GitHub</dt><dd><ahref="https://github.com/kubernetes-sigs/node-feature-discovery"title="Stars: 496"><iclass="fa fa-github"></i> Homepage </a></dd><dd><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/issues"title="Open issues: 40"><iclass="fa fa-question-circle-o"></i> Issues </a></dd><dd><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/zipball/gh-pages"title="Size: 84471 Kb"><iclass="fa fa-download"></i> Download </a></dd></dl><hr><divclass="license f6 pb-2"> This <ahref="/node-feature-discovery/v0.11/"title="Node Feature Discovery">Software</a> is under the terms of <ahref="https://github.com/kubernetes-sigs/node-feature-discovery">Apache License 2.0</a>. </div></div></div><scriptsrc="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/js/jquery.min.js"></script><scriptsrc="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/js/theme.min.js"></script></body></html>