1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00
node-feature-discovery/master/usage/nfd-master.html
Github Actions 8090bc8f93 Update documentation for master
Auto-generated from v0.16.0-devel-140-gaf8a41cc by 'update-gh-pages.sh'
2024-04-05 10:04:58 +00:00

2 lines
No EOL
21 KiB
HTML

<!DOCTYPE html> <html lang="en" dir="auto"> <head><meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=no"> <meta name="description" content="NFD-Master NFD-Master is responsible for connecting to the Kubernetes API server and updating node objects. More specifically, it modifies node lab..."> <meta name="revised" content=""> <meta name="author" content="Kubernetes SIGs"> <meta name="generator" content="rundocs/jekyll-rtd-theme v2.0.10"><meta name="theme-color" content="#2980b9"> <title>NFD-Master · Node Feature Discovery</title> <meta name="twitter:title" content="NFD-Master · Node Feature Discovery"> <meta name="twitter:description" content="NFD-Master NFD-Master is responsible for connecting to the Kubernetes API server and updating node objects. More specifically, it modifies node lab..."> <meta name="twitter:card" content="summary"> <meta name="twitter:site" content="@Kubernetes SIGs"> <meta name="twitter:url" content="https://kubernetes-sigs.github.com/node-feature-discovery/master/usage/nfd-master.html"> <meta name="twitter:creator" content="@rundocs/jekyll-rtd-theme v2.0.10"> <meta property="og:title" content="NFD-Master · Node Feature Discovery"> <meta property="og:description" content="NFD-Master NFD-Master is responsible for connecting to the Kubernetes API server and updating node objects. More specifically, it modifies node lab..."> <meta property="og:locale" content="en"> <meta property="og:url" content="https://kubernetes-sigs.github.com/node-feature-discovery/master/usage/nfd-master.html"> <meta property="og:type" content="article"> <meta property="article:author" content="Kubernetes SIGs"> <meta property="article:published_time" content="2016-07-23T05:07:52+00:00"> <meta property="article:modified_time" content="2024-04-05T10:04:48+00:00"> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://kubernetes-sigs.github.com/node-feature-discovery/master/usage/nfd-master.html" }, "headline": "NFD-Master · Node Feature Discovery", "image": [], "author": { "@type": "Person", "name": "Kubernetes SIGs" }, "datePublished": "2016-07-23T05:07:52+00:00", "dateModified": "2024-04-05T10:04:48+00:00", "publisher": { "@type": "Organization", "name": "Kubernetes SIGs", "logo": { "@type": "ImageObject", "url": "https://avatars.githubusercontent.com/u/36015203?v=4" } }, "description": "NFD-Master NFD-Master is responsible for connecting to the Kubernetes API server and updating node objects. More specifically, it modifies node lab..." } </script> <link rel="dns-prefetch" href="https://cdn.jsdelivr.net"><link rel="prev" href="https://kubernetes-sigs.github.com/node-feature-discovery/master/usage/using-labels.html"><link rel="next" href="https://kubernetes-sigs.github.com/node-feature-discovery/master/usage/nfd-worker.html"><link rel="canonical" href="https://kubernetes-sigs.github.com/node-feature-discovery/master/usage/nfd-master.html"><link rel="icon" type="image/svg+xml" href="/node-feature-discovery/master/assets/images/favicon.svg"><link rel="icon" type="image/png" href="/node-feature-discovery/master/assets/images/favicon-16x16.png" sizes="16x16"> <link rel="icon" type="image/png" href="/node-feature-discovery/master/assets/images/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="/node-feature-discovery/master/assets/images/favicon-96x96.png" sizes="96x96"><link rel="mask-icon" href="/node-feature-discovery/master/assets/images/favicon.svg" color="#2980b9"><link rel="apple-touch-icon" href="/node-feature-discovery/master/assets/images/apple-touch-icon-300x300.jpg"> <link rel="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: "Node Feature Discovery", baseurl: "/node-feature-discovery/master", i18n: { search_results: "Search Results", search_results_found: "Search finished, found # page(s) matching the search query.", search_results_not_found: "Your search did not match any documents, please make sure that all characters are spelled correctly!" } }; </script> </head> <body class="container"><div class="sidebar-wrap overflow-hidden"> <div class="sidebar height-full overflow-y-scroll overflow-x-hidden"> <div class="header d-flex flex-column p-3 text-center"> <div class="title pb-1"> <a class="h4 no-underline py-1 px-2 rounded-1" href="/node-feature-discovery/master/" title="Documentation of Node Feature Discovery - a Kubernetes add-on for discovering and advertising hardware features and system configuration in the cluster."> <i class="fa fa-home"></i> Node Feature Discovery </a> </div> <span class="version">master</span> <form class="search pt-2" action="/node-feature-discovery/master/search.html" method="get" autocomplete="off"> <input class="form-control input-block input-sm" type="text" name="q" placeholder="Search docs..."> </form> </div> <div class="toctree py-2" data-spy="affix" role="navigation" aria-label="main navigation"> <ul> </ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/master/get-started/"> Get started </a><ul> <li class="toc level-1 " data-sort="1" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/get-started/introduction.html">1. Introduction</a> </li> <li class="toc level-1 " data-sort="2" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/get-started/quick-start.html">2. Quick start</a> </li></ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/master/deployment/"> Deployment </a><ul> <li class="toc level-1 " data-sort="1" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/deployment/image-variants.html">1. Image variants</a> </li> <li class="toc level-1 " data-sort="2" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/deployment/kustomize.html">2. Kustomize</a> </li> <li class="toc level-1 " data-sort="3" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/deployment/helm.html">3. Helm</a> </li> <li class="toc level-1 " data-sort="4" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/deployment/operator.html">4. NFD Operator</a> </li> <li class="toc level-1 " data-sort="5" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/deployment/tls.html">5. TLS authentication</a> </li> <li class="toc level-1 " data-sort="6" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/deployment/uninstallation.html">6. Uninstallation</a> </li> <li class="toc level-1 " data-sort="7" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/deployment/metrics.html">7. Metrics</a> </li></ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/master/usage/"> Usage </a><ul> <li class="toc level-1 " data-sort="1" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/features.html">1. Feature labels</a> </li> <li class="toc level-1 " data-sort="2" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/using-labels.html">2. Using node labels</a> </li> <li class="toc level-1 current" data-sort="3" data-level="1"> <a class="d-flex flex-items-baseline current" href="/node-feature-discovery/master/usage/nfd-master.html">3. NFD-Master</a> </li> <li class="toc level-1 " data-sort="4" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/nfd-worker.html">4. NFD-Worker</a> </li> <li class="toc level-1 " data-sort="5" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/nfd-topology-updater.html">5. NFD-Topology-Updater</a> </li> <li class="toc level-1 " data-sort="6" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/nfd-gc.html">6. NFD-Garbage-Collector</a> </li> <li class="toc level-1 " data-sort="7" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/custom-resources.html">7. CRDs</a> </li> <li class="toc level-1 " data-sort="8" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/customization-guide.html">8. Customization guide</a> </li> <li class="toc level-1 " data-sort="9" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/examples-and-demos.html">9. Examples and demos</a> </li> <li class="toc level-1 " data-sort="10" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/usage/kubectl-plugin.html">10. Kubectl plugin</a> </li></ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/master/reference/"> Reference </a><ul> <li class="toc level-1 " data-sort="1" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/master-commandline-reference.html">1. Master cmdline reference</a> </li> <li class="toc level-1 " data-sort="2" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/worker-commandline-reference.html">2. Worker cmdline reference</a> </li> <li class="toc level-1 " data-sort="3" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/master-configuration-reference.html">3. Master config reference</a> </li> <li class="toc level-1 " data-sort="4" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/worker-configuration-reference.html">4. Worker config reference</a> </li> <li class="toc level-1 " data-sort="5" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/topology-updater-commandline-reference.html">5. Topology Updater Cmdline Reference</a> </li> <li class="toc level-1 " data-sort="6" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/topology-updater-configuration-reference.html">6. Topology-Updater config reference</a> </li> <li class="toc level-1 " data-sort="7" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/gc-commandline-reference.html">7. Garbage Collector Cmdline Reference</a> </li> <li class="toc level-1 " data-sort="8" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/plugin-commandline-reference.html">8. Kubectl plugin cmdline reference</a> </li> <li class="toc level-1 " data-sort="9" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/versions.html">9. Versions</a> </li> <li class="toc level-1 " data-sort="10" data-level="1"> <a class="d-flex flex-items-baseline " href="/node-feature-discovery/master/reference/feature-gates.html">10. Feature Gates</a> </li></ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/master/developer-guide/"> Developer guide </a><ul> </ul> <a class="caption d-block text-uppercase no-wrap px-2 py-0" href="/node-feature-discovery/master/contributing/"> Contributing </a><ul> </ul> </div> </div> </div> <div class="content-wrap"> <div class="header d-flex flex-justify-between p-2 hide-lg hide-xl" aria-label="top navigation"> <button id="toggle" aria-label="Toggle menu" class="btn-octicon p-2 m-0 text-white" type="button"> <i class="fa fa-bars"></i> </button> <div class="title flex-1 d-flex flex-justify-center"> <a class="h4 no-underline py-1 px-2 rounded-1" href="/node-feature-discovery/master/">Node Feature Discovery</a> </div> </div> <div class="content p-3 p-sm-5"> <div class="navigation-top d-flex flex-justify-between"> <ul class="breadcrumb" role="navigation" aria-label="breadcrumbs navigation"> <li class="breadcrumb-item"> <a class="no-underline" href="/node-feature-discovery/master/" title="/"> <i class="fa fa-home"></i> </a> </li><li class="breadcrumb-item" ><a href="/node-feature-discovery/master/usage/">usage</a></li><li class="breadcrumb-item" aria-current="page">nfd-master.md</li></ul> <a class="edit" href="https://github.com/kubernetes-sigs/node-feature-discovery/edit/gh-pages/usage/nfd-master.md" title="Edit on GitHub" rel="noreferrer" target="_blank"> <i class="fa fa-edit"></i> </a> </div> <hr> <div role="main" itemscope="itemscope" itemtype="https://schema.org/Article"> <div class="markdown-body" itemprop="articleBody"> <h1 class="no_toc" id="nfd-master">NFD-Master</h1> <hr /> <p>NFD-Master is responsible for connecting to the Kubernetes API server and updating node objects. More specifically, it modifies node labels, taints and extended resources based on requests from nfd-workers and 3rd party extensions.</p> <h2 id="nodefeature-controller">NodeFeature controller</h2> <p>The NodeFeature Controller uses NodeFeature objects as the input for the <a href="/node-feature-discovery/master/usage/custom-resources.html#nodefeaturerule">NodeFeatureRule</a> processing pipeline. In addition, any labels listed in the NodeFeature object are created on the node (note the allowed <a href="/node-feature-discovery/master/usage/customization-guide.html#node-labels">label namespaces</a> are controlled).</p> <h2 id="nodefeaturerule-controller">NodeFeatureRule controller</h2> <p>NFD-Master acts as the controller for <a href="/node-feature-discovery/master/usage/custom-resources.html#nodefeaturerule">NodeFeatureRule</a> objects. It applies the rules specified in NodeFeatureRule objects on raw feature data and creates node labels accordingly. The feature data used as the input is received from nfd-worker instances through <a href="/node-feature-discovery/master/usage/custom-resources.html#nodefeature-custom-resource">NodeFeature</a> objects.</p> <blockquote> <p><strong>NOTE</strong>: when gRPC (<strong>DEPRECATED</strong>) is used for communicating the features (by setting the flag <code class="language-plaintext highlighter-rouge notranslate">-feature-gates NodeFeatureAPI=false</code> on both nfd-master and nfd-worker, or via Helm values.featureGates.NodeFeatureAPI=false), (re-)labelling only happens when a request is received from nfd-worker. That is, in practice rules are evaluated and labels for each node are created on intervals specified by the <a href="/node-feature-discovery/master/reference/worker-configuration-reference.html#coresleepinterval"><code class="language-plaintext highlighter-rouge notranslate">core.sleepInterval</code></a> configuration option of nfd-worker instances. This means that modification or creation of NodeFeatureRule objects does not instantly cause the node labels to be updated. Instead, the changes only come visible in node labels as nfd-worker instances send their labelling requests. This limitation is not present when gRPC interface is disabled and <a href="/node-feature-discovery/master/usage/custom-resources.html#nodefeature-custom-resource">NodeFeature</a> API is used.</p> </blockquote> <h2 id="master-configuration">Master configuration</h2> <p>NFD-Master supports dynamic configuration through a configuration file. The default location is <code class="language-plaintext highlighter-rouge notranslate">/etc/kubernetes/node-feature-discovery/nfd-master.conf</code>, but, this can be changed by specifying the<code class="language-plaintext highlighter-rouge notranslate">-config</code> command line flag. Configuration file is re-read whenever it is modified which makes run-time re-configuration of nfd-master straightforward.</p> <p>Master configuration file is read inside the container, and thus, Volumes and VolumeMounts are needed to make your configuration available for NFD. The preferred method is to use a ConfigMap which provides easy deployment and re-configurability.</p> <p>The provided nfd-master deployment templates create an empty configmap and mount it inside the nfd-master containers. In kustomize deployments, configuration can be edited with:</p> <div class="language-bash highlighter-rouge notranslate"><div class="highlight"><pre class="highlight"><code>kubectl <span class="nt">-n</span> <span class="k">${</span><span class="nv">NFD_NS</span><span class="k">}</span> edit configmap nfd-master-conf
</code></pre> </div></div> <p>In Helm deployments, <a href="/node-feature-discovery/master/deployment/helm.html#master-pod-parameters">Master pod parameter</a> <code class="language-plaintext highlighter-rouge notranslate">master.config</code> can be used to edit the respective configuration.</p> <p>See <a href="/node-feature-discovery/master/reference/master-configuration-reference.html">nfd-master configuration file reference</a> for more details. The (empty-by-default) <a href="https://github.com/kubernetes-sigs/node-feature-discovery/blob/master/deployment/components/master-config/nfd-master.conf.example">example config</a> contains all available configuration options and can be used as a reference for creating a configuration.</p> <h2 id="deployment-notes">Deployment notes</h2> <p>NFD-Master runs as a deployment, by default it prefers running on the cluster's master nodes but will run on worker nodes if no master nodes are found.</p> <p>For High Availability, you should increase the replica count of the deployment object. You should also look into adding <a href="https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity">inter-pod</a> affinity to prevent masters from running on the same node. However note that inter-pod affinity is costly and is not recommended in bigger clusters.</p> <blockquote> <p><strong>Note:</strong> When NFD-Master is intended to run with more than one replica, it is advised to use <code class="language-plaintext highlighter-rouge notranslate">-enable-leader-election</code> flag. This flag turns on leader election for NFD-Master and let only one replica to act on changes in NodeFeature and NodeFeatureRule objects.</p> </blockquote> <p>If you have RBAC authorization enabled (as is the default e.g. with clusters initialized with kubeadm) you need to configure the appropriate ClusterRoles, ClusterRoleBindings and a ServiceAccount for NFD to create node labels. The provided template will configure these for you.</p> </div> </div> <div class="navigation-bottom d-flex flex-justify-between py-3" role="navigation" aria-label="footer navigation"> <div class="prev"><a href="/node-feature-discovery/master/usage/using-labels.html" class="btn" title="Using node labels" accesskey="p" rel="prev"> <i class="fa fa-arrow-circle-left"></i> Previous </a></div> <div class="next"><a href="/node-feature-discovery/master/usage/nfd-worker.html" class="btn" title="NFD-Worker" accesskey="n" rel="next"> Next <i class="fa fa-arrow-circle-right"></i> </a></div> </div><hr> <div class="copyright text-center text-gray" role="contentinfo"> <i class="fa fa-copyright"></i> <span class="time">2016-2024,</span> <a class="text-gray" href="https://github.com/kubernetes-sigs" rel="noreferrer" target="_blank">Kubernetes SIGs</a> Revision <a class="text-gray" href="https://github.com/kubernetes-sigs/node-feature-discovery/commit/" title="" rel="noreferrer" target="_blank"></a> <br> <div class="generator"> Built with <a href="https://pages.github.com" rel="noreferrer" target="_blank" title="github-pages v228">GitHub Pages</a> using a <a href="https://github.com/rundocs/jekyll-rtd-theme" rel="noreferrer" target="_blank" title="rundocs/jekyll-rtd-theme v2.0.10">theme</a> provided by <a href="https://rundocs.io" rel="noreferrer" target="_blank">RunDocs</a>. </div> </div> </div> </div> <div class="addons-wrap d-flex flex-column overflow-y-auto"> <div class="status d-flex flex-justify-between p-2"> <div class="title p-1"> <i class="fa fa-book"></i> Node Feature Discovery </div> <div class="branch p-1"> <span class="name"> master </span> <i class="fa fa-caret-down"></i> </div> </div> <div class="addons d-flex flex-column height-full p-2 d-none"> <dl id="versions"> <dt>Versions</dt> <script src="/node-feature-discovery/versions.js"></script> <script> var dt = document.getElementById('versions'); var items = getVersionListItems(); for (var i=0; i < items.length; i++) { var dd = document.createElement('dd'); var a = 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> <a href="https://github.com/kubernetes-sigs/node-feature-discovery" title="Stars: 679"> <i class="fa fa-github"></i> Homepage </a> </dd> <dd> <a href="https://github.com/kubernetes-sigs/node-feature-discovery/issues" title="Open issues: 33"> <i class="fa fa-question-circle-o"></i> Issues </a> </dd> <dd> <a href="https://github.com/kubernetes-sigs/node-feature-discovery/zipball/gh-pages" title="Size: 100427 Kb"> <i class="fa fa-download"></i> Download </a> </dd> </dl> <hr> <div class="license f6 pb-2"> This <a href="/node-feature-discovery/master/" title="Node Feature Discovery">Software</a> is under the terms of <a href="https://github.com/kubernetes-sigs/node-feature-discovery">Apache License 2.0</a>. </div> </div> </div> <script src="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/js/jquery.min.js"></script><script src="https://cdn.jsdelivr.net/gh/rundocs/jekyll-rtd-theme@2.0.10/assets/js/theme.min.js"></script> </body> </html>