</code></pre></div></div><h3id="-h--help">-h, -help</h3><p>Print usage and exit.</p><h3id="-version">-version</h3><p>Print version and exit.</p><h3id="-feature-gates">-feature-gates</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-feature-gates</code> flag is used to enable or disable non GA features. The list of available feature gates can be found in the <ahref="/node-feature-discovery/master/reference/feature-gates.html">feature gates documentation</a>.</p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-feature-gates</span><spanclass="nv">NodeFeatureGroupAPI</span><spanclass="o">=</span><spanclass="nb">true</span>
</code></pre></div></div><h3id="-prune">-prune</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-prune</code> flag is a sub-command like option for cleaning up the cluster. It causes nfd-master to remove all NFD related labels, annotations and extended resources from all Node objects of the cluster and exit.</p><h3id="-metrics">-metrics</h3><p><strong>DEPRECATED</strong>: Will be removed in NFD v0.17 and replaced by <codeclass="language-plaintext highlighter-rouge notranslate">-port</code>.</p><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-metrics</code> flag specifies the port on which to expose <ahref="https://prometheus.io/">Prometheus</a> metrics. Setting this to 0 disables the metrics server on nfd-master.</p><p>Default: 8081</p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-metrics</span><spanclass="o">=</span>12345
</code></pre></div></div><h3id="-instance">-instance</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-instance</code> flag makes it possible to run multiple NFD deployments in parallel. In practice, it separates the node annotations between deployments so that each of them can store metadata independently. The instance name must start and end with an alphanumeric character and may only contain alphanumeric characters, <codeclass="language-plaintext highlighter-rouge notranslate">-</code>, <codeclass="language-plaintext highlighter-rouge notranslate">_</code> or <codeclass="language-plaintext highlighter-rouge notranslate">.</code>.</p><p>Default: <em>empty</em></p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-instance</span><spanclass="o">=</span>network
</code></pre></div></div><h3id="-enable-leader-election">-enable-leader-election</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-enable-leader-election</code> flag enables leader election for NFD-Master. It is advised to turn on this flag when running more than one instance of NFD-Master.</p><p>Default: false</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-enable-leader-election</span>
</code></pre></div></div><h3id="-no-publish">-no-publish</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-no-publish</code> flag disables updates to the Node objects in the Kubernetes API server, making a "dry-run" flag for nfd-master. No Labels, Annotations or ExtendedResources of nodes are updated.</p><p>Default: <em>false</em></p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-no-publish</span>
</code></pre></div></div><h3id="-label-whitelist">-label-whitelist</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-label-whitelist</code> specifies a regular expression for filtering feature labels based on their name. Each label must match against the given regular expression or it will not be published.</p><blockquote><p><strong>NOTE:</strong> The regular expression is only matches against the "basename" part of the label, i.e. to the part of the name after ‘/'. The label namespace is omitted.</p></blockquote><p>Default: <em>empty</em></p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-label-whitelist</span><spanclass="o">=</span><spanclass="s1">'.*cpuid\.'</span>
</code></pre></div></div><h3id="-extra-label-ns">-extra-label-ns</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-extra-label-ns</code> flag specifies a comma-separated list of allowed feature label namespaces. This option can be used to allow other vendor or application specific namespaces for custom labels from the local and custom feature sources, even though these labels were denied using the <codeclass="language-plaintext highlighter-rouge notranslate">deny-label-ns</code> flag.</p><p>Default: <em>empty</em></p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-extra-label-ns</span><spanclass="o">=</span>vendor-1.com,vendor-2.io
</code></pre></div></div><h3id="-deny-label-ns">-deny-label-ns</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-deny-label-ns</code> flag specifies a comma-separated list of excluded label namespaces. By default, nfd-master allows creating labels in all namespaces, excluding <codeclass="language-plaintext highlighter-rouge notranslate">kubernetes.io</code> namespace and its sub-namespaces (i.e. <codeclass="language-plaintext highlighter-rouge notranslate">*.kubernetes.io</code>). However, you should note that <codeclass="language-plaintext highlighter-rouge notranslate">kubernetes.io</code> and its sub-namespaces are always denied. For example, <codeclass="language-plaintext highlighter-rouge notranslate">nfd-master -deny-label-ns=""</code> would still disallow <codeclass="language-plaintext highlighter-rouge notranslate">kubernetes.io</code> and <codeclass="language-plaintext highlighter-rouge notranslate">*.kubernetes.io</code>. This option can be used to exclude some vendors or application specific namespaces. Note that the namespaces <codeclass="language-plaintext highlighter-rouge notranslate">feature.node.kubernetes.io</code> and <codeclass="language-plaintext highlighter-rouge notranslate">profile.node.kubernetes.io</code> and their sub-namespaces are always allowed and cannot be denied.</p><p>Default: <em>empty</em></p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-deny-label-ns</span><spanclass="o">=</span><spanclass="k">*</span>.vendor.com,vendor-2.io
</code></pre></div></div><h3id="-config">-config</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-config</code> flag specifies the path of the nfd-master configuration file to use.</p><p>Default: /etc/kubernetes/node-feature-discovery/nfd-master.conf</p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-config</span><spanclass="o">=</span>/opt/nfd/master.conf
</code></pre></div></div><h3id="-options">-options</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-options</code> flag may be used to specify and override configuration file options directly from the command line. The required format is the same as in the config file i.e. JSON or YAML. Configuration options specified via this flag will override those from the configuration file:</p><p>Default: <em>empty</em></p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-options</span><spanclass="o">=</span><spanclass="s1">'{"noPublish": true}'</span>
</code></pre></div></div><h3id="-nfd-api-parallelism">-nfd-api-parallelism</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-nfd-api-parallelism</code> flag can be used to specify the maximum number of concurrent node updates.</p><p>Default: 10</p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-nfd-api-parallelism</span><spanclass="o">=</span>1
</code></pre></div></div><h3id="logging">Logging</h3><p>The following logging-related flags are inherited from the <ahref="https://pkg.go.dev/k8s.io/klog/v2">klog</a> package.</p><h4id="-add_dir_header">-add_dir_header</h4><p>If true, adds the file directory to the header of the log messages.</p><p>Default: false</p><h4id="-alsologtostderr">-alsologtostderr</h4><p>Log to standard error as well as files.</p><p>Default: false</p><h4id="-log_backtrace_at">-log_backtrace_at</h4><p>When logging hits line file:N, emit a stack trace.</p><p>Default: <em>empty</em></p><h4id="-log_dir">-log_dir</h4><p>If non-empty, write log files in this directory.</p><p>Default: <em>empty</em></p><h4id="-log_file">-log_file</h4><p>If non-empty, use this log file.</p><p>Default: <em>empty</em></p><h4id="-log_file_max_size">-log_file_max_size</h4><p>Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited.</p><p>Default: 1800</p><h4id="-logtostderr">-logtostderr</h4><p>Log to standard error instead of files</p><p>Default: true</p><h4id="-skip_headers">-skip_headers</h4><p>If true, avoid header prefixes in the log messages.</p><p>Default: false</p><h4id="-skip_log_headers">-skip_log_headers</h4><p>If true, avoid headers when opening log files.</p><p>Default: false</p><h4id="-stderrthreshold">-stderrthreshold</h4><p>Logs at or above this threshold go to stderr.</p><p>Default: 2</p><h4id="-v">-v</h4><p>Number for the log level verbosity.</p><p>Default: 0</p><h4id="-vmodule">-vmodule</h4><p>Comma-separated list of <codeclass="language-plaintext highlighter-rouge notranslate">pattern=N</code> settings for file-filtered logging.</p><p>Default: <em>empty</em></p><h3id="-resync-period">-resync-period</h3><p>The <codeclass="language-plaintext highlighter-rouge notranslate">-resync-period</code> flag specifies the NFD API controller resync period. The resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects, thus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations, extended resources and taints are in place).</p><p>Default: 1 hour.</p><p>Example:</p><divclass="language-bash highlighter-rouge notranslate"><divclass="highlight"><preclass="highlight"><code>nfd-master <spanclass="nt">-resync-period</span><spanclass="o">=</span>2h