</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><p><strong>NOTE:</strong> nfd-topology-updater is not deployed as part of the <codeclass="language-plaintext highlighter-rouge notranslate">default</code> overlay. Please refer to the <ahref="#master-worker-topologyupdater">Master Worker Topologyupdater</a> and <ahref="#topologyupdater">Topologyupdater</a> below.</p><p>Alternatively you can clone the repository and customize the deployment by creating your own overlays. For example, to deploy the <ahref="image-variants#minimal">minimal</a> image. 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-combined"><codeclass="language-plaintext highlighter-rouge notranslate">default-combined</code></a> see <ahref="#master-worker-pod">Master-worker pod</a> below</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/prune"><codeclass="language-plaintext highlighter-rouge notranslate">prune</code></a>: clean up the cluster after uninstallation, see <ahref="uninstallation#removing-feature-labels">Removing feature labels</a></li><li><ahref="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/overlays/samples/cert-manager"><codeclass="language-plaintext highlighter-rouge notranslate">samples/cert-manager</code></a>: an example for supplementing the default deployment with cert-manager for TLS authentication, see <ahref="tls">Automated TLS certificate management using cert-manager</a> for details</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="../usage/features#custom">Custom feature source</a> for more information about custom node labels</li></ul><h3id="master-worker-pod">Master-worker pod</h3><p>You can also run nfd-master and nfd-worker inside the same pod</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>kubectl apply <spanclass="nt">-k</span> http
</code></pre></div></div><p>This creates a DaemonSet that runs nfd-worker and nfd-master in the same Pod. In this case no nfd-master is run on the master node(s), but, the worker nodes are able to label themselves which may be desirable e.g. in single-node setups.</p><p><strong>NOTE:</strong> nfd-topology-updater is not deployed by the default-combined overlay. To enable nfd-topology-updater in this scenario,the users must customize the deployment themselves.</p><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 Topologyupdater 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> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/master-worker-topologyupdater?ref<spanclass="o">=</span>master
</code></pre></div></div><h3id="topologyupdater">Topologyupdater</h3><p>In order to deploy just NFD master and NFD Topologyupdater (without 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> https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref<spanclass="o">=</span>master
</code></pre></div></div><p>NFD Topologyupdater 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. The <codeclass="language-plaintext highlighter-rouge notranslate">topologyupdater</code> overlay may be used along with <codeclass="language-plaintext highlighter-rouge notranslate">default</code> overlay to achieve this:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>
</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