</code></pre></div></div><p>This will required RBAC rules and deploy nfd-master (as a deployment) and nfd-worker (as daemonset) in the <codeclass="language-plaintext highlighter-rouge notranslate">node-feature-discovery</code> namespace.</p><blockquote><p><strong>NOTE:</strong> nfd-topology-updater is not deployed as part of the <codeclass="language-plaintext highlighter-rouge notranslate">default</code> overlay. Refer to the <ahref="#master-worker-topologyupdater">Master Worker Topologyupdater</a> and <ahref="#topologyupdater">Topologyupdater</a> below.</p></blockquote><p>Alternatively you can clone the repository and customize the deployment by creating your own overlays. See <ahref="https://github.com/kubernetes-sigs/kustomize">kustomize</a> for more information about managing deployment configurations.</p><h2id="overlays">Overlays</h2><p>The NFD repository hosts a set of overlays for different usages and deployment scenarios under <ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays"><codeclass="language-plaintext highlighter-rouge notranslate">deployment/overlays</code></a></p><ul><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/default"><codeclass="language-plaintext highlighter-rouge notranslate">default</code></a>: default deployment of nfd-worker as a daemonset, described above</li><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/default-job"><codeclass="language-plaintext highlighter-rouge notranslate">default-job</code></a>: see <ahref="#worker-one-shot">Worker one-shot</a> below</li><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/master-worker-topologyupdater"><codeclass="language-plaintext highlighter-rouge notranslate">master-worker-topologyupdater</code></a>: see <ahref="#master-worker-topologyupdater">Master Worker Topologyupdater</a> below</li><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/topologyupdater"><codeclass="language-plaintext highlighter-rouge notranslate">topologyupdater</code></a>: see <ahref="#topologyupdater">Topology Updater</a> below</li><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/prometheus"><codeclass="language-plaintext highlighter-rouge notranslate">prometheus</code></a>: see <ahref="#metrics">Metrics</a> below</li><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/prune"><codeclass="language-plaintext highlighter-rouge notranslate">prune</code></a>: clean up the cluster after uninstallation, see <ahref="/node-feature-discovery/master/deployment/uninstallation.html#removing-feature-labels">Removing feature labels</a></li><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/samples/custom-rules"><codeclass="language-plaintext highlighter-rouge notranslate">samples/custom-rules</code></a>: an example for spicing up the default deployment with a separately managed configmap of custom labeling rules, see <ahref="/node-feature-discovery/master/usage/features.html#custom">Custom feature source</a> for more information about custom node labels</li></ul><h3id="worker-one-shot">Worker one-shot</h3><p>Feature discovery can alternatively be configured as a one-shot job. The <codeclass="language-plaintext highlighter-rouge notranslate">default-job</code> overlay may be used to achieve this:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">NUM_NODES</span><spanclass="o">=</span><spanclass="si">$(</span>kubectl get no <spanclass="nt">-o</span><spanclass="nv">jsonpath</span><spanclass="o">=</span><spanclass="s1">'{.items[*].metadata.name}'</span> | <spanclass="nb">wc</span><spanclass="nt">-w</span><spanclass="si">)</span>
</code></pre></div></div><p>The example above launches as many jobs as there are non-master nodes. Note that this approach does not guarantee running once on every node. For example, tainted, non-ready nodes or some other reasons in Job scheduling may cause some node(s) will run extra job instance(s) to satisfy the request.</p><h3id="master-worker-topologyupdater">Master Worker Topologyupdater</h3><p>NFD-Master, nfd-worker and nfd-topology-updater can be configured to be deployed as separate pods. The <codeclass="language-plaintext highlighter-rouge notranslate">master-worker-topologyupdater</code> overlay may be used to achieve this:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>kubectl apply <spanclass="nt">-k</span><spanclass="s2">"https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/master-worker-topologyupdater?ref=master"</span>
</code></pre></div></div><h3id="topologyupdater">Topologyupdater</h3><p>To deploy just nfd-topology-updater (without nfd-master and nfd-worker) use the <codeclass="language-plaintext highlighter-rouge notranslate">topologyupdater</code> overlay:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>kubectl apply <spanclass="nt">-k</span><spanclass="s2">"https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=master"</span>
</code></pre></div></div><p>NFD-Topology-Updater can be configured along with the <codeclass="language-plaintext highlighter-rouge notranslate">default</code> overlay (which deploys nfd-worker and nfd-master) where all the software components are deployed as separate pods;</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>
</code></pre></div></div><h3id="metrics">Metrics</h3><p>To allow <ahref="https://github.com/prometheus-operator/prometheus-operator">prometheus operator</a> to scrape metrics from node-feature-discovery, run the following command:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>kubectl apply <spanclass="nt">-k</span><spanclass="s2">"https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=master"</span>
</code></pre></div></div><h2id="uninstallation">Uninstallation</h2><p>Simplest way is to invoke <codeclass="language-plaintext highlighter-rouge notranslate">kubectl delete</code> on the overlay that was used for deployment. Beware that this will also delete the namespace that NFD is running in. For example, in case the default overlay from the repo was used:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>kubectl delete <spanclass="nt">-k</span> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref<spanclass="o">=</span>master
</code></pre></div></div><p>Alternatively you can delete create objects one-by-one, depending on the type of deployment, for example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code><spanclass="nv">NFD_NS</span><spanclass="o">=</span>node-feature-discovery