From a927b8e07fe192664621750c022756a2a20e92fc Mon Sep 17 00:00:00 2001 From: Github Actions Date: Fri, 9 Aug 2024 08:22:48 +0000 Subject: [PATCH] Update documentation for v0.16 Auto-generated from v0.16.3-12-g77fb7be7 by 'update-gh-pages.sh' --- v0.16/404.html | 2 +- v0.16/contributing/index.html | 2 +- v0.16/data.json | 2 +- v0.16/deployment/helm.html | 8 +++---- v0.16/deployment/image-variants.html | 2 +- v0.16/deployment/index.html | 2 +- v0.16/deployment/kustomize.html | 22 +++++++++---------- v0.16/deployment/metrics.html | 4 ++-- v0.16/deployment/operator.html | 6 ++--- v0.16/deployment/tls.html | 4 ++-- v0.16/deployment/uninstallation.html | 6 ++--- v0.16/developer-guide/index.html | 14 ++++++------ v0.16/get-started/index.html | 4 ++-- v0.16/get-started/introduction.html | 4 ++-- v0.16/get-started/quick-start.html | 6 ++--- v0.16/reference/feature-gates.html | 4 ++-- v0.16/reference/gc-commandline-reference.html | 4 ++-- v0.16/reference/index.html | 2 +- .../master-commandline-reference.html | 4 ++-- .../master-configuration-reference.html | 4 ++-- .../plugin-commandline-reference.html | 2 +- ...opology-updater-commandline-reference.html | 4 ++-- ...ology-updater-configuration-reference.html | 4 ++-- v0.16/reference/versions.html | 2 +- .../worker-commandline-reference.html | 4 ++-- .../worker-configuration-reference.html | 4 ++-- v0.16/search.html | 2 +- v0.16/sitemap.xml | 2 +- v0.16/usage/custom-resources.html | 6 ++--- v0.16/usage/customization-guide.html | 10 ++++----- v0.16/usage/examples-and-demos.html | 2 +- v0.16/usage/features.html | 4 ++-- v0.16/usage/index.html | 2 +- v0.16/usage/kubectl-plugin.html | 4 ++-- v0.16/usage/nfd-gc.html | 2 +- v0.16/usage/nfd-master.html | 4 ++-- v0.16/usage/nfd-topology-updater.html | 4 ++-- v0.16/usage/nfd-worker.html | 6 ++--- v0.16/usage/using-labels.html | 4 ++-- 39 files changed, 89 insertions(+), 89 deletions(-) diff --git a/v0.16/404.html b/v0.16/404.html index 4b212e001a..ddc3f3fc16 100644 --- a/v0.16/404.html +++ b/v0.16/404.html @@ -1 +1 @@ - 404 · Node Feature Discovery

404

Not Found


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file + 404 · Node Feature Discovery

404

Not Found


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/contributing/index.html b/v0.16/contributing/index.html index 09a840dd85..9b13455d0d 100644 --- a/v0.16/contributing/index.html +++ b/v0.16/contributing/index.html @@ -1 +1 @@ - Contributing · Node Feature Discovery

Contributing


Community

You can reach us via the following channels:

Governance

This is a SIG-node subproject, hosted under the Kubernetes SIGs organization in Github. The project was established in 2016 and was migrated to Kubernetes SIGs in 2018.

License

This is open source software released under the Apache 2.0 License.


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file + Contributing · Node Feature Discovery

Contributing


Community

You can reach us via the following channels:

Governance

This is a SIG-node subproject, hosted under the Kubernetes SIGs organization in Github. The project was established in 2016 and was migrated to Kubernetes SIGs in 2018.

License

This is open source software released under the Apache 2.0 License.


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/data.json b/v0.16/data.json index 80be380676..83789a9e5e 100644 --- a/v0.16/data.json +++ b/v0.16/data.json @@ -1 +1 @@ -[{"title":"Image variants","layout":"default","sort":1,"content":"

Image variants

\n\n
\n\n

NFD offers two variants of the container image. Released container images are\navailable for x86_64 and Arm64 architectures.

\n\n

Default

\n\n

The default is a minimal image based on\nscratch\nand only supports running statically linked binaries.

\n\n

For backwards compatibility a container image tag with suffix -minimal\n(e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.3-minimal) is provided.

\n\n

Full

\n\n

This image is based on debian:bookworm-slim\nand contains a full Linux system for running shell-based nfd-worker hooks and\ndoing live debugging and diagnosis of the NFD images.

\n\n

The container image tag has suffix -full\n(e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.3-full).

\n","dir":"/deployment/","name":"image-variants.md","path":"deployment/image-variants.md","url":"/deployment/image-variants.html"},{"title":"Get started","layout":"default","sort":1,"content":"

Node Feature Discovery

\n\n

Welcome to Node Feature Discovery – a Kubernetes add-on for detecting hardware\nfeatures and system configuration!

\n\n

Continue to:

\n\n\n\n

Quick-start – the short-short version

\n\n
$ kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3\n  namespace/node-feature-discovery created\n  serviceaccount/nfd-master created\n  clusterrole.rbac.authorization.k8s.io/nfd-master created\n  clusterrolebinding.rbac.authorization.k8s.io/nfd-master created\n  configmap/nfd-worker-conf created\n  service/nfd-master created\n  deployment.apps/nfd-master created\n  daemonset.apps/nfd-worker created\n\n$ kubectl -n node-feature-discovery get all\n  NAME                              READY   STATUS    RESTARTS   AGE\n  pod/nfd-master-555458dbbc-sxg6w   1/1     Running   0          56s\n  pod/nfd-worker-mjg9f              1/1     Running   0          17s\n...\n\n$ kubectl get nodes -o json | jq '.items[].metadata.labels'\n  {\n    \"kubernetes.io/arch\": \"amd64\",\n    \"kubernetes.io/os\": \"linux\",\n    \"feature.node.kubernetes.io/cpu-cpuid.ADX\": \"true\",\n    \"feature.node.kubernetes.io/cpu-cpuid.AESNI\": \"true\",\n...\n\n
\n","dir":"/get-started/","name":"index.md","path":"get-started/index.md","url":"/get-started/"},{"title":"Introduction","layout":"default","sort":1,"content":"

Introduction

\n\n

Table of contents

\n\n
    \n
  1. NFD-Master
  2. \n
  3. NFD-Worker
  4. \n
  5. NFD-Topology-Updater
  6. \n
  7. NFD-GC
  8. \n
  9. Feature Discovery
  10. \n
  11. Node annotations
  12. \n
  13. Custom resources
  14. \n
\n\n
\n\n

This software enables node feature discovery for Kubernetes. It detects\nhardware features available on each node in a Kubernetes cluster, and\nadvertises those features using node labels and optionally node extended\nresources, annotations and node taints. Node Feature Discovery is compatible\nwith any recent version of Kubernetes (v1.24+).

\n\n

NFD consists of four software components:

\n\n
    \n
  1. nfd-master
  2. \n
  3. nfd-worker
  4. \n
  5. nfd-topology-updater
  6. \n
  7. nfd-gc
  8. \n
\n\n

NFD-Master

\n\n

NFD-Master is the daemon responsible for communication towards the Kubernetes\nAPI. That is, it receives labeling requests from the worker and modifies node\nobjects accordingly.

\n\n

NFD-Worker

\n\n

NFD-Worker is a daemon responsible for feature detection. It then communicates\nthe information to nfd-master which does the actual node labeling. One\ninstance of nfd-worker is supposed to be running on each node of the cluster,

\n\n

NFD-Topology-Updater

\n\n

NFD-Topology-Updater is a daemon responsible for examining allocated\nresources on a worker node to account for resources available to be allocated\nto new pod on a per-zone basis (where a zone can be a NUMA node). It then\ncreates or updates a\nNodeResourceTopology custom\nresource object specific to this node. One instance of nfd-topology-updater is\nsupposed to be running on each node of the cluster.

\n\n

NFD-GC

\n\n

NFD-GC is a daemon responsible for cleaning obsolete\nNodeFeature and\nNodeResourceTopology objects.

\n\n

One instance of nfd-gc is supposed to be running in the cluster.

\n\n

Feature Discovery

\n\n

Feature discovery is divided into domain-specific feature sources:

\n\n\n\n

Each feature source is responsible for detecting a set of features which. in\nturn, are turned into node feature labels. Feature labels are prefixed with\nfeature.node.kubernetes.io/ and also contain the name of the feature source.\nNon-standard user-specific feature labels can be created with the local and\ncustom feature sources.

\n\n

An overview of the default feature labels:

\n\n
{\n  \"feature.node.kubernetes.io/cpu-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/custom-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/kernel-<feature name>\": \"<feature value>\",\n  \"feature.node.kubernetes.io/memory-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/network-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/pci-<device label>.present\": \"true\",\n  \"feature.node.kubernetes.io/storage-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/system-<feature name>\": \"<feature value>\",\n  \"feature.node.kubernetes.io/usb-<device label>.present\": \"<feature value>\",\n  \"feature.node.kubernetes.io/<file name>-<feature name>\": \"<feature value>\"\n}\n
\n\n

Node annotations

\n\n

NFD also annotates nodes it is running on:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AnnotationDescription
[<instance>.]nfd.node.kubernetes.io/feature-labelsComma-separated list of node labels managed by NFD. NFD uses this internally so must not be edited by users.
[<instance>.]nfd.node.kubernetes.io/feature-annotationsComma-separated list of node annotations managed by NFD. NFD uses this internally so must not be edited by users.
[<instance>.]nfd.node.kubernetes.io/extended-resourcesComma-separated list of node extended resources managed by NFD. NFD uses this internally so must not be edited by users.
[<instance>.]nfd.node.kubernetes.io/taintsComma-separated list of node taints managed by NFD. NFD uses this internally so must not be edited by users.
\n\n
\n

NOTE: the -instance\ncommand line flag affects the annotation names

\n
\n\n

Unapplicable annotations are not created, i.e. for example\nnfd.node.kubernetes.io/extended-resources is only placed if some extended\nresources were created by NFD.

\n\n

Custom resources

\n\n

NFD takes use of some Kubernetes Custom Resources.

\n\n

NodeFeatures\nis be used for representing node features and requesting node labels to be\ngenerated.

\n\n

NFD-Master uses NodeFeatureRules\nfor custom labeling of nodes.

\n\n

NFD-Topology-Updater creates\nNodeResourceTopology objects\nthat describe the hardware topology of node resources.

\n","dir":"/get-started/","name":"introduction.md","path":"get-started/introduction.md","url":"/get-started/introduction.html"},{"title":"Master cmdline reference","layout":"default","sort":1,"content":"

Commandline flags of nfd-master

\n\n

Table of contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -feature-gates
  6. \n
  7. -prune
  8. \n
  9. -port
  10. \n
  11. -metrics
  12. \n
  13. -instance
  14. \n
  15. -ca-file
  16. \n
  17. -cert-file
  18. \n
  19. -key-file
  20. \n
  21. -verify-node-name
  22. \n
  23. -enable-nodefeature-api
  24. \n
  25. -enable-leader-election
  26. \n
  27. -enable-taints
  28. \n
  29. -no-publish
  30. \n
  31. -crd-controller
  32. \n
  33. -featurerules-controller
  34. \n
  35. -label-whitelist
  36. \n
  37. -extra-label-ns
  38. \n
  39. -deny-label-ns
  40. \n
  41. -resource-labels
  42. \n
  43. -config
  44. \n
  45. -options
  46. \n
  47. -nfd-api-parallelism
  48. \n
  49. Logging
  50. \n
  51. -resync-period
  52. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-master -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 nfd-master -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-feature-gates

\n\n

The -feature-gates flag is used to enable or disable non GA features.\nThe list of available feature gates can be found in the feature gates\ndocumentation.

\n\n

Example:

\n\n
nfd-master -feature-gates NodeFeatureAPI=false\n
\n\n

-prune

\n\n

The -prune flag is a sub-command like option for cleaning up the cluster. It\ncauses nfd-master to remove all NFD related labels, annotations and extended\nresources from all Node objects of the cluster and exit.

\n\n

-port

\n\n

The -port flag specifies the TCP port that nfd-master listens for incoming requests.

\n\n

Default: 8080

\n\n

Example:

\n\n
nfd-master -port=443\n
\n\n

-metrics

\n\n

The -metrics flag specifies the port on which to expose\nPrometheus metrics. Setting this to 0 disables the\nmetrics server on nfd-master.

\n\n

Default: 8081

\n\n

Example:

\n\n
nfd-master -metrics=12345\n
\n\n

-instance

\n\n

The -instance flag makes it possible to run multiple NFD deployments in\nparallel. In practice, it separates the node annotations between deployments so\nthat each of them can store metadata independently. The instance name must\nstart and end with an alphanumeric character and may only contain alphanumeric\ncharacters, -, _ or ..

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -instance=network\n
\n\n

-ca-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -ca-file is one of the three flags (together with -cert-file and\n-key-file) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the TLS root certificate that is used for\nauthenticating incoming connections. NFD-Worker side needs to have matching key\nand cert files configured for the incoming requests to be accepted.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -key-file

\n
\n\n

Example:

\n\n
nfd-master -ca-file=/opt/nfd/ca.crt -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key\n
\n\n

-cert-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -cert-file is one of the three flags (together with -ca-file and\n-key-file) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the TLS certificate presented for\nauthenticating outgoing traffic towards nfd-worker.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -ca-file and -key-file

\n
\n\n

Example:

\n\n
nfd-master -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key -ca-file=/opt/nfd/ca.crt\n
\n\n

-key-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -key-file is one of the three flags (together with -ca-file and\n-cert-file) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the private key corresponding the given\ncertificate file (-cert-file) that is used for authenticating outgoing\ntraffic.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -ca-file

\n
\n\n

Example:

\n\n
nfd-master -key-file=/opt/nfd/master.key -cert-file=/opt/nfd/master.crt -ca-file=/opt/nfd/ca.crt\n
\n\n

-verify-node-name

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -verify-node-name flag controls the NodeName based authorization of\nincoming requests and only has effect when mTLS authentication has been enabled\n(with -ca-file, -cert-file and -key-file). If enabled, the worker node\nname of the incoming must match with the CN or a SAN in its TLS certificate. Thus,\nworkers are only able to label the node they are running on (or the node whose\ncertificate they present).

\n\n

Node Name based authorization is disabled by default.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-master -verify-node-name -ca-file=/opt/nfd/ca.crt \\\n    -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key\n
\n\n

-enable-nodefeature-api

\n\n

DEPRECATED: will be removed in NFD v0.17. Use’\n-feature-gates\nNodeFeatureAPI instead.

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.

\n
\n\n

The -enable-nodefeature-api flag enables/disables the\nNodeFeature CRD API for receiving\nfeature requests. This will also automatically disable/enable the gRPC\ninterface.

\n\n

Default: true

\n\n

Example:

\n\n
nfd-master -enable-nodefeature-api=false\n
\n\n

-enable-leader-election

\n\n

The -enable-leader-election flag enables leader election for NFD-Master.\nIt is advised to turn on this flag when running more than one instance of\nNFD-Master.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: false

\n\n
nfd-master -enable-leader-election\n
\n\n

-enable-taints

\n\n

The -enable-taints flag enables/disables node tainting feature of NFD.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-master -enable-taints=true\n
\n\n

-no-publish

\n\n

The -no-publish flag disables updates to the Node objects in the Kubernetes\nAPI server, making a “dry-run” flag for nfd-master. No Labels, Annotations or\nExtendedResources of nodes are updated.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-master -no-publish\n
\n\n

-crd-controller

\n\n
\n

NOTE This flag will be removed in a future release at the same time with\nthe deprecated gRPC API.

\n
\n\n

The -crd-controller flag specifies whether the NFD CRD API controller is\nenabled or not. The controller is responsible for processing\nNodeFeature and\nNodeFeatureRule objects.

\n\n

Default: true

\n\n

Example:

\n\n
nfd-master -crd-controller=false\n
\n\n

-featurerules-controller

\n\n

DEPRECATED: use -crd-controller instead.

\n\n

-label-whitelist

\n\n

The -label-whitelist specifies a regular expression for filtering feature\nlabels based on their name. Each label must match against the given regular\nexpression or it will not be published.

\n\n
\n

NOTE: The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label namespace is\nomitted.

\n
\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -label-whitelist='.*cpuid\\.'\n
\n\n

-extra-label-ns

\n\n

The -extra-label-ns flag specifies a comma-separated list of allowed feature\nlabel namespaces. This option can be used to allow\nother vendor or application specific namespaces for custom labels from the\nlocal and custom feature sources, even though these labels were denied using\nthe deny-label-ns flag.

\n\n

The same namespace control and this flag applies Extended Resources (created\nwith -resource-labels), too.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -extra-label-ns=vendor-1.com,vendor-2.io\n
\n\n

-deny-label-ns

\n\n

The -deny-label-ns flag specifies a comma-separated list of excluded\nlabel namespaces. By default, nfd-master allows creating labels in all\nnamespaces, excluding kubernetes.io namespace and its sub-namespaces\n(i.e. *.kubernetes.io). However, you should note that\nkubernetes.io and its sub-namespaces are always denied.\nFor example, nfd-master -deny-label-ns=\"\" would still disallow\nkubernetes.io and *.kubernetes.io.\nThis option can be used to exclude some vendors or application specific\nnamespaces.\nNote that the namespaces feature.node.kubernetes.io and profile.node.kubernetes.io\nand their sub-namespaces are always allowed and cannot be denied.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -deny-label-ns=*.vendor.com,vendor-2.io\n
\n\n

-resource-labels

\n\n

DEPRECATED: NodeFeatureRule\nshould be used for managing extended resources in NFD.

\n\n

The -resource-labels flag specifies a comma-separated list of features to be\nadvertised as extended resources instead of labels. Features that have integer\nvalues can be published as Extended Resources by listing them in this flag.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -resource-labels=vendor-1.com/feature-1,vendor-2.io/feature-2\n
\n\n

-config

\n\n

The -config flag specifies the path of the nfd-master configuration file to\nuse.

\n\n

Default: /etc/kubernetes/node-feature-discovery/nfd-master.conf

\n\n

Example:

\n\n
nfd-master -config=/opt/nfd/master.conf\n
\n\n

-options

\n\n

The -options flag may be used to specify and override configuration file\noptions directly from the command line. The required format is the same as in\nthe config file i.e. JSON or YAML. Configuration options specified via this\nflag will override those from the configuration file:

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -options='{\"noPublish\": true}'\n
\n\n

-nfd-api-parallelism

\n\n

The -nfd-api-parallelism flag can be used to specify the maximum\nnumber of concurrent node updates.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 10

\n\n

Example:

\n\n
nfd-master -nfd-api-parallelism=1\n
\n\n

Logging

\n\n

The following logging-related flags are inherited from the\nklog package.

\n\n

-add_dir_header

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

-alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

-log_backtrace_at

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

-log_dir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

-log_file

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

-log_file_max_size

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

-logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

-skip_headers

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

-skip_log_headers

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

-stderrthreshold

\n\n

Logs at or above this threshold go to stderr.

\n\n

Default: 2

\n\n

-v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

-vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n\n

-resync-period

\n\n

The -resync-period flag specifies the NFD API controller resync period.\nThe resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,\nthus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,\nextended resources and taints are in place).

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 1 hour.

\n\n

Example:

\n\n
nfd-master -resync-period=2h\n
\n","dir":"/reference/","name":"master-commandline-reference.md","path":"reference/master-commandline-reference.md","url":"/reference/master-commandline-reference.html"},{"title":"Feature labels","layout":"default","sort":1,"content":"

Feature labels

\n\n

Table of contents

\n\n
    \n
  1. Built-in labels
      \n
    1. CPU
    2. \n
    3. Kernel
    4. \n
    5. Memory
    6. \n
    7. Network
    8. \n
    9. PCI
    10. \n
    11. USB
    12. \n
    13. Storage
    14. \n
    15. System
    16. \n
    17. Custom
    18. \n
    \n
  2. \n
  3. User defined labels
  4. \n
  5. Extended resources
  6. \n
\n\n
\n\n

Features are advertised as labels in the Kubernetes Node object.

\n\n

Built-in labels

\n\n

Label creation in nfd-worker is performed by a set of separate modules called\nlabel sources. The\ncore.labelSources\nconfiguration option (or\n-label-sources\nflag) of nfd-worker controls which sources to enable for label generation.

\n\n

All built-in labels use the feature.node.kubernetes.io label namespace and\nhave the following format.

\n\n
feature.node.kubernetes.io/<feature> = <value>\n
\n\n
\n

NOTE: Consecutive runs of nfd-worker will update the labels on a given\nnode. If features are not discovered on a consecutive run, the corresponding\nlabel will be removed. This includes any restrictions placed on the\nconsecutive run, such as restricting discovered features with the\n-label-whitelist\nflag of nfd-master or\ncore.labelWhiteList\noption of nfd-worker.

\n
\n\n

CPU

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Feature nameValueDescription
cpu-cpuid.<cpuid-flag>trueCPU capability is supported. NOTE: the capability might be supported but not enabled.
cpu-cpuid.<cpuid-attribute>stringCPU attribute value
cpu-hardware_multithreadingtrueHardware multithreading, such as Intel HTT, enabled (number of logical CPUs is greater than physical CPUs)
cpu-coprocessor.nx_gziptrueNest Accelerator for GZIP is supported(Power).
cpu-power.sst_bf.enabledtrueIntel SST-BF (Intel Speed Select Technology - Base frequency) enabled
cpu-pstate.statusstringThe status of the Intel pstate driver when in use and enabled, either ‘active’ or ‘passive’.
cpu-pstate.turboboolSet to ‘true’ if turbo frequencies are enabled in Intel pstate driver, set to ‘false’ if they have been disabled.
cpu-pstate.scaling_governorstringThe value of the Intel pstate scaling_governor when in use, either ‘powersave’ or ‘performance’.
cpu-cstate.enabledboolSet to ‘true’ if cstates are set in the intel_idle driver, otherwise set to ‘false’. Unset if intel_idle cpuidle driver is not active.
cpu-security.sgx.enabledtrueSet to ‘true’ if Intel SGX is enabled in BIOS (based on a non-zero sum value of SGX EPC section sizes).
cpu-security.se.enabledtrueSet to ‘true’ if IBM Secure Execution for Linux (IBM Z & LinuxONE) is available and enabled (requires /sys/firmware/uv/prot_virt_host facility)
cpu-security.tdx.enabledtrueSet to ‘true’ if Intel TDX is available on the host and has been enabled (requires /sys/module/kvm_intel/parameters/tdx).
cpu-security.tdx.protectedtrueSet to ‘true’ if Intel TDX was used to start the guest node, based on the existence of the “TDX_GUEST” information as part of cpuid features.
cpu-security.sev.enabledtrueSet to ‘true’ if ADM SEV is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev).
cpu-security.sev.es.enabledtrueSet to ‘true’ if ADM SEV-ES is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_es).
cpu-security.sev.snp.enabledtrueSet to ‘true’ if ADM SEV-SNP is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_snp).
cpu-model.vendor_idstringComparable CPU vendor ID.
cpu-model.familyintCPU family.
cpu-model.idintCPU model number.
\n\n

The CPU label source is configurable, see\nworker configuration and\nsources.cpu\nconfiguration options for details.

\n\n

X86 CPUID flags (partial list)

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
ADXMulti-Precision Add-Carry Instruction Extensions (ADX)
AESNIAdvanced Encryption Standard (AES) New Instructions (AES-NI)
APX_FIntel Advanced Performance Extensions (APX)
AVX10Intel Advanced Vector Extensions 10 (AVX10)
AVX10_256, AVX10_512Intel AVX10 256-bit and 512-bit vector support
AVXAdvanced Vector Extensions (AVX)
AVX2Advanced Vector Extensions 2 (AVX2)
AVXIFMAAVX-IFMA instructions
AVXVNNIAVX (VEX encoded) VNNI neural network instructions
AMXBF16Advanced Matrix Extension, tile multiplication operations on BFLOAT16 numbers
AMXINT8Advanced Matrix Extension, tile multiplication operations on 8-bit integers
AMXFP16Advanced Matrix Extension, tile multiplication operations on FP16 numbers
AMXTILEAdvanced Matrix Extension, base tile architecture support
AVX512BF16AVX-512 BFLOAT16 instructions
AVX512BITALGAVX-512 bit Algorithms
AVX512BWAVX-512 byte and word Instructions
AVX512CDAVX-512 conflict detection instructions
AVX512DQAVX-512 doubleword and quadword instructions
AVX512ERAVX-512 exponential and reciprocal instructions
AVX512FAVX-512 foundation
AVX512FP16AVX-512 FP16 instructions
AVX512IFMAAVX-512 integer fused multiply-add instructions
AVX512PFAVX-512 prefetch instructions
AVX512VBMIAVX-512 vector bit manipulation instructions
AVX512VBMI2AVX-512 vector bit manipulation instructions, version 2
AVX512VLAVX-512 vector length extensions
AVX512VNNIAVX-512 vector neural network instructions
AVX512VP2INTERSECTAVX-512 intersect for D/Q
AVX512VPOPCNTDQAVX-512 vector population count doubleword and quadword
AVXNECONVERTAVX-NE-CONVERT instructions
AVXVNNIINT8AVX-VNNI-INT8 instructions
CMPCCXADDCMPCCXADD instructions
ENQCMDEnqueue Command
GFNIGalois Field New Instructions
HYPERVISORRunning under hypervisor
MSRLISTRead/Write List of Model Specific Registers
PREFETCHIPREFETCHIT0/1 instructions
VAESAVX-512 vector AES instructions
VPCLMULQDQCarry-less multiplication quadword
WRMSRNSNon-Serializing Write to Model Specific Register
\n\n

By default, the following CPUID flags have been blacklisted: AVX10 (use\nAVX10_VERSION instead), BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT,\nMMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SSE, SSE2, SSE3, SSE4,\nSSE42, SSSE3 and TDX_GUEST. See\nsources.cpu\nconfiguration options to change the behavior.

\n\n

See the full list in github.com/klauspost/cpuid.

\n\n

X86 CPUID attributes

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeDescription
AVX10_VERSIONAVX10 vector ISA version (if supported)
\n\n

Arm CPUID flags (partial list)

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
IDIVAInteger divide instructions available in ARM mode
IDIVTInteger divide instructions available in Thumb mode
THUMBThumb instructions
FASTMULFast multiplication
VFPVector floating point instruction extension (VFP)
VFPv3Vector floating point extension v3
VFPv4Vector floating point extension v4
VFPD32VFP with 32 D-registers
HALFHalf-word loads and stores
EDSPDSP extensions
NEONNEON SIMD instructions
LPAELarge Physical Address Extensions
\n\n

Arm64 CPUID flags (partial list)

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
AESAnnouncing the Advanced Encryption Standard
EVSTRMEvent Stream Frequency Features
FPHPHalf Precision(16bit) Floating Point Data Processing Instructions
ASIMDHPHalf Precision(16bit) Asimd Data Processing Instructions
ATOMICSAtomic Instructions to the A64
ASIMRDMSupport for Rounding Double Multiply Add/Subtract
PMULLOptional Cryptographic and CRC32 Instructions
JSCVTPerform Conversion to Match Javascript
DCPOPPersistent Memory Support
\n\n

Kernel

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
kernel-config.<option>trueKernel config option is enabled (set ‘y’ or ‘m’). Default options are NO_HZ, NO_HZ_IDLE, NO_HZ_FULL and PREEMPT
kernel-selinux.enabledtrueSelinux is enabled on the node
kernel-version.fullstringFull kernel version as reported by /proc/sys/kernel/osrelease (e.g. ‘4.5.6-7-g123abcde’)
kernel-version.majorstringFirst component of the kernel version (e.g. ‘4’)
kernel-version.minorstringSecond component of the kernel version (e.g. ‘5’)
kernel-version.revisionstringThird component of the kernel version (e.g. ‘6’)
\n\n

The kernel label source is configurable, see\nworker configuration and\nsources.kernel\nconfiguration options for details.

\n\n

Memory

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
memory-numatrueMultiple memory nodes i.e. NUMA architecture detected
memory-nv.presenttrueNVDIMM device(s) are present
memory-nv.daxtrueNVDIMM region(s) configured in DAX mode are present
memory-swap.enabledtrueSwap is enabled on the node
\n\n

Network

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
network-sriov.capabletrueSingle Root Input/Output Virtualization (SR-IOV) enabled Network Interface Card(s) present
network-sriov.configuredtrueSR-IOV virtual functions have been configured
\n\n

PCI

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
pci-<device label>.presenttruePCI device is detected
pci-<device label>.sriov.capabletrueSingle Root Input/Output Virtualization (SR-IOV) enabled PCI device present
   
\n\n

<device label> is format is configurable and set to <class>_<vendor> by\ndefault. For more more details about configuration of the pci labels, see\nsources.pci options\nand worker configuration\ninstructions.

\n\n

USB

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
usb-<device label>.presenttrueUSB device is detected
\n\n

<device label> is format is configurable and set to\n<class>_<vendor>_<device> by default. For more more details about\nconfiguration of the usb labels, see\nsources.usb options\nand worker configuration\ninstructions.

\n\n

Storage

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
storage-nonrotationaldisktrueNon-rotational disk, like SSD, is present in the node
\n\n

System

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
system-os_release.IDstringOperating system identifier
system-os_release.VERSION_IDstringOperating system version identifier (e.g. ‘6.7’)
system-os_release.VERSION_ID.majorstringFirst component of the OS version id (e.g. ‘6’)
system-os_release.VERSION_ID.minorstringSecond component of the OS version id (e.g. ‘7’)
\n\n

Custom

\n\n

The custom label source is designed for creating\nuser defined labels. However, it has a few statically\ndefined built-in labels:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
custom-rdma.capabletrueThe node has an RDMA capable Network adapter
custom-rdma.enabledtrueThe node has the needed RDMA modules loaded to run RDMA traffic
   
\n\n

User defined labels

\n\n

NFD has many extension points for creating vendor and application specific\nlabels. See the customization guide for\ndetailed documentation.

\n\n

Extended resources

\n\n

NFD is able to create extended resources, see the\nNodeFeatureRule CRD and its\nextendedResources field for more\ndetails.

\n\n

Note that NFD is not a replacement for the usage of device plugins.

\n\n

An example use-case for extended resources could be based on custom feature\n(created e.g. with feature files that\nexposes the node SGX EPC memory section size. This value will then be turned\ninto an extended resource of the node, allowing PODs to request that resource\nand the Kubernetes scheduler to schedule such PODs to only those nodes which\nhave a sufficient capacity of said resource left.

\n\n\n","dir":"/usage/","name":"features.md","path":"usage/features.md","url":"/usage/features.html"},{"title":"Deployment","layout":"default","sort":2,"content":"

Deployment

\n\n

Node Feature Discovery can be deployed on any recent version of Kubernetes\n(v1.24+).

\n\n

See Image variants for description of the different NFD\ncontainer images available.

\n\n

Using Kustomize provides straightforward deployment with\nkubectl integration and declarative customization.

\n\n

Using Helm provides easy management of NFD deployments with nice\nconfiguration management and easy upgrades.

\n\n

Using Operator provides deployment and configuration management via\nCRDs.

\n","dir":"/deployment/","name":"index.md","path":"deployment/index.md","url":"/deployment/"},{"title":"Kustomize","layout":"default","sort":2,"content":"

Deployment with Kustomize

\n\n

Table of contents

\n\n
    \n
  1. Overlays
      \n
    1. Worker one-shot
    2. \n
    3. Master Worker Topologyupdater
    4. \n
    5. Topologyupdater
    6. \n
    7. Metrics
    8. \n
    \n
  2. \n
  3. Uninstallation
  4. \n
\n\n
\n\n

Kustomize can be used to\ndeploy NFD. Customization of the deployment is done by maintaining\ndeclarative overlays on top of the base overlays in NFD.

\n\n

To follow the deployment instructions here,\nkubectl v1.24 or\nlater is required.

\n\n

The kustomize overlays provided in the repo can be used directly:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3\n
\n\n

This will required RBAC rules and deploy nfd-master (as a deployment) and\nnfd-worker (as daemonset) in the node-feature-discovery namespace.

\n\n
\n

NOTE: nfd-topology-updater is not deployed as part of the default\noverlay. Refer to the Master Worker Topologyupdater\nand Topologyupdater below.

\n
\n\n

Alternatively you can clone the repository and customize the deployment by\ncreating your own overlays. See kustomize for more information\nabout managing deployment configurations.

\n\n

Overlays

\n\n

The NFD repository hosts a set of overlays for different usages and deployment\nscenarios under\ndeployment/overlays

\n\n\n\n

Worker one-shot

\n\n

Feature discovery can alternatively be configured as a one-shot job.\nThe default-job overlay may be used to achieve this:

\n\n
NUM_NODES=$(kubectl get no -o jsonpath='{.items[*].metadata.name}' | wc -w)\nkubectl kustomize https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default-job?ref=v0.16.3 | \\\n    sed s\"/NUM_NODES/$NUM_NODES/\" | \\\n    kubectl apply -f -\n
\n\n

The example above launches as many jobs as there are non-master nodes. Note that\nthis approach does not guarantee running once on every node. For example,\ntainted, non-ready nodes or some other reasons in Job scheduling may cause some\nnode(s) will run extra job instance(s) to satisfy the request.

\n\n

Master Worker Topologyupdater

\n\n

NFD-Master, nfd-worker and nfd-topology-updater can be configured to be\ndeployed as separate pods. The master-worker-topologyupdater overlay may be\nused to achieve this:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/master-worker-topologyupdater?ref=v0.16.3\n\n
\n\n

Topologyupdater

\n\n

To deploy just nfd-topology-updater (without nfd-master and nfd-worker)\nuse the topologyupdater overlay:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.3\n\n
\n\n

NFD-Topology-Updater can be configured along with the default overlay\n(which deploys nfd-worker and nfd-master) where all the software components\nare deployed as separate pods;

\n\n
\nkubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3\nkubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.3\n\n
\n\n

Metrics

\n\n

To allow prometheus operator\nto scrape metrics from node-feature-discovery,\nrun the following command:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3\nkubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prometheus?ref=v0.16.3\n
\n\n

Uninstallation

\n\n

Simplest way is to invoke kubectl delete on the overlay that was used for\ndeployment. Beware that this will also delete the namespace that NFD is\nrunning in. For example, in case the default overlay from the repo was used:

\n\n
kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3\n
\n\n

Alternatively you can delete create objects one-by-one, depending on the type\nof deployment, for example:

\n\n
NFD_NS=node-feature-discovery\nkubectl -n $NFD_NS delete ds nfd-worker\nkubectl -n $NFD_NS delete deploy nfd-master\nkubectl -n $NFD_NS delete svc nfd-master\nkubectl -n $NFD_NS delete sa nfd-master\nkubectl delete clusterrole nfd-master\nkubectl delete clusterrolebinding nfd-master\n
\n\n\n","dir":"/deployment/","name":"kustomize.md","path":"deployment/kustomize.md","url":"/deployment/kustomize.html"},{"title":"Quick start","layout":"default","sort":2,"content":"

Quick start

\n\n

Minimal steps to deploy latest released version of NFD in your cluster.

\n\n

Installation

\n\n

Deploy with kustomize – creates a new namespace, service and required RBAC\nrules and deploys nfd-master and nfd-worker daemons.

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3\n
\n\n

Verify

\n\n

Wait until NFD master and NFD worker are running.

\n\n
$ kubectl -n node-feature-discovery get ds,deploy\nNAME                         DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE\ndaemonset.apps/nfd-worker    2         2         2       2            2           <none>          10s\n\nNAME                         READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/nfd-master   1/1     1            1           17s\n\n
\n\n

Check that NFD feature labels have been created

\n\n
$ kubectl get no -o json | jq '.items[].metadata.labels'\n{\n  \"kubernetes.io/arch\": \"amd64\",\n  \"kubernetes.io/os\": \"linux\",\n  \"feature.node.kubernetes.io/cpu-cpuid.ADX\": \"true\",\n  \"feature.node.kubernetes.io/cpu-cpuid.AESNI\": \"true\",\n  \"feature.node.kubernetes.io/cpu-cpuid.AVX\": \"true\",\n...\n
\n\n

Use node labels

\n\n

Create a pod targeting a distinguishing feature (select a valid feature from\nthe list printed on the previous step)

\n\n
$ cat << EOF | kubectl apply -f -\napiVersion: v1\nkind: Pod\nmetadata:\n  name: feature-dependent-pod\nspec:\n  containers:\n  - image: registry.k8s.io/pause\n    name: pause\n  nodeSelector:\n    # Select a valid feature\n    feature.node.kubernetes.io/cpu-cpuid.AESNI: 'true'\nEOF\npod/feature-dependent-pod created\n
\n\n

See that the pod is running on a desired node

\n\n
$ kubectl get po feature-dependent-pod -o wide\nNAME                    READY   STATUS    RESTARTS   AGE   IP          NODE     NOMINATED NODE   READINESS GATES\nfeature-dependent-pod   1/1     Running   0          23s   10.36.0.4   node-2   <none>           <none>\n
\n\n

Additional Optional Installation Steps

\n\n

Deploy nfd-topology-updater

\n\n

To deploy nfd-topology-updater use the topologyupdater kustomize\noverlay.

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.3\n
\n\n

Verify nfd-topology-updater

\n\n

Wait until nfd-topology-updater is running.

\n\n
$ kubectl -n node-feature-discovery get ds\nNAME                                  DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE\ndaemonset.apps/nfd-topology-updater   2         2         2       2            2           <none>          5s\n\n
\n\n

Check that the NodeResourceTopology objects are created

\n\n
$ kubectl get noderesourcetopologies.topology.node.k8s.io\nNAME                 AGE\nkind-control-plane   23s\nkind-worker          23s\n
\n","dir":"/get-started/","name":"quick-start.md","path":"get-started/quick-start.md","url":"/get-started/quick-start.html"},{"title":"Worker cmdline reference","layout":"default","sort":2,"content":"

Commandline flags of nfd-worker

\n\n

Table of contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -feature-gates
  6. \n
  7. -config
  8. \n
  9. -options
  10. \n
  11. -server
  12. \n
  13. -ca-file
  14. \n
  15. -cert-file
  16. \n
  17. -key-file
  18. \n
  19. -kubeconfig
  20. \n
  21. -server-name-override
  22. \n
  23. -feature-sources
  24. \n
  25. -label-sources
  26. \n
  27. -metrics
  28. \n
  29. -no-publish
  30. \n
  31. -oneshot
  32. \n
  33. Logging
  34. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-worker -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 nfd-worker -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-feature-gates

\n\n

The -feature-gates flag is used to enable or disable non GA features.\nThe list of available feature gates can be found in the feature gates\ndocumentation.

\n\n

Example:

\n\n
nfd-master -feature-gates NodeFeatureAPI=false\n
\n\n

-config

\n\n

The -config flag specifies the path of the nfd-worker configuration file to\nuse.

\n\n

Default: /etc/kubernetes/node-feature-discovery/nfd-worker.conf

\n\n

Example:

\n\n
nfd-worker -config=/opt/nfd/worker.conf\n
\n\n

-options

\n\n

The -options flag may be used to specify and override configuration file\noptions directly from the command line. The required format is the same as in\nthe config file i.e. JSON or YAML. Configuration options specified via this\nflag will override those from the configuration file:

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-worker -options='{\"sources\":{\"cpu\":{\"cpuid\":{\"attributeWhitelist\":[\"AVX\",\"AVX2\"]}}}}'\n
\n\n

-server

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -server flag specifies the address of the nfd-master endpoint where to\nconnect to.

\n\n

Default: localhost:8080

\n\n

Example:

\n\n
nfd-worker -server=nfd-master.nfd.svc.cluster.local:443\n
\n\n

-ca-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -ca-file is one of the three flags (together with -cert-file and\n-key-file) controlling the mutual TLS authentication on the worker side.\nThis flag specifies the TLS root certificate that is used for verifying the\nauthenticity of nfd-master.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -key-file

\n
\n\n

Example:

\n\n
nfd-worker -ca-file=/opt/nfd/ca.crt -cert-file=/opt/nfd/worker.crt -key-file=/opt/nfd/worker.key\n
\n\n

-cert-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -cert-file is one of the three flags (together with -ca-file and\n-key-file) controlling mutual TLS authentication on the worker side. This\nflag specifies the TLS certificate presented for authenticating outgoing\nrequests.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -ca-file and -key-file

\n
\n\n

Example:

\n\n
nfd-workerr -cert-file=/opt/nfd/worker.crt -key-file=/opt/nfd/worker.key -ca-file=/opt/nfd/ca.crt\n
\n\n

-key-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -key-file is one of the three flags (together with -ca-file and\n-cert-file) controlling the mutual TLS authentication on the worker side.\nThis flag specifies the private key corresponding the given certificate file\n(-cert-file) that is used for authenticating outgoing requests.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -ca-file

\n
\n\n

Example:

\n\n
nfd-worker -key-file=/opt/nfd/worker.key -cert-file=/opt/nfd/worker.crt -ca-file=/opt/nfd/ca.crt\n
\n\n

-kubeconfig

\n\n

The -kubeconfig flag specifies the kubeconfig to use for connecting to the\nKubernetes API server. It is needed for manipulating\nNodeFeature objects. An empty value\n(which is also the default) implies in-cluster kubeconfig.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-worker -kubeconfig ${HOME}/.kube/config\n
\n\n

-server-name-override

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -server-name-override flag specifies the common name (CN) which to\nexpect from the nfd-master TLS certificate. This flag is mostly intended for\ndevelopment and debugging purposes.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-worker -server-name-override=localhost\n
\n\n

-feature-sources

\n\n

The -feature-sources flag specifies a comma-separated list of enabled feature\nsources. A special value all enables all sources. Prefixing a source name\nwith - indicates that the source will be disabled instead - this is only\nmeaningful when used in conjunction with all. This command line flag allows\ncompletely disabling the feature detection so that neither standard feature\nlabels are generated nor the raw feature data is available for custom rule\nprocessing. Consider using the core.featureSources config file option,\ninstead, allowing dynamic configurability.

\n\n
\n

NOTE: This flag takes precedence over the core.featureSources\nconfiguration file option.

\n
\n\n

Default: all

\n\n

Example:

\n\n
nfd-worker -feature-sources=all,-pci\n
\n\n

-label-sources

\n\n

The -label-sources flag specifies a comma-separated list of enabled label\nsources. A special value all enables all sources. Prefixing a source name\nwith - indicates that the source will be disabled instead - this is only\nmeaningful when used in conjunction with all. Consider using the\ncore.labelSources config file option, instead, allowing dynamic\nconfigurability.

\n\n
\n

NOTE: This flag takes precedence over the core.labelSources\nconfiguration file option.

\n
\n\n

Default: all

\n\n

Example:

\n\n
nfd-worker -label-sources=kernel,system,local\n
\n\n

-metrics

\n\n

The -metrics flag specifies the port on which to expose\nPrometheus metrics. Setting this to 0 disables the\nmetrics server on nfd-worker.

\n\n

Default: 8081

\n\n

Example:

\n\n
nfd-worker -metrics=12345\n
\n\n

-no-publish

\n\n

The -no-publish flag disables all communication with the nfd-master and the\nKubernetes API server. It is effectively a “dry-run” flag for nfd-worker.\nNFD-Worker runs feature detection normally, but no labeling requests are sent\nto nfd-master and no NodeFeature objects are created or updated in the API\nserver.

\n\n
\n

NOTE: This flag takes precedence over the\ncore.noPublish\nconfiguration file option.

\n
\n\n

Default: false

\n\n

Example:

\n\n
nfd-worker -no-publish\n
\n\n

-oneshot

\n\n

The -oneshot flag causes nfd-worker to exit after one pass of feature\ndetection.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-worker -oneshot -no-publish\n
\n\n

Logging

\n\n

The following logging-related flags are inherited from the\nklog package.

\n\n
\n

NOTE: The logger setup can also be specified via the core.klog\nconfiguration file options. However, the command line flags take precedence\nover any corresponding config file options specified.

\n
\n\n

-add_dir_header

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

-alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

-log_backtrace_at

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

-log_dir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

-log_file

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

-log_file_max_size

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

-logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

-skip_headers

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

-skip_log_headers

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

-stderrthreshold

\n\n

Logs at or above this threshold go to stderr.

\n\n

Default: 2

\n\n

-v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

-vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n","dir":"/reference/","name":"worker-commandline-reference.md","path":"reference/worker-commandline-reference.md","url":"/reference/worker-commandline-reference.html"},{"title":"Using node labels","layout":"default","sort":2,"content":"

Using node labels

\n\n
\n\n

Nodes with specific features can be targeted using the nodeSelector field. The\nfollowing example shows how to target nodes with Intel TurboBoost enabled.

\n\n
apiVersion: v1\nkind: Pod\nmetadata:\n  labels:\n    env: test\n  name: golang-test\nspec:\n  containers:\n    - image: golang\n      name: go1\n  nodeSelector:\n    feature.node.kubernetes.io/cpu-pstate.turbo: 'true'\n
\n\n

For more details on targeting nodes, see\nnode selection.

\n","dir":"/usage/","name":"using-labels.md","path":"usage/using-labels.md","url":"/usage/using-labels.html"},{"title":"Helm","layout":"default","sort":3,"content":"

Deployment with Helm

\n\n

Table of contents

\n\n
    \n
  1. Prerequisites
  2. \n
  3. Deployment
  4. \n
  5. Configuration
  6. \n
  7. Upgrading the chart
      \n
    1. From v0.7 and older
    2. \n
    3. From v0.8 - v0.11
    4. \n
    5. From v0.12 - v0.13
    6. \n
    7. From v0.14+
    8. \n
    \n
  8. \n
  9. Uninstalling the chart
  10. \n
  11. Chart parameters
      \n
    1. General parameters
    2. \n
    3. Master pod parameters
    4. \n
    5. Worker pod parameters
    6. \n
    7. Topology updater parameters
    8. \n
    9. Garbage collector parameters
    10. \n
    \n
  12. \n
\n\n
\n\n

Node Feature Discovery provides a Helm chart to manage its deployment.

\n\n
\n

NOTE: NFD is not ideal for other Helm charts to depend on as that may\nresult in multiple parallel NFD deployments in the same cluster which is not\nfully supported by the NFD Helm chart.

\n
\n\n

Prerequisites

\n\n

Helm package manager should be installed.

\n\n

Deployment

\n\n

To install the latest stable version:

\n\n
export NFD_NS=node-feature-discovery\nhelm repo add nfd https://kubernetes-sigs.github.io/node-feature-discovery/charts\nhelm repo update\nhelm install nfd/node-feature-discovery --namespace $NFD_NS --create-namespace --generate-name\n
\n\n

To install the latest development version you need to clone the NFD Git\nrepository and install from there.

\n\n
git clone https://github.com/kubernetes-sigs/node-feature-discovery/\ncd node-feature-discovery/deployment/helm\nexport NFD_NS=node-feature-discovery\nhelm install node-feature-discovery ./node-feature-discovery/ --namespace $NFD_NS --create-namespace\n
\n\n

See the configuration section below for instructions how to\nalter the deployment parameters.

\n\n

Configuration

\n\n

You can override values from values.yaml and provide a file with custom values:

\n\n
export NFD_NS=node-feature-discovery\nhelm install nfd/node-feature-discovery -f <path/to/custom/values.yaml> --namespace $NFD_NS --create-namespace\n
\n\n

To specify each parameter separately you can provide them to helm install command:

\n\n
export NFD_NS=node-feature-discovery\nhelm install nfd/node-feature-discovery --set nameOverride=NFDinstance --set master.replicaCount=2 --namespace $NFD_NS --create-namespace\n
\n\n

Upgrading the chart

\n\n

To upgrade the node-feature-discovery deployment to v0.16.3 via Helm.

\n\n

From v0.7 and older

\n\n

Please see the uninstallation guide.\nAnd then follow the standard deployment instructions.

\n\n

From v0.8 - v0.11

\n\n

Helm deployment of NFD was introduced in v0.8.0.

\n\n
export NFD_NS=node-feature-discovery\n# Uninstall the old NFD deployment\nhelm uninstall node-feature-discovery --namespace $NFD_NS\n# Update Helm repository\nhelm repo update\n# Install the new NFD deployment\nhelm upgrade --install node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=false\n# Wait for NFD Worker to be ready\nkubectl wait --timeout=-1s --for=condition=ready pod -l app.kubernetes.io/name=node-feature-discovery --namespace $NFD_NS\n# Enable the NFD Master\nhelm upgrade --install node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=true\n
\n\n

From v0.12 - v0.13

\n\n

In v0.12 the NodeFeature CRD was introduced as experimental.\nThe API was not enabled by default.

\n\n
export NFD_NS=node-feature-discovery\n# Update Helm repository\nhelm repo update\n# Install and upgrade CRD's\nkubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/master/deployment/base/nfd-crds/nfd-api-crds.yaml\n# Install the new NFD deployment\nhelm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=false\n# Wait for NFD Worker to be ready\nkubectl wait --timeout=-1s --for=condition=ready pod -l app.kubernetes.io/name=node-feature-discovery --namespace $NFD_NS\n# Enable the NFD Master\nhelm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=true\n
\n\n

From v0.14+

\n\n

As of version v0.14 the Helm chart is the primary deployment method for NFD,\nand the CRD NodeFeature is enabled by default.

\n\n
export NFD_NS=node-feature-discovery\n# Update Helm repository\nhelm repo update\n# Install and upgrade CRD's\nkubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.3/deployment/base/nfd-crds/nfd-api-crds.yaml\n# Install the new NFD deployment\nhelm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS\n
\n\n

Uninstalling the chart

\n\n

To uninstall the node-feature-discovery deployment:

\n\n
export NFD_NS=node-feature-discovery\nhelm uninstall node-feature-discovery --namespace $NFD_NS\n
\n\n

The command removes all the Kubernetes components associated with the chart and\ndeletes the release. It also runs a post-delete hook that cleans up the nodes\nof all labels, annotations, taints and extended resources that were created by\nNFD.

\n\n

Chart parameters

\n\n

To tailor the deployment of the Node Feature Discovery to your needs following\nChart parameters are available.

\n\n

General parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultDescription
image.repositorystringregistry.k8s.io/nfd/node-feature-discoveryNFD image repository
image.tagstringv0.16.3NFD image tag
image.pullPolicystringAlwaysImage pull policy
imagePullSecretslist[]ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info
nameOverridestring Override the name of the chart
fullnameOverridestring Override a default fully qualified app name
tls.enableboolfalseSpecifies whether to use TLS for communications between components. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManagerboolfalseIf enabled, requires cert-manager to be installed and will automatically create the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerNamestring If specified, it will use a pre-existing issuer instead for the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerKindstring Specifies on what kind of issuer is used, can be either ClusterIssuer or Issuer (default). Requires tls.certManager.certManagerCertificate.issuerName to be set. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
featureGates.NodeFeatureAPIbooltrueEnable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication.
featureGates.NodeFeatureGroupAPIboolfalseEnable the NodeFeatureGroup CRD API.
featureGates.DisableAutoPrefixboolfalseEnable DisableAutoPrefix feature gate. Disables automatic prefixing of unprefixed labels, annotations and extended resources.
enableNodeFeatureApibooltrueEnable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication. DEPRECATED: will be removed in NFD v0.17, use featureGates.NodeFeatureAPI instead.
prometheus.enableboolfalseSpecifies whether to expose metrics using prometheus operator
prometheus.labelsdict{}Specifies labels for use with the prometheus operator to control how it is selected
prometheus.scrapeIntervalstring10sSpecifies the interval by which metrics are scraped
priorityClassNamestring The name of the PriorityClass to be used for the NFD pods.
\n\n

Metrics are configured to be exposed using prometheus operator API’s by\ndefault. If you want to expose metrics using the prometheus operator\nAPI’s you need to install the prometheus operator in your cluster.

\n\n

Master pod parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
master.*dict NFD master deployment configuration
master.enablebooltrueSpecifies whether nfd-master should be deployed
master.portinteger Specifies the TCP port that nfd-master listens for incoming requests. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.metricsPortinteger8081Port on which to expose metrics from components to prometheus operator
master.instancestring Instance name. Used to separate annotation namespaces for multiple parallel deployments
master.resyncPeriodstring NFD API controller resync period.
master.extraLabelNsarray[]List of allowed extra label namespaces
master.resourceLabelsarray[]List of labels to be registered as extended resources
master.enableTaintsboolfalseSpecifies whether to enable or disable node tainting
master.crdControllerboolnullSpecifies whether the NFD CRD API controller is enabled. If not set, controller will be enabled if master.instance is empty.
master.featureRulesControllerboolnullDEPRECATED: use master.crdController instead
master.replicaCountinteger1Number of desired pods. This is a pointer to distinguish between explicit zero and not specified
master.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
master.securityContextdict{}Container security settings
master.serviceAccount.createbooltrueSpecifies whether a service account should be created
master.serviceAccount.annotationsdict{}Annotations to add to the service account
master.serviceAccount.namestring The name of the service account to use. If not set and create is true, a name is generated using the fullname template
master.rbac.createbooltrueSpecifies whether to create RBAC configuration for nfd-master
master.service.typestringClusterIPNFD master service type. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.service.portinteger8080NFD master service port. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.resources.limitsdict{memory: 4Gi}NFD master pod resources limits
master.resources.requestsdict{cpu: 100m, memory: 128Mi}NFD master pod resources requests. You may want to use the same value for requests.memory and limits.memory. The “requests” value affects scheduling to accommodate pods on nodes. If there is a large difference between “requests” and “limits” and nodes experience memory pressure, the kernel may invoke the OOM Killer, even if the memory does not exceed the “limits” threshold. This can cause unexpected pod evictions. Memory cannot be compressed and once allocated to a pod, it can only be reclaimed by killing the pod. Natan Yellin 22/09/2022 that discusses this issue.
master.tolerationsdictScheduling to master node is disabledNFD master pod tolerations
master.annotationsdict{}NFD master pod annotations
master.affinitydict NFD master pod required node affinity
master.deploymentAnnotationsdict{}NFD master deployment annotations
master.nfdApiParallelisminteger10Specifies the maximum number of concurrent node updates.
master.configdict NFD master configuration
master.revisionHistoryLimitinteger Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit
master.livenessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:10}NFD master pod liveness probe
master.readinessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:5,”failureThreshold”: 10}NFD master pod readiness probe
\n\n

Worker pod parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
worker.*dict NFD worker daemonset configuration
worker.enablebooltrueSpecifies whether nfd-worker should be deployed
worker.metricsPort*int8081Port on which to expose metrics from components to prometheus operator
worker.configdict NFD worker configuration
worker.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
worker.securityContextdict{}Container security settings
worker.serviceAccount.createbooltrueSpecifies whether a service account for nfd-worker should be created
worker.serviceAccount.annotationsdict{}Annotations to add to the service account for nfd-worker
worker.serviceAccount.namestring The name of the service account to use for nfd-worker. If not set and create is true, a name is generated using the fullname template (suffixed with -worker)
worker.rbac.createbooltrueSpecifies whether to create RBAC configuration for nfd-worker
worker.mountUsrSrcboolfalseSpecifies whether to allow users to mount the hostpath /user/src. Does not work on systems without /usr/src AND a read-only /usr
worker.resources.limitsdict{memory: 512Mi}NFD worker pod resources limits
worker.resources.requestsdict{cpu: 5m, memory: 64Mi}NFD worker pod resources requests
worker.nodeSelectordict{}NFD worker pod node selector
worker.tolerationsdict{}NFD worker pod node tolerations
worker.priorityClassNamestring NFD worker pod priority class
worker.annotationsdict{}NFD worker pod annotations
worker.daemonsetAnnotationsdict{}NFD worker daemonset annotations
worker.revisionHistoryLimitinteger Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
worker.livenessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:10}NFD worker pod liveness probe
worker.readinessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:5,”failureThreshold”: 10}NFD worker pod readiness probe
\n\n

Topology updater parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
topologyUpdater.*dict NFD Topology Updater configuration
topologyUpdater.enableboolfalseSpecifies whether the NFD Topology Updater should be created
topologyUpdater.createCRDsboolfalseSpecifies whether the NFD Topology Updater CRDs should be created
topologyUpdater.serviceAccount.createbooltrueSpecifies whether the service account for topology updater should be created
topologyUpdater.serviceAccount.annotationsdict{}Annotations to add to the service account for topology updater
topologyUpdater.serviceAccount.namestring The name of the service account for topology updater to use. If not set and create is true, a name is generated using the fullname template and -topology-updater suffix
topologyUpdater.rbac.createbooltrueSpecifies whether to create RBAC configuration for topology updater
topologyUpdater.metricsPortinteger8081Port on which to expose prometheus metrics
topologyUpdater.kubeletConfigPathstring””Specifies the kubelet config host path
topologyUpdater.kubeletPodResourcesSockPathstring””Specifies the kubelet sock path to read pod resources
topologyUpdater.updateIntervalstring60sTime to sleep between CR updates. Non-positive value implies no CR update.
topologyUpdater.watchNamespacestring*Namespace to watch pods, * for all namespaces
topologyUpdater.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
topologyUpdater.securityContextdict{}Container security settings
topologyUpdater.resources.limitsdict{memory: 60Mi}NFD Topology Updater pod resources limits
topologyUpdater.resources.requestsdict{cpu: 50m, memory: 40Mi}NFD Topology Updater pod resources requests
topologyUpdater.nodeSelectordict{}Topology updater pod node selector
topologyUpdater.tolerationsdict{}Topology updater pod node tolerations
topologyUpdater.annotationsdict{}Topology updater pod annotations
topologyUpdater.daemonsetAnnotationsdict{}Topology updater daemonset annotations
topologyUpdater.affinitydict{}Topology updater pod affinity
topologyUpdater.configdict configuration
topologyUpdater.podSetFingerprintbooltrueEnables compute and report of pod fingerprint in NRT objects.
topologyUpdater.kubeletStateDirstring/var/lib/kubeletSpecifies kubelet state directory path for watching state and checkpoint files. Empty value disables kubelet state tracking.
topologyUpdater.revisionHistoryLimitinteger Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
topologyUpdater.livenessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:10}Topology updater pod liveness probe
topologyUpdater.readinessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:5,”failureThreshold”: 10}Topology updater pod readiness probe
\n\n

Garbage collector parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
gc.*dict NFD Garbage Collector configuration
gc.enablebooltrueSpecifies whether the NFD Garbage Collector should be created
gc.serviceAccount.createbooltrueSpecifies whether the service account for garbage collector should be created
gc.serviceAccount.annotationsdict{}Annotations to add to the service account for garbage collector
gc.serviceAccount.namestring The name of the service account for garbage collector to use. If not set and create is true, a name is generated using the fullname template and -gc suffix
gc.rbac.createbooltrueSpecifies whether to create RBAC configuration for garbage collector
gc.intervalstring1hTime between periodic garbage collector runs
gc.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
gc.resources.limitsdict{memory: 1Gi}NFD Garbage Collector pod resources limits
gc.resources.requestsdict{cpu: 10m, memory: 128Mi}NFD Garbage Collector pod resources requests
gc.metricsPortinteger8081Port on which to serve Prometheus metrics
gc.nodeSelectordict{}Garbage collector pod node selector
gc.tolerationsdict{}Garbage collector pod node tolerations
gc.annotationsdict{}Garbage collector pod annotations
gc.deploymentAnnotationsdict{}Garbage collector deployment annotations
gc.affinitydict{}Garbage collector pod affinity
gc.revisionHistoryLimitinteger Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit
\n\n\n","dir":"/deployment/","name":"helm.md","path":"deployment/helm.md","url":"/deployment/helm.html"},{"title":"Master config reference","layout":"default","sort":3,"content":"

Configuration file reference of nfd-master

\n\n

Table of contents

\n\n
    \n
  1. noPublish
  2. \n
  3. extraLabelNs
  4. \n
  5. denyLabelNs
  6. \n
  7. autoDefaultNs
  8. \n
  9. resourceLabels
  10. \n
  11. enableTaints
  12. \n
  13. labelWhiteList
  14. \n
  15. resyncPeriod
  16. \n
  17. leaderElection
      \n
    1. leaderElection.leaseDuration
    2. \n
    3. leaderElection.renewDeadline
    4. \n
    5. leaderElection.retryPeriod
    6. \n
    \n
  18. \n
  19. nfdApiParallelism
  20. \n
  21. klog
      \n
    1. klog.addDirHeader
    2. \n
    3. klog.alsologtostderr
    4. \n
    5. klog.logBacktraceAt
    6. \n
    7. klog.logDir
    8. \n
    9. klog.logFile
    10. \n
    11. klog.logFileMaxSize
    12. \n
    13. klog.logtostderr
    14. \n
    15. klog.skipHeaders
    16. \n
    17. klog.skipLogHeaders
    18. \n
    19. klog.stderrthreshold
    20. \n
    21. klog.v
    22. \n
    23. klog.vmodule
    24. \n
    \n
  22. \n
\n\n
\n\n

See the\nsample configuration file\nfor a full example configuration.

\n\n

noPublish

\n\n

noPublish option disables updates to the Node objects in the Kubernetes\nAPI server, making a “dry-run” flag for nfd-master. No Labels, Annotations, Taints\nor ExtendedResources of nodes are updated.

\n\n

Default: false

\n\n

Example:

\n\n
noPublish: true\n
\n\n

extraLabelNs

\n

extraLabelNs specifies a list of allowed feature\nlabel namespaces. This option can be used to allow\nother vendor or application specific namespaces for custom labels from the\nlocal and custom feature sources, even though these labels were denied using\nthe denyLabelNs parameter.

\n\n

The same namespace control and this option applies to Extended Resources (created\nwith resourceLabels), too.

\n\n

Default: empty

\n\n

Example:

\n\n
extraLabelNs: [\"added.ns.io\",\"added.kubernets.io\"]\n
\n\n

denyLabelNs

\n

denyLabelNs specifies a list of excluded\nlabel namespaces. By default, nfd-master allows creating labels in all\nnamespaces, excluding kubernetes.io namespace and its sub-namespaces\n(i.e. *.kubernetes.io). However, you should note that\nkubernetes.io and its sub-namespaces are always denied.\nThis option can be used to exclude some vendors or application specific\nnamespaces.

\n\n

Default: empty

\n\n

Example:

\n\n
denyLabelNs: [\"denied.ns.io\",\"denied.kubernetes.io\"]\n
\n\n

autoDefaultNs

\n\n

DEPRECATED: Will be removed in NFD v0.17. Use the\nDisableAutoPrefix feature gate instead.

\n\n

The autoDefaultNs option controls the automatic prefixing of names. When set\nto true (the default in NFD version v0.16) nfd-master\nautomatically adds the default feature.node.kubernetes.io/ prefix to\nunprefixed labels, annotations and extended resources - this is also the\ndefault behavior in NFD v0.15 and earlier. When the option is set to false,\nno prefix will be prepended to unprefixed names, effectively causing them to be\nfiltered out (as NFD does not allow unprefixed names of labels, annotations or\nextended resources). The default will be changed to false in a future\nrelease.

\n\n

For example, with the autoDefaultNs set to true, a NodeFeatureRule with

\n\n
  labels:\n    foo: bar\n
\n\n

Will turn into feature.node.kubernetes.io/foo=bar node label. With\nautoDefaultNs set to false, no prefix is added and the label will be\nfiltered out.

\n\n

Note that taint keys are not affected by this option.

\n\n

Default: true

\n\n

Example:

\n\n
autoDefaultNs: false\n
\n\n

resourceLabels

\n\n

DEPRECATED: NodeFeatureRule\nshould be used for managing extended resources in NFD.

\n\n

The resourceLabels option specifies a list of features to be\nadvertised as extended resources instead of labels. Features that have integer\nvalues can be published as Extended Resources by listing them in this option.

\n\n

Default: empty

\n\n

Example:

\n\n
resourceLabels: [\"vendor-1.com/feature-1\",\"vendor-2.io/feature-2\"]\n
\n\n

enableTaints

\n

enableTaints enables/disables node tainting feature of NFD.

\n\n

Default: false

\n\n

Example:

\n\n
enableTaints: true\n
\n\n

labelWhiteList

\n

labelWhiteList specifies a regular expression for filtering feature\nlabels based on their name. Each label must match against the given regular\nexpression or it will not be published.

\n\n
\n

** NOTE:** The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label namespace is\nomitted.

\n
\n\n

Default: empty

\n\n

Example:

\n\n
labelWhiteList: \"foo\"\n
\n\n

resyncPeriod

\n\n

The resyncPeriod option specifies the NFD API controller resync period.\nThe resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,\nthus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,\nextended resources and taints are in place).

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 1 hour.

\n\n

Example:

\n\n
resyncPeriod: 2h\n
\n\n

leaderElection

\n\n

The leaderElection section exposes configuration to tweak leader election.

\n\n

leaderElection.leaseDuration

\n\n

leaderElection.leaseDuration is the duration that non-leader candidates will\nwait to force acquire leadership. This is measured against time of\nlast observed ack.

\n\n

A client needs to wait a full LeaseDuration without observing a change to\nthe record before it can attempt to take over. When all clients are\nshutdown and a new set of clients are started with different names against\nthe same leader record, they must wait the full LeaseDuration before\nattempting to acquire the lease. Thus LeaseDuration should be as short as\npossible (within your tolerance for clock skew rate) to avoid a possible\nlong waits in the scenario.

\n\n

Default: 15 seconds.

\n\n

Example:

\n\n
leaderElection:\n  leaseDurtation: 15s\n
\n\n

leaderElection.renewDeadline

\n\n

leaderElection.renewDeadline is the duration that the acting master will retry\nrefreshing leadership before giving up.

\n\n

This value has to be lower than leaseDuration and greater than retryPeriod*1.2.

\n\n

Default: 10 seconds.

\n\n

Example:

\n\n
leaderElection:\n  renewDeadline: 10s\n
\n\n

leaderElection.retryPeriod

\n\n

leaderElection.retryPeriod is the duration the LeaderElector clients should wait\nbetween tries of actions.

\n\n

It has to be greater than 0.

\n\n

Default: 2 seconds.

\n\n

Example:

\n\n
leaderElection:\n  retryPeriod: 2s\n
\n\n

nfdApiParallelism

\n\n

The nfdApiParallelism option can be used to specify the maximum\nnumber of concurrent node updates.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 10

\n\n

Example:

\n\n
nfdApiParallelism: 1\n
\n\n

klog

\n\n

The following options specify the logger configuration. Most of which can be\ndynamically adjusted at run-time.

\n\n
\n

NOTE: The logger options can also be specified via command line flags\nwhich take precedence over any corresponding config file options.

\n
\n\n

klog.addDirHeader

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

klog.alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

klog.logBacktraceAt

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n\n

klog.logDir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

klog.logFile

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

klog.logFileMaxSize

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

Run-time configurable: no

\n\n

klog.logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

Run-time configurable: yes

\n\n

klog.skipHeaders

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

klog.skipLogHeaders

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

Run-time configurable: no

\n\n

klog.stderrthreshold

\n\n

Logs at or above this threshold go to stderr (default 2)

\n\n

Run-time configurable: yes

\n\n

klog.v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

Run-time configurable: yes

\n\n

klog.vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n","dir":"/reference/","name":"master-configuration-reference.md","path":"reference/master-configuration-reference.md","url":"/reference/master-configuration-reference.html"},{"title":"Usage","layout":"default","sort":3,"content":"

Usage

\n\n

Usage instructions.

\n","dir":"/usage/","name":"index.md","path":"usage/index.md","url":"/usage/"},{"title":"NFD-Master","layout":"default","sort":3,"content":"

NFD-Master

\n\n
\n\n

NFD-Master is responsible for connecting to the Kubernetes API server and\nupdating node objects. More specifically, it modifies node labels, taints and\nextended resources based on requests from nfd-workers and 3rd party extensions.

\n\n

NodeFeature controller

\n\n

The NodeFeature Controller uses NodeFeature objects as\nthe input for the NodeFeatureRule\nprocessing pipeline. In addition, any labels listed in the NodeFeature object\nare created on the node (note the allowed\nlabel namespaces are controlled).

\n\n

NodeFeatureRule controller

\n\n

NFD-Master acts as the controller for\nNodeFeatureRule objects.\nIt applies the rules specified in NodeFeatureRule objects on raw feature data\nand creates node labels accordingly. The feature data used as the input is\nreceived from nfd-worker instances through\nNodeFeature objects.

\n\n
\n

NOTE: when gRPC (DEPRECATED) is used for communicating\nthe features (by setting the flag -feature-gates NodeFeatureAPI=false on both\nnfd-master and nfd-worker, or via Helm values.featureGates.NodeFeatureAPI=false),\n(re-)labelling only happens when a request is received from nfd-worker.\nThat is, in practice rules are evaluated and labels for each node are created\non intervals specified by the\ncore.sleepInterval\nconfiguration option of nfd-worker instances. This means that modification or\ncreation of NodeFeatureRule objects does not instantly cause the node\nlabels to be updated. Instead, the changes only come visible in node labels\nas nfd-worker instances send their labelling requests. This limitation is not\npresent when gRPC interface is disabled\nand NodeFeature API is used.

\n
\n\n

Master configuration

\n\n

NFD-Master supports dynamic configuration through a configuration file. The\ndefault location is /etc/kubernetes/node-feature-discovery/nfd-master.conf,\nbut, this can be changed by specifying the-config command line flag.\nConfiguration file is re-read whenever it is modified which makes run-time\nre-configuration of nfd-master straightforward.

\n\n

Master configuration file is read inside the container, and thus, Volumes and\nVolumeMounts are needed to make your configuration available for NFD. The\npreferred method is to use a ConfigMap which provides easy deployment and\nre-configurability.

\n\n

The provided nfd-master deployment templates create an empty configmap and\nmount it inside the nfd-master containers. In kustomize deployments,\nconfiguration can be edited with:

\n\n
kubectl -n ${NFD_NS} edit configmap nfd-master-conf\n
\n\n

In Helm deployments,\nMaster pod parameter\nmaster.config can be used to edit the respective configuration.

\n\n

See\nnfd-master configuration file reference\nfor more details.\nThe (empty-by-default)\nexample config\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.

\n\n

Deployment notes

\n\n

NFD-Master runs as a deployment, by default\nit prefers running on the cluster’s master nodes but will run on worker\nnodes if no master nodes are found.

\n\n

For High Availability, you should increase the replica count of\nthe deployment object. You should also look into adding\ninter-pod\naffinity to prevent masters from running on the same node.\nHowever note that inter-pod affinity is costly and is not recommended\nin bigger clusters.

\n\n
\n

Note: When NFD-Master is intended to run with more than one replica,\nit is advised to use -enable-leader-election flag. This flag turns on\nleader election for NFD-Master and let only one replica to act on changes\nin NodeFeature and NodeFeatureRule objects.

\n
\n\n

If you have RBAC authorization enabled (as is the default e.g. with clusters\ninitialized with kubeadm) you need to configure the appropriate ClusterRoles,\nClusterRoleBindings and a ServiceAccount for NFD to create node\nlabels. The provided template will configure these for you.

\n","dir":"/usage/","name":"nfd-master.md","path":"usage/nfd-master.md","url":"/usage/nfd-master.html"},{"title":"NFD Operator","layout":"default","sort":4,"content":"

Deployment with NFD Operator

\n\n

Table of contents

\n\n
    \n
  1. Deployment
  2. \n
  3. Uninstallation
  4. \n
\n\n
\n\n

The Node Feature Discovery Operator automates installation,\nconfiguration and updates of NFD using a specific NodeFeatureDiscovery custom\nresource. This also provides good support for managing NFD as a dependency of\nother operators.

\n\n

Deployment

\n\n

Deployment using the\nNode Feature Discovery Operator\nis recommended to be done via\noperatorhub.io.

\n\n
    \n
  1. You need to have\nOLM\ninstalled. If you don’t, take a look at the\nlatest release\nfor detailed instructions.
  2. \n
  3. \n

    Install the operator:

    \n\n
    kubectl create -f https://operatorhub.io/install/nfd-operator.yaml\n
    \n
  4. \n
  5. \n

    Create NodeFeatureDiscovery object (in nfd namespace here):

    \n\n
    cat << EOF | kubectl apply -f -\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: nfd\n---\napiVersion: nfd.kubernetes.io/v1\nkind: NodeFeatureDiscovery\nmetadata:\n  name: my-nfd-deployment\n  namespace: nfd\nspec:\n  operand:\n    image: registry.k8s.io/nfd/node-feature-discovery:v0.16.3\n    imagePullPolicy: IfNotPresent\nEOF\n
    \n
  6. \n
\n\n

Uninstallation

\n\n

If you followed the deployment instructions above you can uninstall NFD with:

\n\n
kubectl -n nfd delete NodeFeatureDiscovery my-nfd-deployment\n
\n\n

Optionally, you can also remove the namespace:

\n\n
kubectl delete ns nfd\n
\n\n

See the node-feature-discovery-operator and OLM project\ndocumentation for instructions for uninstalling the operator and operator\nlifecycle manager, respectively.

\n\n\n","dir":"/deployment/","name":"operator.md","path":"deployment/operator.md","url":"/deployment/operator.html"},{"title":"Reference","layout":"default","sort":4,"content":"

Reference

\n\n

Command line and configuration reference.

\n","dir":"/reference/","name":"index.md","path":"reference/index.md","url":"/reference/"},{"title":"Worker config reference","layout":"default","sort":4,"content":"

Configuration file reference of nfd-worker

\n\n

Table of contents

\n\n
    \n
  1. core
      \n
    1. core.sleepInterval
    2. \n
    3. core.featureSources
    4. \n
    5. core.labelSources
    6. \n
    7. core.sources
    8. \n
    9. core.labelWhiteList
    10. \n
    11. core.noPublish
    12. \n
    13. core.klog
    14. \n
    \n
  2. \n
  3. sources
      \n
    1. sources.cpu
    2. \n
    3. sources.kernel
    4. \n
    5. sources.local
    6. \n
    7. sources.local.hooksEnabled
    8. \n
    9. sources.pci
    10. \n
    11. sources.usb
    12. \n
    13. sources.custom
    14. \n
    \n
  4. \n
\n\n
\n\n

See the\nsample configuration file\nfor a full example configuration.

\n\n

core

\n\n

The core section contains common configuration settings that are not specific\nto any particular feature source.

\n\n

core.sleepInterval

\n\n

core.sleepInterval specifies the interval between consecutive passes of\nfeature (re-)detection, and thus also the interval between node re-labeling. A\nnon-positive value implies infinite sleep interval, i.e. no re-detection or\nre-labeling is done.

\n\n

Default: 60s

\n\n

Example:

\n\n
core:\n  sleepInterval: 60s\n
\n\n

core.featureSources

\n\n

core.featureSources specifies the list of enabled feature sources. A special\nvalue all enables all sources. Prefixing a source name with - indicates\nthat the source will be disabled instead - this is only meaningful when used in\nconjunction with all. This option allows completely disabling the feature\ndetection so that neither standard feature labels are generated nor the raw\nfeature data is available for custom rule processing.

\n\n

Default: [all]

\n\n

Example:

\n\n
core:\n  # Enable all but cpu and local sources\n  featureSources:\n    - \"all\"\n    - \"-cpu\"\n    - \"-local\"\n
\n\n
core:\n  # Enable only cpu and local sources\n  featureSources:\n    - \"cpu\"\n    - \"local\"\n
\n\n

core.labelSources

\n\n

core.labelSources specifies the list of enabled label sources. A special\nvalue all enables all sources. Prefixing a source name with - indicates\nthat the source will be disabled instead - this is only meaningful when used in\nconjunction with all. This configuration option affects the generation of\nnode labels but not the actual discovery of the underlying feature data that is\nused e.g. in custom/NodeFeatureRule rules.

\n\n
\n

NOTE: Overridden by the -label-sources command line flag and the\ncore.sources configurations option (if either of them is specified).

\n
\n\n

Default: [all]

\n\n

Example:

\n\n
core:\n  # Enable all but cpu and system sources\n  labelSources:\n    - \"all\"\n    - \"-cpu\"\n    - \"-system\"\n
\n\n
core:\n  # Enable only cpu and system sources\n  labelSources:\n    - \"cpu\"\n    - \"system\"\n
\n\n

core.sources

\n\n

DEPRECATED: use core.labelSources instead.

\n\n
\n

NOTE: core.sources takes precedence over the core.labelSources\nconfiguration file option.

\n
\n\n

core.labelWhiteList

\n\n

core.labelWhiteList specifies a regular expression for filtering feature\nlabels based on the label name. Non-matching labels are not published.

\n\n
\n

NOTE: The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label prefix (or\nnamespace) is omitted.

\n
\n\n

Default: null

\n\n

Example:

\n\n
core:\n  labelWhiteList: '^cpu-cpuid'\n
\n\n

core.noPublish

\n\n

Setting core.noPublish to true disables all communication with the\nnfd-master and the Kubernetes API server. It is effectively a “dry-run” option.\nNFD-Worker runs feature detection normally, but no labeling requests are sent\nto nfd-master and no NodeFeature\nobjects are created or updated in the API server.

\n\n
\n

NOTE: Overridden by the\n-no-publish\ncommand line flag (if specified).

\n
\n\n

Default: false

\n\n

Example:

\n\n
core:\n  noPublish: true\n
\n\n

core.klog

\n\n

The following options specify the logger configuration. Most of which can be\ndynamically adjusted at run-time.

\n\n
\n

NOTE: The logger options can also be specified via command line flags\nwhich take precedence over any corresponding config file options.

\n
\n\n

core.klog.addDirHeader

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

core.klog.alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

core.klog.logBacktraceAt

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n\n

core.klog.logDir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

core.klog.logFile

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

core.klog.logFileMaxSize

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

Run-time configurable: no

\n\n

core.klog.logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

Run-time configurable: yes

\n\n

core.klog.skipHeaders

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

core.klog.skipLogHeaders

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

Run-time configurable: no

\n\n

core.klog.stderrthreshold

\n\n

Logs at or above this threshold go to stderr (default 2)

\n\n

Run-time configurable: yes

\n\n

core.klog.v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

Run-time configurable: yes

\n\n

core.klog.vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n\n

sources

\n\n

The sources section contains feature source specific configuration parameters.

\n\n

sources.cpu

\n\n

sources.cpu.cpuid

\n\n
sources.cpu.cpuid.attributeBlacklist
\n\n

Prevent publishing cpuid features listed in this option.

\n\n
\n

NOTE: overridden by sources.cpu.cpuid.attributeWhitelist (if specified)

\n
\n\n

Default: [AVX10, BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT,\nNX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SGXLC, SSE, SSE2, SSE3, SSE4.1,\nSSE4.2, SSSE3, TDX_GUEST]

\n\n

Example:

\n\n
sources:\n  cpu:\n    cpuid:\n      attributeBlacklist: [MMX, MMXEXT]\n
\n\n
sources.cpu.cpuid.attributeWhitelist
\n\n

Only publish the cpuid features listed in this option.

\n\n
\n

NOTE: takes precedence over sources.cpu.cpuid.attributeBlacklist

\n
\n\n

Default: empty

\n\n

Example:

\n\n
sources:\n  cpu:\n    cpuid:\n      attributeWhitelist: [AVX512BW, AVX512CD, AVX512DQ, AVX512F, AVX512VL]\n
\n\n

sources.kernel

\n\n

sources.kernel.kconfigFile

\n\n

Path of the kernel config file. If empty, NFD runs a search in the well-known\nstandard locations.

\n\n

Default: empty

\n\n

Example:

\n\n
sources:\n  kernel:\n    kconfigFile: \"/path/to/kconfig\"\n
\n\n

sources.kernel.configOpts

\n\n

Kernel configuration options to publish as feature labels.

\n\n

Default: [NO_HZ, NO_HZ_IDLE, NO_HZ_FULL, PREEMPT]

\n\n

Example:

\n\n
sources:\n  kernel:\n    configOpts: [NO_HZ, X86, DMI]\n
\n\n

sources.local

\n\n

sources.local.hooksEnabled

\n\n

DEPRECATED: Hooks are DEPRECATED since v0.12.0 release and support (and\nthis configuration option) will be removed in NFD v0.17. Use\nfeature files instead.

\n\n

Configuration option to disable/enable hooks execution. Disabled by default.

\n\n
\n

NOTE: The default NFD container image only supports statically linked\nbinaries. Use the full image variant\nfor a slightly more extensive environment that additionally supports bash and\nperl runtimes.

\n
\n\n

GitHub tracking issue:\nDrop support for hooks (#856).

\n\n

Default: false

\n\n

Example:

\n\n
sources:\n  local:\n    hooksEnabled: true\n
\n\n

sources.pci

\n\n

sources.pci.deviceClassWhitelist

\n\n

List of PCI device class IDs for which to\npublish a label. Can be specified as a main class only (e.g. 03) or full\nclass-subclass combination (e.g. 0300) - the former implies that all\nsubclasses are accepted. The format of the labels can be further configured\nwith deviceLabelFields.

\n\n

Default: [\"03\", \"0b40\", \"12\"]

\n\n

Example:

\n\n
sources:\n  pci:\n    deviceClassWhitelist: [\"0200\", \"03\"]\n
\n\n

sources.pci.deviceLabelFields

\n\n

The set of PCI ID fields to use when constructing the name of the feature\nlabel. Valid fields are class, vendor, device, subsystem_vendor and\nsubsystem_device.

\n\n

Default: [class, vendor]

\n\n

Example:

\n\n
sources:\n  pci:\n    deviceLabelFields: [class, vendor, device]\n
\n\n

With the example config above NFD would publish labels like:\nfeature.node.kubernetes.io/pci-<class-id>_<vendor-id>_<device-id>.present=true

\n\n

sources.usb

\n\n

sources.usb.deviceClassWhitelist

\n\n

List of USB device class IDs for\nwhich to publish a feature label. The format of the labels can be further\nconfigured with deviceLabelFields.

\n\n

Default: [\"0e\", \"ef\", \"fe\", \"ff\"]

\n\n

Example:

\n\n
sources:\n  usb:\n    deviceClassWhitelist: [\"ef\", \"ff\"]\n
\n\n

sources.usb.deviceLabelFields

\n\n

The set of USB ID fields from which to compose the name of the feature label.\nValid fields are class, vendor, device and serial.

\n\n

Default: [class, vendor, device]

\n\n

Example:

\n\n
sources:\n  pci:\n    deviceLabelFields: [class, vendor]\n
\n\n

With the example config above NFD would publish labels like:\nfeature.node.kubernetes.io/usb-<class-id>_<vendor-id>.present=true

\n\n

sources.custom

\n\n

List of rules to process in the custom feature source to create user-specific\nlabels. Refer to the documentation of the\ncustom feature source for\ndetails of the available rules and their configuration.

\n\n

Default: empty

\n\n

Example:

\n\n
sources:\n  custom:\n    - name: \"my custom rule\"\n      labels:\n        my-custom-feature: \"true\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            e1000e: {op: Exists}\n        - feature: pci.device\n          matchExpressions:\n            class: {op: In, value: [\"0200\"]}\n            vendor: {op: In, value: [\"8086\"]}\n
\n","dir":"/reference/","name":"worker-configuration-reference.md","path":"reference/worker-configuration-reference.md","url":"/reference/worker-configuration-reference.html"},{"title":"NFD-Worker","layout":"default","sort":4,"content":"

NFD-Worker

\n\n
\n\n

NFD-Worker is preferably run as a Kubernetes DaemonSet. This assures\nre-labeling on regular intervals capturing changes in the system configuration\nand makes sure that new nodes are labeled as they are added to the cluster.\nWorker connects to the nfd-master service to advertise hardware features.

\n\n

When run as a daemonset, nodes are re-labeled at an default interval of 60s.\nThis can be changed by using the\ncore.sleepInterval\nconfig option.

\n\n

The worker configuration file is watched and re-read on every change which\nprovides a mechanism of dynamic run-time reconfiguration. See\nworker configuration for more details.

\n\n

Worker configuration

\n\n

NFD-Worker supports dynamic configuration through a configuration file. The\ndefault location is /etc/kubernetes/node-feature-discovery/nfd-worker.conf,\nbut, this can be changed by specifying the-config command line flag.\nConfiguration file is re-read whenever it is modified which makes run-time\nre-configuration of nfd-worker straightforward.

\n\n

Worker configuration file is read inside the container, and thus, Volumes and\nVolumeMounts are needed to make your configuration available for NFD. The\npreferred method is to use a ConfigMap which provides easy deployment and\nre-configurability.

\n\n

The provided nfd-worker deployment templates create an empty configmap and\nmount it inside the nfd-worker containers. In kustomize deployments,\nconfiguration can be edited with:

\n\n
kubectl -n ${NFD_NS} edit configmap nfd-worker-conf\n
\n\n

In Helm deployments,\nWorker pod parameter\nworker.config can be used to edit the respective configuration.

\n\n

See\nnfd-worker configuration file reference\nfor more details.\nThe (empty-by-default)\nexample config\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.

\n\n

Configuration options can also be specified via the -options command line\nflag, in which case no mounts need to be used. The same format as in the config\nfile must be used, i.e. JSON (or YAML). For example:

\n\n
-options='{\"sources\": { \"pci\": { \"deviceClassWhitelist\": [\"12\"] } } }'\n
\n\n

Configuration options specified from the command line will override those read\nfrom the config file.

\n","dir":"/usage/","name":"nfd-worker.md","path":"usage/nfd-worker.md","url":"/usage/nfd-worker.html"},{"title":"TLS authentication","layout":"default","sort":5,"content":"

Communication security with TLS

\n\n

Table of contents

\n\n
    \n
  1. Automated TLS certificate management using cert-manager
  2. \n
  3. Manual TLS certificate management
  4. \n
\n\n
\n\n
\n

DEPRECATED: this section only applies when the gRPC API is used, i.e.\nwhen the NodeFeature API is disabled (via the -feature-gates\nNodeFeatureAPI=false flag) on both nfd-master and nfd-worker. The gRPC API\nis deprecated and will be removed in a future release.

\n
\n\n

NFD supports mutual TLS authentication between the nfd-master and nfd-worker\ninstances. That is, nfd-worker and nfd-master both verify that the other end\npresents a valid certificate.

\n\n

TLS authentication is enabled by specifying -ca-file, -key-file and\n-cert-file args, on both the nfd-master and nfd-worker instances. The\ntemplate specs provided with NFD contain (commented out) example configuration\nfor enabling TLS authentication.

\n\n

The Common Name (CN) of the nfd-master certificate must match the DNS name of\nthe nfd-master Service of the cluster. By default, nfd-master only check that\nthe nfd-worker has been signed by the specified root certificate (-ca-file).

\n\n

Additional hardening can be enabled by specifying -verify-node-name in\nnfd-master args, in which case nfd-master verifies that the NodeName presented\nby nfd-worker matches the Common Name (CN) or a Subject Alternative Name (SAN)\nof its certificate.

\n\n

Automated TLS certificate management using cert-manager

\n\n

cert-manager can be used to automate certificate\nmanagement between nfd-master and the nfd-worker pods.

\n\n

The NFD source code repository contains an example kustomize overlay and helm\nchart that can be used to deploy NFD with cert-manager supplied certificates\nenabled.

\n\n

To install cert-manager itself, you can run:

\n\n
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml\n
\n\n

Alternatively, you can refer to cert-manager documentation for other\ninstallation methods such as the Helm chart they provide.

\n\n

When using the Helm chart to deploy NFD, override values.yaml to enable both the\ntls.enabled and tls.certManager options. Note that if you do not enable\ntls.certManager, helm will successfully install the application, but\ndeployment will wait until certificates are manually created, as demonstrated\nbelow.

\n\n

See the sample installation commands in the Helm Deployment\nand Configuration sections above for how to either override\nindividual values, or provide a yaml file with which to override default\nvalues.

\n\n

Manual TLS certificate management

\n\n

If you do not with to make use of cert-manager, the certificates can be\nmanually created and stored as secrets within the NFD namespace.

\n\n

Create a CA certificate

\n\n
openssl req -x509 -newkey rsa:4096 -keyout ca.key -nodes \\\n        -subj \"/CN=nfd-ca\" -days 10000 -out ca.crt\n
\n\n

Create a common openssl config file.

\n\n
cat <<EOF > nfd-common.conf\n[ req ]\ndefault_bits = 4096\nprompt = no\ndefault_md = sha256\nreq_extensions = req_ext\ndistinguished_name = dn\n\n[ dn ]\nC = XX\nST = some-state\nL = some-city\nO = some-company\nOU = node-feature-discovery\n\n[ req_ext ]\nsubjectAltName = @alt_names\n\n[ v3_ext ]\nauthorityKeyIdentifier=keyid,issuer:always\nbasicConstraints=CA:FALSE\nkeyUsage=keyEncipherment,dataEncipherment\nextendedKeyUsage=serverAuth,clientAuth\nsubjectAltName=@alt_names\nEOF\n
\n\n

Now, create the nfd-master certificate.

\n\n
cat <<EOF > nfd-master.conf\n.include nfd-common.conf\n\n[ dn ]\nCN = nfd-master\n\n[ alt_names ]\nDNS.1 = nfd-master\nDNS.2 = nfd-master.node-feature-discovery.svc.cluster.local\nDNS.3 = localhost\nEOF\n\nopenssl req -new -newkey rsa:4096 -keyout nfd-master.key -nodes -out nfd-master.csr -config nfd-master.conf\n
\n\n

Create certificates for nfd-worker and nfd-topology-updater

\n\n
cat <<EOF > nfd-worker.conf\n.include nfd-common.conf\n\n[ dn ]\nCN = nfd-worker\n\n[ alt_names ]\nDNS.1 = nfd-worker\nDNS.2 = nfd-worker.node-feature-discovery.svc.cluster.local\nEOF\n\n# Config for topology updater is identical except for the DN and alt_names\nsed -e 's/worker/topology-updater/g' < nfd-worker.conf > nfd-topology-updater.conf\n\nopenssl req -new -newkey rsa:4096 -keyout nfd-worker.key -nodes -out nfd-worker.csr -config nfd-worker.conf\nopenssl req -new -newkey rsa:4096 -keyout nfd-topology-updater.key -nodes -out nfd-topology-updater.csr -config nfd-topology-updater.conf\n
\n\n

Now, sign the certificates with the CA created earlier.

\n\n
for cert in nfd-master nfd-worker nfd-topology-updater; do\n  echo signing $cert\n  openssl x509 -req -in $cert.csr -CA ca.crt -CAkey ca.key \\\n    -CAcreateserial -out $cert.crt -days 10000 \\\n    -extensions v3_ext -extfile $cert.conf\ndone\n
\n\n

Finally, turn these certificates into secrets.

\n\n
for cert in nfd-master nfd-worker nfd-topology-updater; do\n  echo creating secret for $cert in node-feature-discovery namespace\n  cat <<EOF | kubectl create -n node-feature-discovery -f -\n---\napiVersion: v1\nkind: Secret\ntype: kubernetes.io/tls\nmetadata:\n  name: ${cert}-cert\ndata:\n  ca.crt: $( cat ca.crt | base64 -w 0 )\n  tls.crt: $( cat $cert.crt | base64 -w 0 )\n  tls.key: $( cat $cert.key | base64 -w 0 )\nEOF\n\ndone\n
\n","dir":"/deployment/","name":"tls.md","path":"deployment/tls.md","url":"/deployment/tls.html"},{"title":"Developer guide","layout":"default","sort":5,"content":"

Developer guide

\n\n

Table of contents

\n\n
    \n
  1. Building from source
      \n
    1. Download the source code
    2. \n
    3. Docker build
    4. \n
    5. Docker multi-arch builds with buildx
    6. \n
    7. Deployment
    8. \n
    9. Building locally
    10. \n
    11. Customizing the build
    12. \n
    13. Testing
    14. \n
    \n
  2. \n
  3. Running locally
      \n
    1. NFD-Master
    2. \n
    3. NFD-Worker
    4. \n
    5. NFD-Topology-Updater
    6. \n
    \n
  4. \n
  5. Running with Tilt
      \n
    1. Prerequisites
    2. \n
    3. Environment variables
    4. \n
    \n
  6. \n
  7. Documentation
  8. \n
\n\n
\n\n

Building from source

\n\n

Download the source code

\n\n
git clone https://github.com/kubernetes-sigs/node-feature-discovery\ncd node-feature-discovery\n
\n\n

Docker build

\n\n

Build the container image

\n\n

See customizing the build below for altering the\ncontainer image registry, for example.

\n\n
make\n
\n\n

Push the container image

\n\n

Optional, this example with Docker.

\n\n
docker push <IMAGE_TAG>\n
\n\n

Docker multi-arch builds with buildx

\n\n

The default set of architectures enabled for mulit-arch builds are linux/amd64\nand linux/arm64. If more architectures are needed one can override the\nIMAGE_ALL_PLATFORMS variable with a comma separated list of OS/ARCH tuples.

\n\n

Build the manifest-list with a container image per arch

\n\n
make image-all\n
\n\n

Currently docker does not support loading of manifest-lists meaning the images\nare not shown when executing docker images, see:\nbuildx issue #59.

\n\n

Push the manifest-list with container image per arch

\n\n
make push-all\n
\n\n

The resulting container image can be used in the same way on each arch by pulling\ne.g. node-feature-discovery:v0.16.3 without specifying the\narchitecture. The manifest-list will take care of providing the right\narchitecture image.

\n\n

Change the job spec to use your custom image (optional)

\n\n

To use your published image from the step above instead of the\nregistry.k8s.io/nfd/node-feature-discovery image, edit image\nattribute in the spec template(s) to the new location\n(<registry-name>/<image-name>[:<version>]).

\n\n

Deployment

\n\n

The yamls makefile generates a kustomization.yaml matching your locally\nbuilt image and using the deploy/overlays/default deployment. See\nbuild customization below for configurability, e.g.\nchanging the deployment namespace.

\n\n
K8S_NAMESPACE=my-ns make yamls\nkubectl apply -k .\n
\n\n

You can use alternative deployment methods by modifying the auto-generated\nkustomization file.

\n\n

Building locally

\n\n

You can also build the binaries locally

\n\n
make build\n
\n\n

This will compile binaries under bin/

\n\n

Customizing the build

\n\n

There are several Makefile variables that control the build process and the\nname of the resulting container image. The following are targeted targeted for\nbuild customization and they can be specified via environment variables or\nmakefile overrides.

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
VariableDescriptionDefault value
HOSTMOUNT_PREFIXPrefix of system directories for feature discovery (local builds)/ (local builds) /host- (container builds)
IMAGE_BUILD_CMDCommand to build the imagedocker build
IMAGE_BUILD_EXTRA_OPTSExtra options to pass to build commandempty
IMAGE_BUILDX_CMDCommand to build and push multi-arch images with buildxDOCKER_CLI_EXPERIMENTAL=enabled docker buildx build –platform=${IMAGE_ALL_PLATFORMS} –progress=auto –pull
IMAGE_ALL_PLATFORMSComma separated list of OS/ARCH tuples for mulit-arch buildslinux/amd64,linux/arm64
IMAGE_PUSH_CMDCommand to push the image to remote registrydocker push
IMAGE_REGISTRYContainer image registry to useregistry.k8s.io/nfd
IMAGE_TAG_NAMEContainer image tag name<nfd version>
IMAGE_EXTRA_TAG_NAMESAdditional container image tag(s) to create when building imageempty
K8S_NAMESPACEnfd-master and nfd-worker namespacenode-feature-discovery
\n\n

For example, to use a custom registry:

\n\n
make IMAGE_REGISTRY=<my custom registry uri>\n
\n\n

Or to specify a build tool different from Docker, It can be done in 2 ways:

\n\n
    \n
  1. \n

    via environment

    \n\n
     IMAGE_BUILD_CMD=\"buildah bud\" make\n
    \n
  2. \n
  3. \n

    by overriding the variable value

    \n\n
     make  IMAGE_BUILD_CMD=\"buildah bud\"\n
    \n
  4. \n
\n\n

Testing

\n\n

Unit tests are automatically run as part of the container image build. You can\nalso run them manually in the source code tree by running:

\n\n
make test\n
\n\n

End-to-end tests are built on top of the e2e test framework of Kubernetes, and,\nthey required a cluster to run them on. For running the tests on your test\ncluster you need to specify the kubeconfig to be used:

\n\n
make e2e-test KUBECONFIG=$HOME/.kube/config\n
\n\n

There are several environment variables that can be used to customize the\ne2e-tests:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
VariableDescriptionDefault value
KUBECONFIGKubeconfig for running e2e-testsempty
E2E_TEST_CONFIGParameterization file of e2e-tests (see example)empty
E2E_PULL_IF_NOT_PRESENTTrue-ish value makes the image pull policy IfNotPresent (to be used only in e2e tests)false
E2E_TEST_FULL_IMAGERun e2e-test also against the Full Image tagfalse
E2E_GINKGO_LABEL_FILTERGinkgo label filter to use for running e2e testsempty
OPENSHIFTNon-empty value enables OpenShift specific support (only affects e2e tests)empty
\n\n

Running locally

\n\n
\n

**DEPRECATED: Running NFD locally is deprecated and will be removed in a\nfuture release. It depends on the gRPC API which is deprecated and will be\nremoved in a future release. To run NFD locally, disable the NodeFeature API\nwith -feature-gates NodeFeatureAPI=false flag.

\n
\n\n

You can run NFD locally, either directly on your host OS or in containers for\ntesting and development purposes. This may be useful e.g. for checking\nfeatures-detection.

\n\n

NFD-Master

\n\n

When running as a standalone container labeling is expected to fail because\nKubernetes API is not available. Thus, it is recommended to use -no-publish\nAlso specify -crd-controller=false and -feature-gates NodeFeatureAPI=false\ncommand line flags to disable CRD controller and enable gRPC. E.g.

\n\n
$ export NFD_CONTAINER_IMAGE=registry.k8s.io/nfd/node-feature-discovery:v0.16.3\n$ docker run --rm --name=nfd-test ${NFD_CONTAINER_IMAGE} nfd-master -no-publish -crd-controller=false -feature-gates NodeFeatureAPI=false\n2019/02/01 14:48:21 Node Feature Discovery Master <NFD_VERSION>\n2019/02/01 14:48:21 gRPC server serving on port: 8080\n
\n\n

NFD-Worker

\n\n

To run nfd-worker as a “stand-alone” container you need to run it in the same\nnetwork namespace as the nfd-master container:

\n\n
$ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-worker -feature-gates NodeFeatureAPI=false\n2019/02/01 14:48:56 Node Feature Discovery Worker <NFD_VERSION>\n...\n
\n\n

If you just want to try out feature discovery without connecting to nfd-master,\npass the -no-publish flag to nfd-worker.

\n\n
\n

NOTE: Some feature sources need certain directories and/or files from the\nhost mounted inside the NFD container. Thus, you need to provide Docker with\nthe correct --volume options for them to work correctly when run\nstand-alone directly with docker run. See\nthe default deployment\nfor up-to-date information about the required volume mounts.

\n
\n\n

NFD-Topology-Updater

\n\n

To run nfd-topology-updater as a “stand-alone” container\nyou need to run it in with the -no-publish flag to disable communication to\nthe Kubernetes apiserver.

\n\n
$ docker run --rm ${NFD_CONTAINER_IMAGE} nfd-topology-updater -no-publish\n2019/02/01 14:48:56 Node Feature Discovery Topology Updater <NFD_VERSION>\n...\n
\n\n

If you just want to try out resource topology discovery without connecting to\nthe Kubernetes API, pass the -no-publish flag to nfd-topology-updater.

\n\n
\n

NOTE: NFD topology updater needs certain directories and/or files from\nthe host mounted inside the NFD container. Thus, you need to provide Docker\nwith the correct --volume options for them to work correctly when\nrun stand-alone directly with docker run. See\nthe template spec\nfor up-to-date information about the required volume mounts.

\n
\n\n

Running with Tilt

\n\n

Another option for building NFD locally is via Tilt tool, which can build container\nimages, push them to a local registry and reload your Kubernetes pods automatically.\nWhen using Tilt, you don’t have to build container images and re-deploy your pods\nmanually but instead let the Tilt take care of it. Tiltfile is a configuration file\nfor the Tilt and is located at the root directory. To develop NFD with Tilt, follow\nthe steps below.

\n\n

Prerequisites

\n\n
    \n
  1. Install Docker
  2. \n
  3. Setup Docker as a non-root user.
  4. \n
  5. Install kubectl
  6. \n
  7. Install kustomize
  8. \n
  9. Install tilt
  10. \n
  11. Create a local Kubernetes cluster
  12. \n
\n\n

To start up your Tilt development environment, run

\n\n
tilt up\n
\n\n

at the root of your local NFD codebase. Tilt will start a web interface in the\nlocalhost and port 10350. From the web interface, you are able to see how NFD worker\nand master are progressing, watch their build and runtime logs. Once your code changes\nare saved locally, Tilt will notice it and re-build the container image from the\ncurrent code, push the image to the registry and re-deploy NFD pods with the latest\ncontainer image.

\n\n

Environment variables

\n\n

To override environment variables used in the Tiltfile during image build,\nexport them in your current terminal before starting Tilt.

\n\n
export IMAGE_TAG_NAME=\"v1\"\ntilt up\n
\n\n

This will override the default value(master) of IMAGE_TAG_NAME variable defined\nin the Tiltfile.

\n\n

Documentation

\n\n

All documentation resides under the\ndocs\ndirectory in the source tree. It is designed to be served as a html site by\nGitHub Pages.

\n\n

Building the documentation is containerized to fix the build\nenvironment. The recommended way for developing documentation is to run:

\n\n
make site-serve\n
\n\n

This will build the documentation in a container and serve it under\nlocalhost:4000/ making it easy to verify the results.\nAny changes made to the docs/ will automatically re-trigger a rebuild and are\nreflected in the served content and can be inspected with a browser refresh.

\n\n

To just build the html documentation run:

\n\n
make site-build\n
\n\n

This will generate html documentation under docs/_site/.

\n\n\n","dir":"/developer-guide/","name":"index.md","path":"developer-guide/index.md","url":"/developer-guide/"},{"title":"Topology Updater Cmdline Reference","layout":"default","sort":5,"content":"

NFD-Topology-Updater Commandline Flags

\n\n

Table of Contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -config
  6. \n
  7. -no-publish
  8. \n
  9. -oneshot
  10. \n
  11. -metrics
  12. \n
  13. -sleep-interval
  14. \n
  15. -watch-namespace
  16. \n
  17. -kubelet-config-uri
  18. \n
  19. -api-auth-token-file
  20. \n
  21. -podresources-socket
  22. \n
  23. -pods-fingerprint
  24. \n
  25. -kubelet-state-dir
  26. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-topology-updater -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 \\\nnfd-topology-updater -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-config

\n\n

The -config flag specifies the path of the nfd-topology-updater\nconfiguration file to use.

\n\n

Default: /etc/kubernetes/node-feature-discovery/nfd-topology-updater.conf

\n\n

Example:

\n\n
nfd-topology-updater -config=/opt/nfd/nfd-topology-updater.conf\n
\n\n

-no-publish

\n\n

The -no-publish flag makes for a “dry-run” flag for nfd-topology-updater.\nNFD-Topology-Updater runs resource hardware topology detection normally, but\nNodeResourceTopology\nobjects are not created or updated.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-topology-updater -no-publish\n
\n\n

-oneshot

\n\n

The -oneshot flag causes nfd-topology-updater to exit after one pass of\nresource hardware topology detection.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-topology-updater -oneshot -no-publish\n
\n\n

-metrics

\n\n

The -metrics flag specifies the port on which to expose\nPrometheus metrics. Setting this to 0 disables the\nmetrics server on nfd-topology-updater.

\n\n

Default: 8081

\n\n

Example:

\n\n
nfd-topology-updater -metrics=12345\n
\n\n

-sleep-interval

\n\n

The -sleep-interval specifies the interval between resource hardware\ntopology re-examination (and CR updates). zero means no CR updates on interval basis.

\n\n

Default: 60s

\n\n

Example:

\n\n
nfd-topology-updater -sleep-interval=1h\n
\n\n

-watch-namespace

\n\n

The -watch-namespace specifies the namespace to ensure that resource\nhardware topology examination only happens for the pods running in the\nspecified namespace. Pods that are not running in the specified namespace\nare not considered during resource accounting. This is particularly useful\nfor testing/debugging purpose. A “*” value would mean that all the pods would\nbe considered during the accounting process.

\n\n

Default: “*”

\n\n

Example:

\n\n
nfd-topology-updater -watch-namespace=rte\n
\n\n

-kubelet-config-uri

\n\n

The -kubelet-config-uri specifies the path to the Kubelet’s configuration.\nNote that the URi could either be a local host file or an HTTP endpoint.

\n\n

Default: https://${NODE_ADDRESS}:10250/configz

\n\n

Example:

\n\n
nfd-topology-updater -kubelet-config-uri=file:///var/lib/kubelet/config.yaml\n
\n\n

-api-auth-token-file

\n\n

The -api-auth-token-file specifies the path to the api auth token file\nwhich is used to retrieve Kubelet’s configuration from Kubelet secure port,\nonly taking effect when -kubelet-config-uri is https.\nNote that this token file must bind to a role that has the get capability to\nnodes/proxy resources.

\n\n

Default: /var/run/secrets/kubernetes.io/serviceaccount/token

\n\n

Example:

\n\n
nfd-topology-updater -token-file=/var/run/secrets/kubernetes.io/serviceaccount/token\n
\n\n

-podresources-socket

\n\n

The -podresources-socket specifies the path to the Unix socket where kubelet\nexports a gRPC service to enable discovery of in-use CPUs and devices, and to\nprovide metadata for them.

\n\n

Default: /host-var/lib/kubelet/pod-resources/kubelet.sock

\n\n

Example:

\n\n
nfd-topology-updater -podresources-socket=/var/lib/kubelet/pod-resources/kubelet.sock\n
\n\n

-pods-fingerprint

\n\n

Enables compute and report the pod set fingerprint in the NRT.\nA pod fingerprint is a compact representation of the “node state” regarding resources.

\n\n

Default: true

\n\n

Example:

\n\n
nfd-topology-updater -pods-fingerprint=false\n
\n\n

-kubelet-state-dir

\n\n

The -kubelet-state-dir specifies the path to the Kubelet state directory,\nwhere state and checkpoint files are stored.\nThe files are mount as read-only and cannot be change by the updater.\nEnabled by default.\nPassing an empty string will disable the watching.

\n\n

Default: /host-var/lib/kubelet

\n\n

Example:

\n\n
nfd-topology-updater -kubelet-state-dir=/var/lib/kubelet\n
\n","dir":"/reference/","name":"topology-updater-commandline-reference.md","path":"reference/topology-updater-commandline-reference.md","url":"/reference/topology-updater-commandline-reference.html"},{"title":"NFD-Topology-Updater","layout":"default","sort":5,"content":"

NFD-Topology-Updater

\n\n
\n\n

NFD-Topology-Updater is preferably run as a Kubernetes DaemonSet.\nThis assures re-examination on regular intervals\nand/or per pod life-cycle events, capturing changes in the allocated\nresources and hence the allocatable resources on a per-zone basis by updating\nNodeResourceTopology custom resources.\nIt makes sure that new NodeResourceTopology instances are created for each new\nnodes that get added to the cluster.

\n\n

Because of the design and implementation of Kubernetes, only resources exclusively\nallocated to Guaranteed Quality of Service\npods will be accounted.\nThis includes\nCPU cores,\nmemory\nand\ndevices.

\n\n

When run as a daemonset, nodes are re-examined for the allocated resources\n(to determine the information of the allocatable resources on a per-zone basis\nwhere a zone can be a NUMA node) at an interval specified using the\n-sleep-interval\noption. The default sleep interval is set to 60s\nwhich is the value when no -sleep-interval is specified.\nThe re-examination can be disabled by setting the sleep-interval to 0.

\n\n

Another option is to configure the updater to update\nthe allocated resources per pod life-cycle events.\nThe updater will monitor the checkpoint file stated in\n-kubelet-state-dir\nand triggers an update for every change occurs in the files.

\n\n

In addition, it can avoid examining specific allocated resources\ngiven a configuration of resources to exclude via -excludeList

\n\n

Deployment Notes

\n\n

Kubelet PodResource API with the\nGetAllocatableResources functionality enabled is a\nprerequisite for nfd-topology-updater to be able to run (i.e. Kubernetes v1.21\nor later is required).

\n\n

Preceding Kubernetes v1.23, the kubelet must be started with\n--feature-gates=KubeletPodResourcesGetAllocatable=true.

\n\n

Starting from Kubernetes v1.23, the KubeletPodResourcesGetAllocatable\nfeature gate. is enabled by default

\n\n

Topology-Updater Configuration

\n\n

NFD-Topology-Updater supports configuration through a configuration file. The\ndefault location is /etc/kubernetes/node-feature-discovery/topology-updater.conf,\nbut, this can be changed by specifying the-config command line flag.

\n\n
\n

NOTE: unlike nfd-worker, dynamic configuration updates are not supported.

\n
\n\n

Topology-Updater configuration file is read inside the container,\nand thus, Volumes and VolumeMounts are needed\nto make your configuration available for NFD.\nThe preferred method is to use a ConfigMap\nwhich provides easy deployment and re-configurability.

\n\n

The provided nfd-topology-updater deployment templates\ncreate an empty configmap\nand mount it inside the nfd-topology-updater containers.\nIn kustomize deployments, configuration can be edited with:

\n\n
kubectl -n ${NFD_NS} edit configmap nfd-topology-updater-conf\n
\n\n

In Helm deployments,\nTopology Updater parameters\ntoplogyUpdater.config can be used to edit the respective configuration.

\n\n

See\nnfd-topology-updater configuration file reference\nfor more details.\nThe (empty-by-default)\nexample config\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.

\n\n\n","dir":"/usage/","name":"nfd-topology-updater.md","path":"usage/nfd-topology-updater.md","url":"/usage/nfd-topology-updater.html"},{"title":"Contributing","layout":"default","sort":6,"content":"

Contributing

\n\n
\n\n

Community

\n\n

You can reach us via the following channels:

\n\n\n\n

Governance

\n\n

This is a\nSIG-node\nsubproject, hosted under the\nKubernetes SIGs organization in Github.\nThe project was established in 2016 and was migrated to Kubernetes SIGs in 2018.

\n\n

License

\n\n

This is open source software released under the Apache 2.0 License.

\n","dir":"/contributing/","name":"index.md","path":"contributing/index.md","url":"/contributing/"},{"title":"Uninstallation","layout":"default","sort":6,"content":"

Uninstallation

\n\n
\n\n

Follow the uninstallation instructions of the deployment method used\n(kustomize,\nhelm or\noperator).

\n\n

Removing feature labels

\n\n
\n

NOTE: This is unnecessary when using the Helm chart for deployment as it\nwill clean up the nodes when NFD is uninstalled.

\n
\n\n

NFD-Master has a special -prune command line flag for removing all\nnfd-related node labels, annotations, extended resources and taints from the\ncluster.

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.3\nkubectl -n node-feature-discovery wait job.batch/nfd-master --for=condition=complete && \\\n    kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.3\n
\n\n
\n

NOTE: You must run prune before removing the RBAC rules (serviceaccount,\nclusterrole and clusterrolebinding).

\n
\n","dir":"/deployment/","name":"uninstallation.md","path":"deployment/uninstallation.md","url":"/deployment/uninstallation.html"},{"title":"Topology-Updater config reference","layout":"default","sort":6,"content":"

Configuration file reference of nfd-topology-updater

\n\n

Table of contents

\n\n
    \n
  1. excludeList
      \n
    1. excludeList.*
    2. \n
    \n
  2. \n
\n\n
\n\n

See the\nsample configuration file\nfor a full example configuration.

\n\n

excludeList

\n\n

The excludeList specifies a key-value map of allocated resources\nthat should not be examined by the topology-updater\nagent per node.\nEach key is a node name with a value as a list of resources\nthat should not be examined by the agent for that specific node.

\n\n

Default: empty

\n\n

Example:

\n\n
excludeList:\n  nodeA: [hugepages-2Mi]\n  nodeB: [memory]\n  nodeC: [cpu, hugepages-2Mi]\n
\n\n

excludeList.*

\n

excludeList.* is a special value that use to specify all nodes.\nA resource that would be listed under this key, would be excluded from all nodes.

\n\n

Default: empty

\n\n

Example:

\n\n
excludeList:\n  '*': [hugepages-2Mi]\n
\n","dir":"/reference/","name":"topology-updater-configuration-reference.md","path":"reference/topology-updater-configuration-reference.md","url":"/reference/topology-updater-configuration-reference.html"},{"title":"NFD-Garbage-Collector","layout":"default","sort":6,"content":"

NFD-GC

\n\n
\n\n

NFD-GC (NFD Garbage-Collector) is preferably run as a Kubernetes deployment\nwith one replica. It makes sure that all\nNodeFeature and\nNodeResourceTopology objects\nhave corresponding nodes and removes stale objects for non-existent nodes.

\n\n

The daemon watches for Node deletion events and removes NodeFeature and\nNodeResourceTopology objects upon them. It also runs periodically to make sure\nno node delete event was missed and to remove any NodeFeature or\nNodeResourceTopology objects that were created without corresponding node. The\ndefault garbage collector interval is set to 1h which is the value when no\n-gc-interval is specified.

\n\n

Configuration

\n\n

In Helm deployments (see\ngarbage collector parameters)\nNFD-GC will only be deployed when featureGates.NodeFeatureAPI or\ntopologyUpdater.enable is set to true.

\n","dir":"/usage/","name":"nfd-gc.md","path":"usage/nfd-gc.md","url":"/usage/nfd-gc.html"},{"title":"Metrics","layout":"default","sort":7,"content":"

Metrics

\n\n

Metrics are configured to be exposed using prometheus operator\nAPI’s by default. If you want to expose metrics using the prometheus operator\nAPI’s you need to install the prometheus operator in your cluster.\nBy default NFD Master and Worker expose metrics on port 8081.

\n\n

The exposed metrics are

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
MetricTypeDescription
nfd_master_build_infoGaugeVersion from which nfd-master was built
nfd_worker_build_infoGaugeVersion from which nfd-worker was built
nfd_gc_build_infoGaugeVersion from which nfd-gc was built
nfd_topology_updater_build_infoGaugeVersion from which nfd-topology-updater was built
nfd_node_update_requests_totalCounterNumber of node update requests received by the master over gRPC
nfd_node_updates_totalCounterNumber of nodes updated
nfd_node_update_failures_totalCounterNumber of nodes update failures
nfd_node_labels_rejected_totalCounterNumber of nodes labels rejected by nfd-master
nfd_node_extendedresources_rejected_totalCounterNumber of nodes extended resources rejected by nfd-master
nfd_node_taints_rejected_totalCounterNumber of nodes taints rejected by nfd-master
nfd_nodefeaturerule_processing_duration_secondsHistogramTime taken to process NodeFeatureRule objects
nfd_nodefeaturerule_processing_errors_totalCounterNumber or errors encountered while processing NodeFeatureRule objects
nfd_feature_discovery_duration_secondsHistogramTime taken to discover features on a node
nfd_topology_updater_scan_errors_totalCounterNumber of errors in scanning resource allocation of pods.
nfd_gc_objects_deleted_totalCounterNumber of NodeFeature and NodeResourceTopology objects garbage collected.
nfd_gc_object_delete_failures_totalCounterNumber of errors in deleting NodeFeature and NodeResourceTopology objects.
\n\n

Kustomize

\n\n

To deploy NFD with metrics enabled using kustomize, you can use the\nprometheus overlay.

\n\n

Helm

\n\n

By default metrics are enabled when deploying NFD via Helm. To enable Prometheus\nto scrape metrics from NFD, you need to pass the following values to Helm:

\n\n
--set prometheus.enable=true\n
\n\n

For more info on Helm deployment, see Helm.

\n\n

It is recommended to specify\n--set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false\nwhen deploying prometheus-operator via Helm to enable the prometheus-operator\nto scrape metrics from any PodMonitor.

\n\n

or setting labels on the PodMonitor via the helm parameter prometheus.labels\nto control which Prometheus instances will scrape this PodMonitor.

\n\n

Grafana dashboard

\n\n

NFD contains an example Grafana dashboard. You can import\nexamples/grafana-dashboard.json\nto your Grafana instance to visualize the NFD metrics.

\n","dir":"/deployment/","name":"metrics.md","path":"deployment/metrics.md","url":"/deployment/metrics.html"},{"title":"Garbage Collector Cmdline Reference","layout":"default","sort":7,"content":"

NFD-GC Commandline Flags

\n\n

Table of Contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -gc-interval
  6. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-gc -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 \\\nnfd-gc -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-gc-interval

\n\n

The -gc-interval specifies the interval between periodic garbage collector runs.

\n\n

Default: 1h

\n\n

Example:

\n\n
nfd-gc -gc-interval=1h\n
\n","dir":"/reference/","name":"gc-commandline-reference.md","path":"reference/gc-commandline-reference.md","url":"/reference/gc-commandline-reference.html"},{"title":"CRDs","layout":"default","sort":7,"content":"

Custom Resources

\n\n

Table of contents

\n\n
    \n
  1. NodeFeature
  2. \n
  3. NodeFeatureGroup
  4. \n
  5. NodeFeatureRule
  6. \n
  7. NodeResourceTopology
  8. \n
\n\n
\n\n

NFD uses some Kubernetes custom resources.

\n\n

NodeFeature

\n\n

NodeFeature is an NFD-specific custom resource for communicating node\nfeatures and node labeling requests. The nfd-master pod watches for NodeFeature\nobjects, labels nodes as specified and uses the listed features as input when\nevaluating NodeFeatureRules. NodeFeature objects can be\nused for implementing 3rd party extensions (see\ncustomization guide for more\ndetails).

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeature\nmetadata:\n  labels:\n    nfd.node.kubernetes.io/node-name: node-1\n  name: node-1-vendor-features\nspec:\n  features:\n    instances:\n      vendor.device:\n        elements:\n        - attributes:\n            model: \"xpu-1\"\n            memory: \"4000\"\n            type: \"fast\"\n        - attributes:\n            model: \"xpu-2\"\n            memory: \"16000\"\n            type: \"slow\"\n  labels:\n    vendor-xpu-present: \"true\"\n
\n\n

NodeFeatureGroup

\n\n

NodeFeatureGroup is an NFD-specific custom resource that is designed for\ngrouping nodes based on their features. NFD-Master watches for NodeFeatureGroup\nobjects in the cluster and updates the status of the NodeFeatureGroup object\nwith the list of nodes that match the feature group rules. The NodeFeatureGroup\nrules follow the same syntax as the NodeFeatureRule rules.

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureGroup\nmetadata:\n  name: node-feature-group-example\nspec:\n  featureGroupRules:\n    - name: \"node has kernel version discovered\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: Exists}\n
\n\n

NodeFeatureGroup API is an alpha feature and disabled by default in NFD version\nv0.16. For more details and examples see the\ncustomization guide.

\n\n

NodeFeatureRule

\n\n

NodeFeatureRule is an NFD-specific custom resource that is designed for\nrule-based custom labeling of nodes. NFD-Master watches for NodeFeatureRule\nobjects in the cluster and labels nodes according to the rules within. Some use\ncases are e.g. application specific labeling in a specific environments or\nbeing distributed by hardware vendors to create specific labels for their\ndevices.

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: example-rule\nspec:\n  rules:\n    - name: \"example rule\"\n      labels:\n        \"example-custom-feature\": \"true\"\n      # Label is created if all of the rules below match\n      matchFeatures:\n        # Match if \"veth\" kernel module is loaded\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            veth: {op: Exists}\n        # Match if any PCI device with vendor 8086 exists in the system\n        - feature: pci.device\n          matchExpressions:\n            vendor: {op: In, value: [\"8086\"]}\n
\n\n

See the\nCustomization guide\nfor full documentation of the NodeFeatureRule resource and its usage.

\n\n

The\ndeployment/nodefeaturerule/samples/\ndirectory contains sample NodeFeatureRule objects that replicate the built-in\ndefault feature labels generated by NFD. The sample rules can be used as a base\nto customize NFD feature labels. To use them in place of the the NFD built-in\nlabels, the corresponding feature source(s) of nfd-worker should be disabled\nwith the\ncore.labelSources\nconfiguration option.

\n\n

NodeResourceTopology

\n\n

When run with NFD-Topology-Updater, NFD creates NodeResourceTopology objects\ncorresponding to node resource hardware topology such as:

\n\n
apiVersion: topology.node.k8s.io/v1alpha1\nkind: NodeResourceTopology\nmetadata:\n  name: node1\ntopologyPolicies: [\"SingleNUMANodeContainerLevel\"]\nzones:\n  - name: node-0\n    type: Node\n    resources:\n      - name: cpu\n        capacity: 20\n        allocatable: 16\n        available: 10\n      - name: vendor/nic1\n        capacity: 3\n        allocatable: 3\n        available: 3\n  - name: node-1\n    type: Node\n    resources:\n      - name: cpu\n        capacity: 30\n        allocatable: 30\n        available: 15\n      - name: vendor/nic2\n        capacity: 6\n        allocatable: 6\n        available: 6\n  - name: node-2\n    type: Node\n    resources:\n      - name: cpu\n        capacity: 30\n        allocatable: 30\n        available: 15\n      - name: vendor/nic1\n        capacity: 3\n        allocatable: 3\n        available: 3\n
\n\n

The NodeResourceTopology objects created by NFD can be used to gain insight\ninto the allocatable resources along with the granularity of those resources at\na per-zone level (represented by node-0 and node-1 in the above example) or can\nbe used by an external entity (e.g. topology-aware scheduler plugin) to take an\naction based on the gathered information.

\n\n\n","dir":"/usage/","name":"custom-resources.md","path":"usage/custom-resources.md","url":"/usage/custom-resources.html"},{"title":"Kubectl plugin cmdline reference","layout":"default","sort":8,"content":"

Commandline flags of kubectl-nfd (plugin)

\n\n

Table of contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. Validate
      \n
    1. -f / –nodefeature-file
    2. \n
    \n
  4. \n
  5. Test
      \n
    1. -k, –kubeconfig
    2. \n
    3. -s, –namespace
    4. \n
    5. -n, –nodename
    6. \n
    7. -f, –nodefeaturerule-file
    8. \n
    \n
  6. \n
  7. DryRun
      \n
    1. -f, –nodefeaturerule-file
    2. \n
    3. -n, –nodefeature-file
    4. \n
    \n
  8. \n
\n\n
\n\n

To quickly view available command line flags execute kubectl nfd -help.

\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

Validate

\n\n

Validate a NodeFeatureRule file.

\n\n

-f / –nodefeature-file

\n\n

The --nodefeature-file flag specifies the path to the NodeFeatureRule file\nto validate.

\n\n

Test

\n\n

Test a NodeFeatureRule file against a node without applying it.

\n\n

-k, –kubeconfig

\n\n

The --kubeconfig flag specifies the path to the kubeconfig file to use for\nCLI requests.

\n\n

-s, –namespace

\n\n

The --namespace flag specifies the namespace to use for CLI requests.\nDefault: default.

\n\n

-n, –nodename

\n\n

The --nodename flag specifies the name of the node to test the\nNodeFeatureRule against.

\n\n

-f, –nodefeaturerule-file

\n\n

The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file\nto test.

\n\n

DryRun

\n\n

Process a NodeFeatureRule file against a NodeFeature file.

\n\n

-f, –nodefeaturerule-file

\n\n

The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file\nto test.

\n\n

-n, –nodefeature-file

\n\n

The --nodefeature-file flag specifies the path to the NodeFeature file to test.

\n","dir":"/reference/","name":"plugin-commandline-reference.md","path":"reference/plugin-commandline-reference.md","url":"/reference/plugin-commandline-reference.html"},{"title":"Customization guide","layout":"default","sort":8,"content":"

Customization guide

\n\n

Table of contents

\n\n
    \n
  1. Overview
  2. \n
  3. NodeFeature custom resource
      \n
    1. A NodeFeature example
    2. \n
    3. Feature types
    4. \n
    \n
  4. \n
  5. NodeFeatureRule custom resource
      \n
    1. A NodeFeatureRule example
    2. \n
    3. Node tainting
    4. \n
    \n
  6. \n
  7. NodeFeatureGroup custom resource
      \n
    1. A NodeFeatureGroup example
    2. \n
    \n
  8. \n
  9. Local feature source
      \n
    1. An example
    2. \n
    3. Feature files
    4. \n
    5. Hooks
    6. \n
    7. Input format
    8. \n
    9. Mounts
    10. \n
    \n
  10. \n
  11. Custom feature source
      \n
    1. An example custom feature source configuration
    2. \n
    3. Additional configuration directory
    4. \n
    \n
  12. \n
  13. Node labels
  14. \n
  15. Feature rule format
      \n
    1. Fields
    2. \n
    3. Available features
    4. \n
    5. Templating
    6. \n
    7. Backreferences
    8. \n
    9. Examples
    10. \n
    \n
  16. \n
\n\n
\n\n

Overview

\n\n

NFD provides multiple extension points for vendor and application specific\nlabeling:

\n\n\n\n

NodeFeature custom resource

\n\n

NodeFeature objects provide a way for 3rd party extensions to advertise custom\nfeatures, both as “raw” features that serve as input to\nNodeFeatureRule objects and as feature\nlabels directly.

\n\n

Note that RBAC rules must be created for each extension for them to be able to\ncreate and manipulate NodeFeature objects in their namespace.

\n\n

The NodeFeature CRD API can be disabled with the\nNodeFeatureAPI feature gate\n(-feature-gates NodeFeatureAPI=false on command line). The -feature-gates\ncommand line flag must be specified for both nfd-master and nfd-worker as it\nwill enable the gRPC communication between them. Note that the gRPC API is\nDEPRECATED and will be removed in a future release, at which point the\nNodeFeature API cannot be disabled.

\n\n

A NodeFeature example

\n\n

Consider the following referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeature\nmetadata:\n  labels:\n    nfd.node.kubernetes.io/node-name: node-1\n  name: vendor-features-for-node-1\nspec:\n  # Features for NodeFeatureRule matching\n  features:\n    flags:\n      vendor.flags:\n        elements:\n          feature-x: {}\n          feature-y: {}\n    attributes:\n      vendor.config:\n        elements:\n          setting-a: \"auto\"\n          knob-b: \"123\"\n    instances:\n      vendor.devices:\n        elements:\n        - attributes:\n            model: \"dev-1000\"\n            vendor: \"acme\"\n        - attributes:\n            model: \"dev-2000\"\n            vendor: \"acme\"\n  # Labels to be created\n  labels:\n    vendor.io/feature.enabled: \"true\"\n
\n\n

The object targets node named node-1. It lists two “flag type” features under\nthe vendor.flags domain, two “attribute type” features and under the\nvendor.config domain and two “instance type” features under the\nvendor.devices domain. These features will not be directly affecting the node\nlabels but they will be used as input when the\nNodeFeatureRule objects are evaluated.

\n\n

In addition, the example requests directly the\nvendor.io/feature.enabled=true node label to be created.

\n\n

The nfd.node.kubernetes.io/node-name=<node-name> must be in place for each\nNodeFeature object as NFD uses it to determine the node which it is targeting.

\n\n

Feature types

\n\n

Features have three different types:

\n\n\n\n

NodeFeatureRule custom resource

\n\n

NodeFeatureRule objects provide an easy way to create vendor or application\nspecific labels and taints. It uses a flexible rule-based mechanism for creating\nlabels and optionally taints based on node features.

\n\n

A NodeFeatureRule example

\n\n

Consider the following referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-sample-rule-object\nspec:\n  rules:\n    - name: \"my sample rule\"\n      labels:\n        \"feature.node.kubernetes.io/my-sample-feature\": \"true\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            dummy: {op: Exists}\n        - feature: kernel.config\n          matchExpressions:\n            X86: {op: In, value: [\"y\"]}\n
\n\n

It specifies one rule which creates node label\nfeature.node.kubernetes.io/my-sample-feature=true if both of the following\nconditions are true (matchFeatures implements a logical AND over the\nmatchers):

\n\n\n\n

Create a NodeFeatureRule with a yaml file:

\n\n
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.3/examples/nodefeaturerule.yaml\n
\n\n

Now, on X86 platforms the feature label appears after doing modprobe dummy on\na system and correspondingly the label is removed after rmmod dummy. Note a\nre-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).

\n\n

See Feature rule format for detailed description of\navailable fields and how to write labeling rules.

\n\n

Node tainting

\n\n

This feature is experimental.

\n\n

In some circumstances, it is desirable to keep nodes with specialized hardware\naway from running general workload and instead leave them for workloads that\nneed the specialized hardware. One way to achieve it is to taint the nodes with\nthe specialized hardware and add corresponding toleration to pods that require\nthe special hardware. NFD offers node tainting functionality which is disabled\nby default. User can define one or more custom taints via the taints field of\nthe NodeFeatureRule CR. The same rule-based mechanism is applied here and the\nNFD taints only rule matching nodes.

\n\n

To enable the tainting feature, --enable-taints flag needs to be set to true.\nIf the flag --enable-taints is set to false (i.e. disabled), taints defined in\nthe NodeFeatureRule CR have no effect and will be ignored by the NFD master.

\n\n

See documentation of the taints field for detailed description how\nto specify taints in the NodeFeatureRule object.

\n\n
\n

NOTE: Before enabling any taints, make sure to edit nfd-worker daemonset\nto tolerate the taints to be created. Otherwise, already running pods that do\nnot tolerate the taint are evicted immediately from the node including the\nnfd-worker pod.

\n
\n\n

NodeFeatureGroup custom resource

\n\n

NodeFeatureGroup API is an alpha feature and disabled by default in NFD version\nv0.16. Use the\nNodeFeatureAPI feature\ngate to enable it.

\n\n

NodeFeatureGroup objects provide a way to create node groups that share the\nsame set of features. The NodeFeatureGroup object spec consists of a list of\nNodeFeatureRule that follow the same format as the NodeFeatureRule,\nbut the difference in this case is that nodes that match any of the rules in the\nNodeFeatureGroup will be listed in the NodeFeatureGroup status.

\n\n

A NodeFeatureGroup example

\n\n

Consider the following referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureGroup\nmetadata:\n  name: node-feature-group-example\nspec:\n  featureGroupRules:\n    - name: \"kernel version\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: In, value: [\"6\"]}\nstatus:\n  nodes:\n    - name: node-1\n    - name: node-2\n    - name: node-3\n
\n\n

The object specifies a group of nodes that share the same\nkernel.version.major (Linux kernel v6.x).

\n\n

Create a NodeFeatureGroup with a yaml file:

\n\n
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.3/examples/nodefeaturegroup.yaml\n
\n\n

See Feature rule format for detailed description of\navailable fields and how to write group filtering rules.

\n\n

Local feature source

\n\n

NFD-Worker has a special feature source named local which is an integration\npoint for external feature detectors. It provides a mechanism for pluggable\nextensions, allowing the creation of new user-specific features and even\noverriding built-in labels.

\n\n

The local feature source has two methods for detecting features, feature\nfiles and hooks (hooks are deprecated and slated for removal in NFD v0.17). The\nfeatures discovered by the local source can further be used in label rules\nspecified in NodeFeatureRule objects and\nthe custom feature source.

\n\n
\n

NOTE: Be careful when creating and/or updating hook or feature files\nwhile NFD is running. To avoid race conditions you should write\ninto a temporary file, and atomically create/update the original file by\ndoing a file rename operation. NFD ignores dot files,\nso temporary file can be written to the same directory and renamed\n(.my.feature -> my.feature) once file is complete. Both file names should\n(obviously) be unique for the given application.

\n
\n\n

An example

\n\n

Consider a plaintext file\n/etc/kubernetes/node-feature-discovery/features.d/my-features\nhaving the following contents (or alternatively a shell script\n/etc/kubernetes/node-feature-discovery/source.d/my-hook.sh having the\nfollowing stdout output):

\n\n
feature.node.kubernetes.io/my-feature.1\nfeature.node.kubernetes.io/my-feature.2=myvalue\nvendor.io/my-feature.3=456\n
\n\n

This will translate into the following node labels:

\n\n
feature.node.kubernetes.io/my-feature.1: \"true\"\nfeature.node.kubernetes.io/my-feature.2: \"myvalue\"\nvendor.io/my-feature.3: \"456\"\n
\n\n

Feature files

\n\n

The local source reads files found in\n/etc/kubernetes/node-feature-discovery/features.d/. File content is parsed\nand translated into node labels, see the input format below.

\n\n

Hooks

\n\n

DEPRECATED Hooks are deprecated and will be completely removed in NFD\nv0.17.

\n\n

The local source executes hooks found in\n/etc/kubernetes/node-feature-discovery/source.d/. The hook files must be\nexecutable and they are supposed to print all discovered features in stdout.\nSince NFD v0.13 the default container image only supports statically linked ELF\nbinaries.

\n\n

stderr output of hooks is propagated to NFD log so it can be used for\ndebugging and logging.

\n\n

NFD tries to execute any regular files found from the hooks directory.\nAny additional data files the hook might need (e.g. a configuration file)\nshould be placed in a separate directory to avoid NFD unnecessarily\ntrying to execute them. A subdirectory under the hooks directory can be used,\nfor example /etc/kubernetes/node-feature-discovery/source.d/conf/.

\n\n
\n

NOTE: Starting from release v0.14 hooks are disabled by default and can\nbe enabled via sources.local.hooksEnabled field in the worker\nconfiguration.

\n
\n\n
sources:\n  local:\n    hooksEnabled: true  # true by default at this point\n
\n\n
\n

NOTE: NFD will blindly run any executables placed/mounted in the hooks\ndirectory. It is the user’s responsibility to review the hooks for e.g.\npossible security implications.

\n\n

NOTE: The full image variant\nprovides backwards-compatibility with older NFD versions by including a more\nexpanded environment, supporting bash and perl runtimes.

\n
\n\n

Input format

\n\n

The hook stdout and feature files are expected to contain features in simple\nkey-value pairs, separated by newlines:

\n\n
# This is a comment\n<key>[=<value>]\n
\n\n

The label value defaults to true, if not specified.

\n\n

Label namespace must be specified with <namespace>/<name>[=<value>].

\n\n
\n

NOTE: The feature file size limit it 64kB. The feature file will be\nignored if the size limit is exceeded.

\n
\n\n

Comment lines (starting with #) are ignored.

\n\n

Adding following line anywhere to feature file defines date when\nits content expires / is ignored:

\n\n
# +expiry-time=2023-07-29T11:22:33Z\n
\n\n

Also, the expiry-time value would stay the same during the processing of the\nfeature file until another expiry-time directive is encountered.\nConsidering the following file:

\n\n
# +expiry-time=2012-07-28T11:22:33Z\nvendor.io/feature1=featureValue\n\n# +expiry-time=2080-07-28T11:22:33Z\nvendor.io/feature2=featureValue2\n\n# +expiry-time=2070-07-28T11:22:33Z\nvendor.io/feature3=featureValue3\n\n# +expiry-time=2002-07-28T11:22:33Z\nvendor.io/feature4=featureValue4\n
\n\n

After processing the above file, only vendor.io/feature2 and\nvendor.io/feature3 would be included in the list of accepted features.

\n\n
\n

NOTE: The time format supported is RFC3339. Also, the expiry-time\ntag is only evaluated in each re-discovery period, and the expiration of\nnode labels is not tracked.

\n
\n\n

To exclude specific features from the local.feature Feature, you can use the\n# +no-feature directive. The # +no-label directive causes the feature to\nbe excluded from the local.label Feature and a node label not to be generated.

\n\n

Considering the following file:

\n\n
# +no-feature\nvendor.io/label-only=value\n\nvendor.io/my-feature=value\n\nvendor.io/foo=bar\n\n# +no-label\nfoo=baz\n
\n\n

Processing the above file would result in the following Features:

\n\n
local.features:\n  foo: baz\n  vendor.io/my-feature: value\nlocal.labels:\n  vendor.io/label-only: value\n  vendor.io/my-feature: value\n
\n\n

and the following labels added to the Node:

\n\n
vendor.io/label-only=value\nvendor.io/my-feature=value\n
\n\n
\n

NOTE: use of unprefixed label names (like foo=bar) should not be used.\nIn NFD v0.16 unprefixed names will be automatically prefixed\nwith feature.node.kubernetes.io/ but this will change in a future version\n(see\nautoDefaultNs config option.\nUnprefixed names for plain Features (tagged with # +no-label) can be used\nwithout restrictions, however.

\n
\n\n

Mounts

\n\n

The standard NFD deployments contain hostPath mounts for\n/etc/kubernetes/node-feature-discovery/source.d/ and\n/etc/kubernetes/node-feature-discovery/features.d/, making these directories\nfrom the host available inside the nfd-worker container.

\n\n

Injecting labels from other pods

\n\n

One use case for the feature files and hooks is detecting features in other\nPods outside NFD, e.g. in Kubernetes device plugins. By using the same\nhostPath mounts for /etc/kubernetes/node-feature-discovery/source.d/ and\n/etc/kubernetes/node-feature-discovery/features.d/ in the side-car (e.g.\ndevice plugin) creates a shared area for deploying feature files and hooks to\nNFD. NFD periodically scans the directories and reads any feature files and\nruns any hooks it finds.

\n\n

Custom feature source

\n\n

The custom feature source in nfd-worker provides a rule-based mechanism for\nlabel creation, similar to the\nNodeFeatureRule objects. The difference is\nthat the rules are specified in the worker configuration instead of a\nKubernetes API object.

\n\n

See worker configuration\nfor instructions how to set-up and manage the worker configuration.

\n\n

An example custom feature source configuration

\n\n

Consider the following referential configuration for nfd-worker:

\n\n
core:\n  labelSources: [\"custom\"]\nsources:\n  custom:\n    - name: \"my sample rule\"\n      labels:\n        \"feature.node.kubenernetes.io/my-sample-feature\": \"true\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            dummy: {op: Exists}\n        - feature: kernel.config\n          matchExpressions:\n            X86: {op: In, value: [\"y\"]}\n
\n\n

It specifies one rule which creates node label\nfeature.node.kubenernetes.io/my-sample-feature=true if both of the following\nconditions are true (matchFeatures implements a logical AND over the\nmatchers):

\n\n\n\n

In addition, the configuration only enables the custom source, disabling all\nbuilt-in labels.

\n\n

Now, on X86 platforms the feature label appears after doing modprobe dummy on\na system and correspondingly the label is removed after rmmod dummy. Note a\nre-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).

\n\n

Additional configuration directory

\n\n

In addition to the rules defined in the nfd-worker configuration file, the\ncustom feature source can read more configuration files located in the\n/etc/kubernetes/node-feature-discovery/custom.d/ directory. This makes more\ndynamic and flexible configuration easier.

\n\n

As an example, consider having file\n/etc/kubernetes/node-feature-discovery/custom.d/my-rule.yaml with the\nfollowing content:

\n\n
- name: \"my e1000 rule\"\n  labels:\n    \"feature.node.kubenernetes.io/e1000.present\": \"true\"\n  matchFeatures:\n    - feature: kernel.loadedmodule\n      matchExpressions:\n        e1000: {op: Exists}\n
\n\n

This simple rule will create feature.node.kubenernetes.io/e1000.present=true\nlabel if the e1000 kernel module has been loaded.

\n\n

The\nsamples/custom-rules\nkustomize overlay sample contains an example for deploying a custom rule from a\nConfigMap.

\n\n

Node labels

\n\n

Feature labels have the following format:

\n\n
<namespace>/<name> = <value>\n
\n\n

The namespace part (i.e. prefix) of the labels is controlled by nfd:

\n\n\n\n

Feature rule format

\n\n

This section describes the rule format used in\nNodeFeatureRule objects and in the\nconfiguration of the custom feature source.

\n\n

It is based on a generic feature matcher that covers all features discovered by\nnfd-worker. The rules rely on a unified data model of the available features\nand a generic expression-based format. Features that can be used in the rules\nare described in detail in available features below.

\n\n

Take this rule as a referential example:

\n\n
    - name: \"my feature rule\"\n      labels:\n        \"feature.node.kubernetes.io/my-special-feature\": \"my-value\"\n      matchFeatures:\n        - feature: cpu.cpuid\n          matchExpressions:\n            AVX512F: {op: Exists}\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: In, value: [\"5\"]}\n            minor: {op: Gt, value: [\"1\"]}\n        - feature: pci.device\n          matchExpressions:\n            vendor: {op: In, value: [\"8086\"]}\n            class: {op: In, value: [\"0200\"]}\n
\n\n

This will yield feature.node.kubernetes.io/my-special-feature=my-value node\nlabel if all of these are true (matchFeatures implements a logical AND over\nthe matchers):

\n\n\n\n

Fields

\n\n

name

\n\n

The .name field is required and used as an identifier of the rule.

\n\n

labels

\n\n

The .labels is a map of the node labels to create if the rule matches.

\n\n

Take this rule as a referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-sample-rule-object\nspec:\n  rules:\n    - name: \"my dynamic label value rule\"\n      labels:\n        feature.node.kubernetes.io/linux-lsm-enabled: \"@kernel.config.LSM\"\n        feature.node.kubernetes.io/custom-label: \"customlabel\"\n
\n\n

Label linux-lsm-enabled uses the @ notation for dynamic values.\nThe value of the label will be the value of the attribute LSM\nof the feature kernel.config.

\n\n

The @<feature-name>.<element-name> format can be used to inject values of\ndetected features to the label. See\navailable features for possible values to use.

\n\n

This will yield into the following node label:

\n\n
  labels:\n    ...\n    feature.node.kubernetes.io/linux-lsm-enabled: apparmor\n    feature.node.kubernetes.io/custom-label: \"customlabel\"\n
\n\n

labelsTemplate

\n\n

The .labelsTemplate field specifies a text template for dynamically creating\nlabels based on the matched features. See templating for\ndetails.

\n\n
\n

NOTE: The labels field has priority over labelsTemplate, i.e.\nlabels specified in the labels field will override anything\noriginating from labelsTemplate.

\n
\n\n

annotations

\n\n

The .annotations field is a list of features to be advertised as node\nannotations.

\n\n

Take this rule as a referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: feature-annotations-example\nspec:\n  rules:\n    - name: \"annotation-example\"\n      annotations:\n        feature.node.kubernetes.io/defaul-ns-annotation: \"foo\"\n        custom.vendor.io/feature: \"baz\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: Exists}\n
\n\n

This will yield into the following node annotations:

\n\n
  annotations:\n    ...\n    feature.node.kubernetes.io/defaul-ns-annotation: \"foo\"\n    custom.vendor.io/feature: \"baz\"\n    ...\n
\n\n

NFD enforces some limitations to the namespace (or prefix)/ of the annotations:

\n\n\n\n
\n

NOTE: The annotations field has will only advertise features via node\nannotations the features won’t be advertised as node labels unless they are\nspecified in the labels field.

\n
\n\n

taints

\n\n

taints is a list of taint entries and each entry can have key, value and effect,\nwhere the value is optional. Effect could be NoSchedule, PreferNoSchedule\nor NoExecute. To learn more about the meaning of these effects, check out k8s documentation.

\n\n

Example NodeFeatureRule with taints:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-sample-rule-object\nspec:\n  rules:\n    - name: \"my sample taint rule\"\n      taints:\n        - effect: PreferNoSchedule\n          key: \"feature.node.kubernetes.io/special-node\"\n          value: \"true\"\n        - effect: NoExecute\n          key: \"feature.node.kubernetes.io/dedicated-node\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            dummy: {op: Exists}\n        - feature: kernel.config\n          matchExpressions:\n            X86: {op: In, value: [\"y\"]}\n
\n\n

In this example, if the my sample taint rule rule is matched,\nfeature.node.kubernetes.io/pci-0300_1d0f.present=true:NoExecute\nand feature.node.kubernetes.io/cpu-cpuid.ADX:NoExecute taints are set on the node.

\n\n

There are some limitations to the namespace part (i.e. prefix/) of the taint\nkey:

\n\n\n\n
\n

NOTE: taints field is not available for the custom rules of nfd-worker\nand only for NodeFeatureRule objects.

\n
\n\n

vars

\n\n

The .vars field is a map of values (key-value pairs) to store for subsequent\nrules to use. In other words, these are variables that are not advertised as\nnode labels. See backreferences for more details on the\nusage of vars.

\n\n

extendedResources

\n\n

The .extendedResources field is a list of extended resources to advertise.\nSee extended resources for more details.

\n\n

Take this rule as a referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-extended-resource-rule\nspec:\n  rules:\n    - name: \"my extended resource rule\"\n      extendedResources:\n        vendor.io/dynamic: \"@kernel.version.major\"\n        vendor.io/static: \"123\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: Exists}\n
\n\n

The extended resource vendor.io/dynamic is defined in the form @feature.attribute.\nThe value of the extended resource will be the value of the attribute major\nof the feature kernel.version.

\n\n

The @<feature-name>.<element-name> format can be used to inject values of\ndetected features to the extended resource. See\navailable features for possible values to use. Note that\nthe value must be eligible as a\nKubernetes resource quantity.

\n\n

This will yield into the following node status:

\n\n
  allocatable:\n    ...\n    vendor.io/dynamic: \"5\"\n    vendor.io/static: \"123\"\n    ...\n  capacity:\n    ...\n    vendor.io/dynamic: \"5\"\n    vendor.io/static: \"123\"\n    ...\n
\n\n

There are some limitations to the namespace part (i.e. prefix)/ of the Extended\nResources names:

\n\n\n\n
\n

NOTE: .extendedResources is not supported by the\ncustom feature source – it can only be used in\nNodeFeatureRule objects.

\n
\n\n

varsTemplate

\n\n

The .varsTemplate field specifies a text template for dynamically creating\nvars based on the matched features. See templating for details\non using templates and backreferences for more details on\nthe usage of vars.

\n\n
\n

NOTE: The vars field has priority over varsTemplate, i.e.\nvars specified in the vars field will override anything originating from\nvarsTemplate.

\n
\n\n

matchFeatures

\n\n

The .matchFeatures field specifies a feature matcher, consisting of a list of\nfeature matcher terms. It implements a logical AND over the terms i.e. all\nof them must match for the rule to trigger.

\n\n
      matchFeatures:\n        - feature: <feature-name>\n          matchExpressions:\n            <key>:\n              op: <op>\n              value:\n                - <value-1>\n                - ...\n          matchName:\n            op: <op>\n            value:\n                - <value-1>\n                - ...\n
\n\n

The .matchFeatures[].feature field specifies the feature which to evaluate.

\n\n
\n

NOTE:If both matchExpressions and\nmatchName are specified, they both must match.

\n
\n\n
matchExpressions
\n\n

The .matchFeatures[].matchExpressions field is used to match against the\nvalue(s) of a feature. The matchExpressions field consists of a set of\nexpressions, each of which is evaluated against all elements of the specified\nfeature.

\n\n
      matchExpressions:\n        <key>:\n          op: <op>\n          value:\n            - <value-1>\n            - ...\n
\n\n

In each MatchExpression the key specifies the name of of the feature element\n(flag and attribute features) or name of the attribute (instance\nfeatures) which to look for. The behavior of MatchExpression depends on the\nfeature type:

\n\n\n\n

The op field specifies the operator to apply. Valid values are described\nbelow.

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OperatorNumber of valuesMatches when
In1 or greaterInput is equal to one of the values
NotIn1 or greaterInput is not equal to any of the values
InRegexp1 or greaterValues of the MatchExpression are treated as regexps and input matches one or more of them
Exists0The key exists
DoesNotExist0The key does not exists
Gt1Input is greater than the value. Both the input and value must be integer numbers.
Lt1Input is less than the value. Both the input and value must be integer numbers.
GtLt2Input is between two values. Both the input and value must be integer numbers.
IsTrue0Input is equal to “true”
IsFalse0Input is equal “false”
\n\n

The value field of MatchExpression is a list of string arguments to the\noperator.

\n\n
matchName
\n\n

The .matchFeatures[].matchName field is used to match against the\nname(s) of a feature (whereas the matchExpressions field\nmatches against the value(s). The matchName field consists of a single\nexpression which is evaulated against the name of each element of the specified\nfeature.

\n\n
      matchName:\n        op: <op>\n        value:\n          - <value-1>\n          - ...\n
\n\n

The behavior of matchName depends on the feature type:

\n\n\n\n

The op field specifies the operator to apply. Same operators as for\nmatchExpressions above are available.

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OperatorNumber of valuesMatches
In1 or greaterAll name is equal to one of the values
NotIn1 or greaterAll name that is not equal to any of the values
InRegexp1 or greaterAll name that matches any of the values (treated as regexps)
Exists0All elements
\n\n

Other operators are not practical with matchName (DoesNotExist never\nmatches; Gt,Lt and GtLt are only usable if feature names are integers;\nIsTrue and IsFalse are only usable if the feature name is true or\nfalse).

\n\n

The value field is a list of string arguments to the operator.

\n\n

An example:

\n\n
      matchFeatures:\n        - feature: cpu.cpuid\n          matchName: {op: InRegexp, value: [\"^AVX\"]}\n
\n\n

The snippet above would match if any CPUID feature starting with AVX is present\n(e.g. AVX1 or AVX2 or AVX512F etc).

\n\n

matchAny

\n\n

The .matchAny field is a list of of matchFeatures\nmatchers. A logical OR is applied over the matchers, i.e. at least one of them\nmust match for the rule to trigger.

\n\n

Consider the following example:

\n\n
      matchAny:\n        - matchFeatures:\n            - feature: kernel.loadedmodule\n              matchExpressions:\n                kmod-1: {op: Exists}\n            - feature: pci.device\n              matchExpressions:\n                vendor: {op: In, value: [\"0eee\"]}\n                class: {op: In, value: [\"0200\"]}\n        - matchFeatures:\n            - feature: kernel.loadedmodule\n              matchExpressions:\n                kmod-2: {op: Exists}\n            - feature: pci.device\n              matchExpressions:\n                vendor: {op: In, value: [\"0fff\"]}\n                class: {op: In, value: [\"0200\"]}\n
\n\n

This matches if kernel module kmod-1 is loaded and a network controller from\nvendor 0eee is present, OR, if kernel module kmod-2 has been loaded and a\nnetwork controller from vendor 0fff is present (OR both of these conditions are\ntrue).

\n\n

Available features

\n\n

The following features are available for matching:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureFeature typesElementsValue typeDescription
cpu.cpuidflag  Supported CPU capabilities
  <cpuid-flag> CPUID flag is present
 attribute  CPU capability attributes
  AVX10_VERSIONintAVX10 vector ISA version (if supported)
cpu.cstateattribute  Status of cstates in the intel_idle cpuidle driver
  enabledbool‘true’ if cstates are set, otherwise ‘false’. Does not exist of intel_idle driver is not active.
cpu.modelattribute  CPU model related attributes
  familyintCPU family
  vendor_idstringCPU vendor ID
  idintCPU model ID
cpu.pstateattribute  State of the Intel pstate driver. Does not exist if the driver is not enabled.
  statusstringStatus of the driver, possible values are ‘active’ and ‘passive’
  turbobool‘true’ if turbo frequencies are enabled, otherwise ‘false’
  scalingstringActive scaling_governor, possible values are ‘powersave’ or ‘performance’.
cpu.rdtattribute  Intel RDT capabilities supported by the system
  <rdt-flag> RDT capability is supported, see RDT flags for details
  RDTL3CA_NUM_CLOSIDintThe number or available CLOSID (Class of service ID) for Intel L3 Cache Allocation Technology
cpu.securityattribute  Features related to security and trusted execution environments
  sgx.enabledbooltrue if Intel SGX (Software Guard Extensions) has been enabled, otherwise does not exist
  sgx.epcintThe total amount Intel SGX Encrypted Page Cache memory in bytes. It’s only present if sgx.enabled is true.
  se.enabledbooltrue if IBM Secure Execution for Linux is available and has been enabled, otherwise does not exist
  tdx.enabledbooltrue if Intel TDX (Trusted Domain Extensions) is available on the host and has been enabled, otherwise does not exist
  tdx.total_keysintThe total amount of keys an Intel TDX (Trusted Domain Extensions) host can provide. It’s only present if tdx.enabled is true.
  tdx.protectedbooltrue if a guest VM was started using Intel TDX (Trusted Domain Extensions), otherwise does not exist.
  sev.enabledbooltrue if AMD SEV (Secure Encrypted Virtualization) is available on the host and has been enabled, otherwise does not exist
  sev.es.enabledbooltrue if AMD SEV-ES (Encrypted State supported) is available on the host and has been enabled, otherwise does not exist
  sev.snp.enabledbooltrue if AMD SEV-SNP (Secure Nested Paging supported) is available on the host and has been enabled, otherwise does not exist
  sev.asidsintThe total amount of AMD SEV address-space identifiers (ASIDs), based on the /sys/fs/cgroup/misc.capacity information.
  sev.encrypted_state_idsintThe total amount of AMD SEV-ES and SEV-SNP supported, based on the /sys/fs/cgroup/misc.capacity information.
cpu.sstattribute  Intel SST (Speed Select Technology) capabilities
  bf.enabledbooltrue if Intel SST-BF (Intel Speed Select Technology - Base frequency) has been enabled, otherwise does not exist
cpu.topologyattribute  CPU topology related features
  hardware_multithreadingboolHardware multithreading, such as Intel HTT, is enabled
  socket_countintNumber of CPU Sockets
cpu.coprocessorattribute  CPU Coprocessor related features
  nx_gzipboolNest Accelerator GZIP support is enabled
kernel.configattribute  Kernel configuration options
  <config-flag>stringValue of the kconfig option
kernel.loadedmoduleflag  Kernel modules loaded on the node as reported by /proc/modules
kernel.enabledmoduleflag  Kernel modules loaded on the node and available as built-ins as reported by modules.builtin
  mod-name Kernel module <mod-name> is loaded
kernel.selinuxattribute  Kernel SELinux related features
  enabledbooltrue if SELinux has been enabled and is in enforcing mode, otherwise false
kernel.versionattribute  Kernel version information
  fullstringFull kernel version (e.g. ‘4.5.6-7-g123abcde’)
  majorintFirst component of the kernel version (e.g. ‘4’)
  minorintSecond component of the kernel version (e.g. ‘5’)
  revisionintThird component of the kernel version (e.g. ‘6’)
local.labelattribute  Labels from feature files and hooks, i.e. labels from the local feature source
local.featureattribute  Features from feature files and hooks, i.e. features from the local feature source
  <label-name>stringLabel <label-name> created by the local feature source, value equals the value of the label
memory.nvinstance  NVDIMM devices present in the system
  <sysfs-attribute>stringValue of the sysfs device attribute, available attributes: devtype, mode
memory.numaattribute  NUMA nodes
  is_numabooltrue if NUMA architecture, false otherwise
  node_countintNumber of NUMA nodes
memory.swapattribute  Swap enabled on node
  enabledbooltrue if swap partition detected, false otherwise
network.deviceinstance  Physical (non-virtual) network interfaces present in the system
  namestringName of the network interface
  <sysfs-attribute>stringSysfs network interface attribute, available attributes: operstate, speed, sriov_numvfs, sriov_totalvfs
network.virtualinstance  Virtual network interfaces present in the system
  namestringName of the network interface
  <sysfs-attribute>stringSysfs network interface attribute, available attributes: operstate, speed
pci.deviceinstance  PCI devices present in the system
  <sysfs-attribute>stringValue of the sysfs device attribute, available attributes: class, vendor, device, subsystem_vendor, subsystem_device, sriov_totalvfs, iommu_group/type, iommu/intel-iommu/version
storage.blockinstance  Block storage devices present in the system
  namestringName of the block device
  <sysfs-attribute>stringSysfs network interface attribute, available attributes: dax, rotational, nr_zones, zoned
system.osreleaseattribute  System identification data from /etc/os-release
  <parameter>stringOne parameter from /etc/os-release
system.dmiidattribute  DMI identification data from /sys/devices/virtual/dmi/id/
  sys_vendorstringVendor name from /sys/devices/virtual/dmi/id/sys_vendor
system.nameattribute  System name information
  nodenamestringName of the kubernetes node object
usb.deviceinstance  USB devices present in the system
  <sysfs-attribute>stringValue of the sysfs device attribute, available attributes: class, vendor, device, serial
rule.matchedattribute  Previously matched rules
  <label-or-var>stringLabel or var from a preceding rule that matched
\n\n

Intel RDT flags

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
RDTMONIntel RDT Monitoring Technology
RDTCMTIntel Cache Monitoring (CMT)
RDTMBMIntel Memory Bandwidth Monitoring (MBM)
RDTL3CAIntel L3 Cache Allocation Technology
RDTl2CAIntel L2 Cache Allocation Technology
RDTMBAIntel Memory Bandwidth Allocation (MBA) Technology
\n\n

Templating

\n\n

Rules support template-based creation of labels and vars with the\n.labelsTemplate and .varsTemplate fields. These makes it possible to\ndynamically generate labels and vars based on the features that matched.

\n\n

The template must expand into a simple format with <key>=<value> pairs\nseparated by newline.

\n\n

Consider the following example:\n

\n\n
    labelsTemplate: |\n      {{ range .pci.device }}vendor-{{ .class }}-{{ .device }}.present=true\n      {{ end }}\n    matchFeatures:\n      - feature: pci.device\n        matchExpressions:\n          class: {op: InRegexp, value: [\"^02\"]}\n          vendor: [\"0fff\"]\n
\n\n\n

The rule above will create individual labels\nfeature.node.kubernetes.io/vendor-<class-id>-<device-id>.present=true for\neach network controller device (device class starting with 02) from vendor\n0fff.

\n\n

All the matched features of each feature matcher term under matchFeatures\nfields are available for the template engine. Matched features can be\nreferenced with {{ .<feature-name> }} in the template, and\nthe available data could be described in yaml as follows:

\n\n
.\n  <key-feature>:\n    - Name: <matched-key>\n    - ...\n\n  <value-feature>:\n    - Name: <matched-key>\n      Value: <matched-value>\n    - ...\n\n  <instance-feature>:\n    - <attribute-1-name>: <attribute-1-value>\n      <attribute-2-name>: <attribute-2-value>\n      ...\n    - ...\n
\n\n

That is, the per-feature data is a list of objects whose data fields depend on\nthe type of the feature:

\n\n\n\n

A simple example of a template utilizing name and value from an attribute\nfeature:\n

\n\n
    labelsTemplate: |\n      {{ range .system.osrelease }}system-{{ .Name }}={{ .Value }}\n      {{ end }}\n    matchFeatures:\n      - feature: system.osRelease\n        matchExpressions:\n          ID: {op: Exists}\n          VERSION_ID.major: {op: Exists}\n
\n\n\n
\n

NOTE:If both matchExpressions and matchName for a feature matcher\nterm (see matchFeatures) is specified, the list of\nmatched features (for the template engine) is the union from both of these.\n\nNOTE: In case of matchAny is specified, the template is executed\nseparately against each individual matchFeatures field and the final set of\nlabels will be superset of all these separate template expansions. E.g.\nconsider the following:

\n
\n\n
  - name: <name>\n    labelsTemplate: <template>\n    matchFeatures: <matcher#1>\n    matchAny:\n      - matchFeatures: <matcher#2>\n      - matchFeatures: <matcher#3>\n
\n\n

In the example above (assuming the overall result is a match) the template\nwould be executed on matcher#1 as well as on matcher#2 and/or matcher#3\n(depending on whether both or only one of them match). All the labels from\nthese separate expansions would be created, i.e. the end result would be a\nunion of all the individual expansions.

\n\n

Rule templates use the Golang text/template\npackage and all its built-in functionality (e.g. pipelines and functions) can\nbe used. An example template taking use of the built-in len function,\nadvertising the number of PCI network controllers from a specific vendor:\n

\n\n
    labelsTemplate: |\n      num-intel-network-controllers={{ .pci.device | len }}\n    matchFeatures:\n      - feature: pci.device\n        matchExpressions:\n          vendor: {op: In, value: [\"8086\"]}\n          class: {op: In, value: [\"0200\"]}\n\n
\n\n\n

Imaginative template pipelines are possible, but care must be taken to\nproduce understandable and maintainable rule sets.

\n\n

Backreferences

\n\n

Rules support referencing the output of preceding rules. This enables\nsophisticated scenarios where multiple rules are combined together\nto for more complex heuristics than a single rule can provide. The labels and\nvars created by the execution of preceding rules are available as a special\nrule.matched feature.

\n\n

Consider the following configuration:

\n\n
  - name: \"my kernel label rule\"\n    labels:\n      kernel-feature: \"true\"\n    matchFeatures:\n      - feature: kernel.version\n        matchExpressions:\n          major: {op: Gt, value: [\"4\"]}\n\n  - name: \"my var rule\"\n    vars:\n      nolabel-feature: \"true\"\n    matchFeatures:\n      - feature: cpu.cpuid\n        matchExpressions:\n          AVX512F: {op: Exists}\n      - feature: pci.device\n        matchExpressions:\n          vendor: {op: In, value: [\"0fff\"]}\n          device: {op: In, value: [\"1234\", \"1235\"]}\n\n  - name: \"my high level feature rule\"\n    labels:\n      high-level-feature: \"true\"\n    matchFeatures:\n      - feature: rule.matched\n        matchExpressions:\n          kernel-feature: {op: IsTrue}\n          nolabel-feature: {op: IsTrue}\n
\n\n

The feature.node.kubernetes.io/high-level-feature = true label depends on the\ntwo previous rules.

\n\n

Note that when referencing rules across multiple\nNodeFeatureRule objects attention must be\npaid to the ordering. NodeFeatureRule objects are processed in alphabetical\norder (based on their .metadata.name).

\n\n

Examples

\n\n

Some more configuration examples below.

\n\n

Match certain CPUID features:

\n\n
  - name: \"example cpuid rule\"\n    labels:\n      my-special-cpu-feature: \"true\"\n    matchFeatures:\n      - feature: cpu.cpuid\n        matchExpressions:\n          AESNI: {op: Exists}\n          AVX: {op: Exists}\n
\n\n

Require a certain loaded kernel module and OS version:

\n\n
  - name: \"my multi-feature rule\"\n    labels:\n      my-special-multi-feature: \"true\"\n    matchFeatures:\n      - feature: kernel.loadedmodule\n        matchExpressions:\n          e1000: {op: Exists}\n      - feature: system.osrelease\n        matchExpressions:\n          NAME: {op: InRegexp, values: [\"^openSUSE\"]}\n          VERSION_ID.major: {op: Gt, values: [\"14\"]}\n
\n\n

Require a loaded kernel module and two specific PCI devices (both of which\nmust be present):

\n\n
  - name: \"my multi-device rule\"\n    labels:\n      my-multi-device-feature: \"true\"\n    matchFeatures:\n      - feature: kernel.loadedmodule\n        matchExpressions:\n          my-driver-module: {op: Exists}\n      - pci.device:\n          vendor: \"0fff\"\n          device: \"1234\"\n      - pci.device:\n          vendor: \"0fff\"\n          device: \"abcd\"\n
\n","dir":"/usage/","name":"customization-guide.md","path":"usage/customization-guide.md","url":"/usage/customization-guide.html"},{"title":"Versions","layout":"default","sort":9,"content":"

Versions and deprecation

\n\n
\n\n

Supported versions

\n\n

Node Feature Discovery follows semantic versioning where\nthe version number consists of three components, i.e. MAJOR.MINOR.PATCH.

\n\n

The most recent two minor releases (or release branches) of Node Feature\nDiscovery are supported. That is, with X being the latest release, X and X-1\nare supported and X-1 reaches end-of-life when X+1 is released.

\n\n

Deprecation policy

\n\n

Feature labels

\n\n

Built-in feature labels and\nfeatures are supported\nfor 2 releases after being deprecated, at minimum. That is, if a feature label\nis deprecated in version X, it will be supported in X+1 and X+2 and\nmay be dropped in X+3.

\n\n

Configuration options

\n\n

Command-line flags and configuration file options are supported for 1 more\nrelease after being deprecated, at minimum. That is, if option/flag is\ndeprecated in version X, it will be supported in X+1 and may be removed\nin X+2.

\n\n

The same policy (support for 1 release after deprecation) also applies to Helm\nchart parameters.

\n\n

Kubernetes compatibility

\n\n

Node Feature Discovery is compatible with Kubernetes v1.24 and later.

\n","dir":"/reference/","name":"versions.md","path":"reference/versions.md","url":"/reference/versions.html"},{"title":"Examples and demos","layout":"default","sort":9,"content":"

Examples and demos

\n\n

Table of contents

\n\n
    \n
  1. Demos
      \n
    1. Usage demo
    2. \n
    3. Demo use case
    4. \n
    \n
  2. \n
\n\n
\n\n

This page contains usage examples and demos.

\n\n

Demos

\n\n

Usage demo

\n\n

\"asciicast\"

\n\n

Demo use case

\n\n

A demo on the benefits of using node feature discovery can be found in the\nsource code repository under\ndemo/.

\n","dir":"/usage/","name":"examples-and-demos.md","path":"usage/examples-and-demos.md","url":"/usage/examples-and-demos.html"},{"title":"Feature Gates","layout":"default","sort":10,"content":"

Feature Gates

\n\n
\n\n

Feature gates are a set of key-value pairs that control the behavior of NFD.\nThey are used to enable or disable certain features of NFD.\nThe feature gates are set using the -feature-gates command line flag or\nfeatureGates value in the Helm chart. The following feature gates are available:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameDefaultStageSinceUntil
NodeFeatureAPItrueBetaV0.14 
DisableAutoPrefixfalseAlphaV0.16 
NodeFeatureGroupAPIfalseAlphaV0.16 
\n\n

NodeFeatureAPI

\n\n

The NodeFeatureAPI feature gate enables the Node Feature API.\nWhen enabled, NFD will register the Node Feature API with the Kubernetes API\nserver. The Node Feature API is used to expose node-specific hardware and\nsoftware features to the Kubernetes scheduler. The Node Feature API is a beta\nfeature and is enabled by default.

\n\n

NodeFeatureGroupAPI

\n\n

The NodeFeatureGroupAPI feature gate enables the Node Feature Group API.\nWhen enabled, NFD will register the Node Feature Group API with the Kubernetes API\nserver. The Node Feature Group API is used to create node groups based on\nhardware and software features. The Node Feature Group API is an alpha feature\nand is disabled by default.

\n\n

DisableAutoPrefix

\n\n

The DisableAutoPrefix feature gate controls the automatic prefixing of names.\nWhen enabled nfd-master does not automatically add the default\nfeature.node.kubernetes.io/ prefix to unprefixed labels, annotations and\nextended resources. Automatic prefixing is the default behavior in NFD v0.16\nand earlier.

\n\n

Note that enabling the feature gate effectively causes unprefixed names to be\nfiltered out as NFD does not allow unprefixed names of labels, annotations or\nextended resources. For example, with the DisableAutoPrefix feature gate set\nto false, a NodeFeatureRule with

\n\n
  labels:\n    foo: bar\n
\n\n

will turn into feature.node.kubernetes.io/foo=bar node label. With\nDisableAutoPrefix set to true, no prefix is added and the label will be\nfiltered out.

\n\n

Note that taint keys are not affected by this feature gate.

\n","dir":"/reference/","name":"feature-gates.md","path":"reference/feature-gates.md","url":"/reference/feature-gates.html"},{"title":"Kubectl plugin","layout":"default","sort":10,"content":"

Kubectl plugin

\n\n

Table of contents

\n\n
    \n
  1. Overview
      \n
    1. Validate
    2. \n
    3. Test
    4. \n
    5. DryRun
    6. \n
    \n
  2. \n
\n\n
\n\n
\n

Developer Preview This feature is currently in developer preview and\nsubject to change. It is not recommended to use it in production\nenvironments.

\n
\n\n

Overview

\n\n

The kubectl plugin kubectl nfd can be used to validate/dryrun and test\nNodeFeatureRule objects. It can be installed with the following command:

\n\n
git clone https://github.com/kubernetes-sigs/node-feature-discovery\ncd node-feature-discovery\nmake build-kubectl-nfd\nKUBECTL_PATH=/usr/local/bin/\nmv ./bin/kubectl-nfd ${KUBECTL_PATH}\n
\n\n

Validate

\n\n

The plugin can be used to validate a NodeFeatureRule object:

\n\n
kubectl nfd validate -f <nodefeaturerule.yaml>\n
\n\n

Test

\n\n

The plugin can be used to test a NodeFeatureRule object against a node:

\n\n
kubectl nfd test -f <nodefeaturerule.yaml> -n <node-name>\n
\n\n

DryRun

\n\n

The plugin can be used to DryRun a NodeFeatureRule object against a NodeFeature\nfile:

\n\n
kubectl get -n node-feature-discovery nodefeature <nodename> -o yaml > <nodefeature.yaml>\nkubectl nfd dryrun -f <nodefeaturerule.yaml> -n <nodefeature.yaml>\n
\n\n

Or you can use the example NodeFeature file(it is a minimal NodeFeature file):

\n\n
$ kubectl nfd dryrun -f examples/nodefeaturerule.yaml -n examples/nodefeature.yaml\nEvaluating NodeFeatureRule \"examples/nodefeaturerule.yaml\" against NodeFeature \"examples/nodefeature.yaml\"\nProcessing rule:  my sample rule\n*** Labels ***\nvendor.io/my-sample-feature=true\nNodeFeatureRule \"examples/nodefeaturerule.yaml\" is valid for NodeFeature \"examples/nodefeature.yaml\"\n
\n","dir":"/usage/","name":"kubectl-plugin.md","path":"usage/kubectl-plugin.md","url":"/usage/kubectl-plugin.html"}] \ No newline at end of file +[{"title":"Image variants","layout":"default","sort":1,"content":"

Image variants

\n\n
\n\n

NFD offers two variants of the container image. Released container images are\navailable for x86_64 and Arm64 architectures.

\n\n

Default

\n\n

The default is a minimal image based on\nscratch\nand only supports running statically linked binaries.

\n\n

For backwards compatibility a container image tag with suffix -minimal\n(e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.4-minimal) is provided.

\n\n

Full

\n\n

This image is based on debian:bookworm-slim\nand contains a full Linux system for running shell-based nfd-worker hooks and\ndoing live debugging and diagnosis of the NFD images.

\n\n

The container image tag has suffix -full\n(e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.4-full).

\n","dir":"/deployment/","name":"image-variants.md","path":"deployment/image-variants.md","url":"/deployment/image-variants.html"},{"title":"Get started","layout":"default","sort":1,"content":"

Node Feature Discovery

\n\n

Welcome to Node Feature Discovery – a Kubernetes add-on for detecting hardware\nfeatures and system configuration!

\n\n

Continue to:

\n\n\n\n

Quick-start – the short-short version

\n\n
$ kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4\n  namespace/node-feature-discovery created\n  serviceaccount/nfd-master created\n  clusterrole.rbac.authorization.k8s.io/nfd-master created\n  clusterrolebinding.rbac.authorization.k8s.io/nfd-master created\n  configmap/nfd-worker-conf created\n  service/nfd-master created\n  deployment.apps/nfd-master created\n  daemonset.apps/nfd-worker created\n\n$ kubectl -n node-feature-discovery get all\n  NAME                              READY   STATUS    RESTARTS   AGE\n  pod/nfd-master-555458dbbc-sxg6w   1/1     Running   0          56s\n  pod/nfd-worker-mjg9f              1/1     Running   0          17s\n...\n\n$ kubectl get nodes -o json | jq '.items[].metadata.labels'\n  {\n    \"kubernetes.io/arch\": \"amd64\",\n    \"kubernetes.io/os\": \"linux\",\n    \"feature.node.kubernetes.io/cpu-cpuid.ADX\": \"true\",\n    \"feature.node.kubernetes.io/cpu-cpuid.AESNI\": \"true\",\n...\n\n
\n","dir":"/get-started/","name":"index.md","path":"get-started/index.md","url":"/get-started/"},{"title":"Introduction","layout":"default","sort":1,"content":"

Introduction

\n\n

Table of contents

\n\n
    \n
  1. NFD-Master
  2. \n
  3. NFD-Worker
  4. \n
  5. NFD-Topology-Updater
  6. \n
  7. NFD-GC
  8. \n
  9. Feature Discovery
  10. \n
  11. Node annotations
  12. \n
  13. Custom resources
  14. \n
\n\n
\n\n

This software enables node feature discovery for Kubernetes. It detects\nhardware features available on each node in a Kubernetes cluster, and\nadvertises those features using node labels and optionally node extended\nresources, annotations and node taints. Node Feature Discovery is compatible\nwith any recent version of Kubernetes (v1.24+).

\n\n

NFD consists of four software components:

\n\n
    \n
  1. nfd-master
  2. \n
  3. nfd-worker
  4. \n
  5. nfd-topology-updater
  6. \n
  7. nfd-gc
  8. \n
\n\n

NFD-Master

\n\n

NFD-Master is the daemon responsible for communication towards the Kubernetes\nAPI. That is, it receives labeling requests from the worker and modifies node\nobjects accordingly.

\n\n

NFD-Worker

\n\n

NFD-Worker is a daemon responsible for feature detection. It then communicates\nthe information to nfd-master which does the actual node labeling. One\ninstance of nfd-worker is supposed to be running on each node of the cluster,

\n\n

NFD-Topology-Updater

\n\n

NFD-Topology-Updater is a daemon responsible for examining allocated\nresources on a worker node to account for resources available to be allocated\nto new pod on a per-zone basis (where a zone can be a NUMA node). It then\ncreates or updates a\nNodeResourceTopology custom\nresource object specific to this node. One instance of nfd-topology-updater is\nsupposed to be running on each node of the cluster.

\n\n

NFD-GC

\n\n

NFD-GC is a daemon responsible for cleaning obsolete\nNodeFeature and\nNodeResourceTopology objects.

\n\n

One instance of nfd-gc is supposed to be running in the cluster.

\n\n

Feature Discovery

\n\n

Feature discovery is divided into domain-specific feature sources:

\n\n\n\n

Each feature source is responsible for detecting a set of features which. in\nturn, are turned into node feature labels. Feature labels are prefixed with\nfeature.node.kubernetes.io/ and also contain the name of the feature source.\nNon-standard user-specific feature labels can be created with the local and\ncustom feature sources.

\n\n

An overview of the default feature labels:

\n\n
{\n  \"feature.node.kubernetes.io/cpu-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/custom-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/kernel-<feature name>\": \"<feature value>\",\n  \"feature.node.kubernetes.io/memory-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/network-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/pci-<device label>.present\": \"true\",\n  \"feature.node.kubernetes.io/storage-<feature-name>\": \"true\",\n  \"feature.node.kubernetes.io/system-<feature name>\": \"<feature value>\",\n  \"feature.node.kubernetes.io/usb-<device label>.present\": \"<feature value>\",\n  \"feature.node.kubernetes.io/<file name>-<feature name>\": \"<feature value>\"\n}\n
\n\n

Node annotations

\n\n

NFD also annotates nodes it is running on:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
AnnotationDescription
[<instance>.]nfd.node.kubernetes.io/feature-labelsComma-separated list of node labels managed by NFD. NFD uses this internally so must not be edited by users.
[<instance>.]nfd.node.kubernetes.io/feature-annotationsComma-separated list of node annotations managed by NFD. NFD uses this internally so must not be edited by users.
[<instance>.]nfd.node.kubernetes.io/extended-resourcesComma-separated list of node extended resources managed by NFD. NFD uses this internally so must not be edited by users.
[<instance>.]nfd.node.kubernetes.io/taintsComma-separated list of node taints managed by NFD. NFD uses this internally so must not be edited by users.
\n\n
\n

NOTE: the -instance\ncommand line flag affects the annotation names

\n
\n\n

Unapplicable annotations are not created, i.e. for example\nnfd.node.kubernetes.io/extended-resources is only placed if some extended\nresources were created by NFD.

\n\n

Custom resources

\n\n

NFD takes use of some Kubernetes Custom Resources.

\n\n

NodeFeatures\nis be used for representing node features and requesting node labels to be\ngenerated.

\n\n

NFD-Master uses NodeFeatureRules\nfor custom labeling of nodes.

\n\n

NFD-Topology-Updater creates\nNodeResourceTopology objects\nthat describe the hardware topology of node resources.

\n","dir":"/get-started/","name":"introduction.md","path":"get-started/introduction.md","url":"/get-started/introduction.html"},{"title":"Master cmdline reference","layout":"default","sort":1,"content":"

Commandline flags of nfd-master

\n\n

Table of contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -feature-gates
  6. \n
  7. -prune
  8. \n
  9. -port
  10. \n
  11. -metrics
  12. \n
  13. -instance
  14. \n
  15. -ca-file
  16. \n
  17. -cert-file
  18. \n
  19. -key-file
  20. \n
  21. -verify-node-name
  22. \n
  23. -enable-nodefeature-api
  24. \n
  25. -enable-leader-election
  26. \n
  27. -enable-taints
  28. \n
  29. -no-publish
  30. \n
  31. -crd-controller
  32. \n
  33. -featurerules-controller
  34. \n
  35. -label-whitelist
  36. \n
  37. -extra-label-ns
  38. \n
  39. -deny-label-ns
  40. \n
  41. -resource-labels
  42. \n
  43. -config
  44. \n
  45. -options
  46. \n
  47. -nfd-api-parallelism
  48. \n
  49. Logging
  50. \n
  51. -resync-period
  52. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-master -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 nfd-master -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-feature-gates

\n\n

The -feature-gates flag is used to enable or disable non GA features.\nThe list of available feature gates can be found in the feature gates\ndocumentation.

\n\n

Example:

\n\n
nfd-master -feature-gates NodeFeatureAPI=false\n
\n\n

-prune

\n\n

The -prune flag is a sub-command like option for cleaning up the cluster. It\ncauses nfd-master to remove all NFD related labels, annotations and extended\nresources from all Node objects of the cluster and exit.

\n\n

-port

\n\n

The -port flag specifies the TCP port that nfd-master listens for incoming requests.

\n\n

Default: 8080

\n\n

Example:

\n\n
nfd-master -port=443\n
\n\n

-metrics

\n\n

The -metrics flag specifies the port on which to expose\nPrometheus metrics. Setting this to 0 disables the\nmetrics server on nfd-master.

\n\n

Default: 8081

\n\n

Example:

\n\n
nfd-master -metrics=12345\n
\n\n

-instance

\n\n

The -instance flag makes it possible to run multiple NFD deployments in\nparallel. In practice, it separates the node annotations between deployments so\nthat each of them can store metadata independently. The instance name must\nstart and end with an alphanumeric character and may only contain alphanumeric\ncharacters, -, _ or ..

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -instance=network\n
\n\n

-ca-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -ca-file is one of the three flags (together with -cert-file and\n-key-file) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the TLS root certificate that is used for\nauthenticating incoming connections. NFD-Worker side needs to have matching key\nand cert files configured for the incoming requests to be accepted.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -key-file

\n
\n\n

Example:

\n\n
nfd-master -ca-file=/opt/nfd/ca.crt -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key\n
\n\n

-cert-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -cert-file is one of the three flags (together with -ca-file and\n-key-file) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the TLS certificate presented for\nauthenticating outgoing traffic towards nfd-worker.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -ca-file and -key-file

\n
\n\n

Example:

\n\n
nfd-master -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key -ca-file=/opt/nfd/ca.crt\n
\n\n

-key-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -key-file is one of the three flags (together with -ca-file and\n-cert-file) controlling master-worker mutual TLS authentication on the\nnfd-master side. This flag specifies the private key corresponding the given\ncertificate file (-cert-file) that is used for authenticating outgoing\ntraffic.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -ca-file

\n
\n\n

Example:

\n\n
nfd-master -key-file=/opt/nfd/master.key -cert-file=/opt/nfd/master.crt -ca-file=/opt/nfd/ca.crt\n
\n\n

-verify-node-name

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -verify-node-name flag controls the NodeName based authorization of\nincoming requests and only has effect when mTLS authentication has been enabled\n(with -ca-file, -cert-file and -key-file). If enabled, the worker node\nname of the incoming must match with the CN or a SAN in its TLS certificate. Thus,\nworkers are only able to label the node they are running on (or the node whose\ncertificate they present).

\n\n

Node Name based authorization is disabled by default.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-master -verify-node-name -ca-file=/opt/nfd/ca.crt \\\n    -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key\n
\n\n

-enable-nodefeature-api

\n\n

DEPRECATED: will be removed in NFD v0.17. Use’\n-feature-gates\nNodeFeatureAPI instead.

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.

\n
\n\n

The -enable-nodefeature-api flag enables/disables the\nNodeFeature CRD API for receiving\nfeature requests. This will also automatically disable/enable the gRPC\ninterface.

\n\n

Default: true

\n\n

Example:

\n\n
nfd-master -enable-nodefeature-api=false\n
\n\n

-enable-leader-election

\n\n

The -enable-leader-election flag enables leader election for NFD-Master.\nIt is advised to turn on this flag when running more than one instance of\nNFD-Master.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: false

\n\n
nfd-master -enable-leader-election\n
\n\n

-enable-taints

\n\n

The -enable-taints flag enables/disables node tainting feature of NFD.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-master -enable-taints=true\n
\n\n

-no-publish

\n\n

The -no-publish flag disables updates to the Node objects in the Kubernetes\nAPI server, making a “dry-run” flag for nfd-master. No Labels, Annotations or\nExtendedResources of nodes are updated.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-master -no-publish\n
\n\n

-crd-controller

\n\n
\n

NOTE This flag will be removed in a future release at the same time with\nthe deprecated gRPC API.

\n
\n\n

The -crd-controller flag specifies whether the NFD CRD API controller is\nenabled or not. The controller is responsible for processing\nNodeFeature and\nNodeFeatureRule objects.

\n\n

Default: true

\n\n

Example:

\n\n
nfd-master -crd-controller=false\n
\n\n

-featurerules-controller

\n\n

DEPRECATED: use -crd-controller instead.

\n\n

-label-whitelist

\n\n

The -label-whitelist specifies a regular expression for filtering feature\nlabels based on their name. Each label must match against the given regular\nexpression or it will not be published.

\n\n
\n

NOTE: The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label namespace is\nomitted.

\n
\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -label-whitelist='.*cpuid\\.'\n
\n\n

-extra-label-ns

\n\n

The -extra-label-ns flag specifies a comma-separated list of allowed feature\nlabel namespaces. This option can be used to allow\nother vendor or application specific namespaces for custom labels from the\nlocal and custom feature sources, even though these labels were denied using\nthe deny-label-ns flag.

\n\n

The same namespace control and this flag applies Extended Resources (created\nwith -resource-labels), too.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -extra-label-ns=vendor-1.com,vendor-2.io\n
\n\n

-deny-label-ns

\n\n

The -deny-label-ns flag specifies a comma-separated list of excluded\nlabel namespaces. By default, nfd-master allows creating labels in all\nnamespaces, excluding kubernetes.io namespace and its sub-namespaces\n(i.e. *.kubernetes.io). However, you should note that\nkubernetes.io and its sub-namespaces are always denied.\nFor example, nfd-master -deny-label-ns=\"\" would still disallow\nkubernetes.io and *.kubernetes.io.\nThis option can be used to exclude some vendors or application specific\nnamespaces.\nNote that the namespaces feature.node.kubernetes.io and profile.node.kubernetes.io\nand their sub-namespaces are always allowed and cannot be denied.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -deny-label-ns=*.vendor.com,vendor-2.io\n
\n\n

-resource-labels

\n\n

DEPRECATED: NodeFeatureRule\nshould be used for managing extended resources in NFD.

\n\n

The -resource-labels flag specifies a comma-separated list of features to be\nadvertised as extended resources instead of labels. Features that have integer\nvalues can be published as Extended Resources by listing them in this flag.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -resource-labels=vendor-1.com/feature-1,vendor-2.io/feature-2\n
\n\n

-config

\n\n

The -config flag specifies the path of the nfd-master configuration file to\nuse.

\n\n

Default: /etc/kubernetes/node-feature-discovery/nfd-master.conf

\n\n

Example:

\n\n
nfd-master -config=/opt/nfd/master.conf\n
\n\n

-options

\n\n

The -options flag may be used to specify and override configuration file\noptions directly from the command line. The required format is the same as in\nthe config file i.e. JSON or YAML. Configuration options specified via this\nflag will override those from the configuration file:

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-master -options='{\"noPublish\": true}'\n
\n\n

-nfd-api-parallelism

\n\n

The -nfd-api-parallelism flag can be used to specify the maximum\nnumber of concurrent node updates.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 10

\n\n

Example:

\n\n
nfd-master -nfd-api-parallelism=1\n
\n\n

Logging

\n\n

The following logging-related flags are inherited from the\nklog package.

\n\n

-add_dir_header

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

-alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

-log_backtrace_at

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

-log_dir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

-log_file

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

-log_file_max_size

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

-logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

-skip_headers

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

-skip_log_headers

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

-stderrthreshold

\n\n

Logs at or above this threshold go to stderr.

\n\n

Default: 2

\n\n

-v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

-vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n\n

-resync-period

\n\n

The -resync-period flag specifies the NFD API controller resync period.\nThe resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,\nthus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,\nextended resources and taints are in place).

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 1 hour.

\n\n

Example:

\n\n
nfd-master -resync-period=2h\n
\n","dir":"/reference/","name":"master-commandline-reference.md","path":"reference/master-commandline-reference.md","url":"/reference/master-commandline-reference.html"},{"title":"Feature labels","layout":"default","sort":1,"content":"

Feature labels

\n\n

Table of contents

\n\n
    \n
  1. Built-in labels
      \n
    1. CPU
    2. \n
    3. Kernel
    4. \n
    5. Memory
    6. \n
    7. Network
    8. \n
    9. PCI
    10. \n
    11. USB
    12. \n
    13. Storage
    14. \n
    15. System
    16. \n
    17. Custom
    18. \n
    \n
  2. \n
  3. User defined labels
  4. \n
  5. Extended resources
  6. \n
\n\n
\n\n

Features are advertised as labels in the Kubernetes Node object.

\n\n

Built-in labels

\n\n

Label creation in nfd-worker is performed by a set of separate modules called\nlabel sources. The\ncore.labelSources\nconfiguration option (or\n-label-sources\nflag) of nfd-worker controls which sources to enable for label generation.

\n\n

All built-in labels use the feature.node.kubernetes.io label namespace and\nhave the following format.

\n\n
feature.node.kubernetes.io/<feature> = <value>\n
\n\n
\n

NOTE: Consecutive runs of nfd-worker will update the labels on a given\nnode. If features are not discovered on a consecutive run, the corresponding\nlabel will be removed. This includes any restrictions placed on the\nconsecutive run, such as restricting discovered features with the\n-label-whitelist\nflag of nfd-master or\ncore.labelWhiteList\noption of nfd-worker.

\n
\n\n

CPU

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Feature nameValueDescription
cpu-cpuid.<cpuid-flag>trueCPU capability is supported. NOTE: the capability might be supported but not enabled.
cpu-cpuid.<cpuid-attribute>stringCPU attribute value
cpu-hardware_multithreadingtrueHardware multithreading, such as Intel HTT, enabled (number of logical CPUs is greater than physical CPUs)
cpu-coprocessor.nx_gziptrueNest Accelerator for GZIP is supported(Power).
cpu-power.sst_bf.enabledtrueIntel SST-BF (Intel Speed Select Technology - Base frequency) enabled
cpu-pstate.statusstringThe status of the Intel pstate driver when in use and enabled, either ‘active’ or ‘passive’.
cpu-pstate.turboboolSet to ‘true’ if turbo frequencies are enabled in Intel pstate driver, set to ‘false’ if they have been disabled.
cpu-pstate.scaling_governorstringThe value of the Intel pstate scaling_governor when in use, either ‘powersave’ or ‘performance’.
cpu-cstate.enabledboolSet to ‘true’ if cstates are set in the intel_idle driver, otherwise set to ‘false’. Unset if intel_idle cpuidle driver is not active.
cpu-security.sgx.enabledtrueSet to ‘true’ if Intel SGX is enabled in BIOS (based on a non-zero sum value of SGX EPC section sizes).
cpu-security.se.enabledtrueSet to ‘true’ if IBM Secure Execution for Linux (IBM Z & LinuxONE) is available and enabled (requires /sys/firmware/uv/prot_virt_host facility)
cpu-security.tdx.enabledtrueSet to ‘true’ if Intel TDX is available on the host and has been enabled (requires /sys/module/kvm_intel/parameters/tdx).
cpu-security.tdx.protectedtrueSet to ‘true’ if Intel TDX was used to start the guest node, based on the existence of the “TDX_GUEST” information as part of cpuid features.
cpu-security.sev.enabledtrueSet to ‘true’ if ADM SEV is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev).
cpu-security.sev.es.enabledtrueSet to ‘true’ if ADM SEV-ES is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_es).
cpu-security.sev.snp.enabledtrueSet to ‘true’ if ADM SEV-SNP is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_snp).
cpu-model.vendor_idstringComparable CPU vendor ID.
cpu-model.familyintCPU family.
cpu-model.idintCPU model number.
\n\n

The CPU label source is configurable, see\nworker configuration and\nsources.cpu\nconfiguration options for details.

\n\n

X86 CPUID flags (partial list)

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
ADXMulti-Precision Add-Carry Instruction Extensions (ADX)
AESNIAdvanced Encryption Standard (AES) New Instructions (AES-NI)
APX_FIntel Advanced Performance Extensions (APX)
AVX10Intel Advanced Vector Extensions 10 (AVX10)
AVX10_256, AVX10_512Intel AVX10 256-bit and 512-bit vector support
AVXAdvanced Vector Extensions (AVX)
AVX2Advanced Vector Extensions 2 (AVX2)
AVXIFMAAVX-IFMA instructions
AVXVNNIAVX (VEX encoded) VNNI neural network instructions
AMXBF16Advanced Matrix Extension, tile multiplication operations on BFLOAT16 numbers
AMXINT8Advanced Matrix Extension, tile multiplication operations on 8-bit integers
AMXFP16Advanced Matrix Extension, tile multiplication operations on FP16 numbers
AMXTILEAdvanced Matrix Extension, base tile architecture support
AVX512BF16AVX-512 BFLOAT16 instructions
AVX512BITALGAVX-512 bit Algorithms
AVX512BWAVX-512 byte and word Instructions
AVX512CDAVX-512 conflict detection instructions
AVX512DQAVX-512 doubleword and quadword instructions
AVX512ERAVX-512 exponential and reciprocal instructions
AVX512FAVX-512 foundation
AVX512FP16AVX-512 FP16 instructions
AVX512IFMAAVX-512 integer fused multiply-add instructions
AVX512PFAVX-512 prefetch instructions
AVX512VBMIAVX-512 vector bit manipulation instructions
AVX512VBMI2AVX-512 vector bit manipulation instructions, version 2
AVX512VLAVX-512 vector length extensions
AVX512VNNIAVX-512 vector neural network instructions
AVX512VP2INTERSECTAVX-512 intersect for D/Q
AVX512VPOPCNTDQAVX-512 vector population count doubleword and quadword
AVXNECONVERTAVX-NE-CONVERT instructions
AVXVNNIINT8AVX-VNNI-INT8 instructions
CMPCCXADDCMPCCXADD instructions
ENQCMDEnqueue Command
GFNIGalois Field New Instructions
HYPERVISORRunning under hypervisor
MSRLISTRead/Write List of Model Specific Registers
PREFETCHIPREFETCHIT0/1 instructions
VAESAVX-512 vector AES instructions
VPCLMULQDQCarry-less multiplication quadword
WRMSRNSNon-Serializing Write to Model Specific Register
\n\n

By default, the following CPUID flags have been blacklisted: AVX10 (use\nAVX10_VERSION instead), BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT,\nMMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SSE, SSE2, SSE3, SSE4,\nSSE42, SSSE3 and TDX_GUEST. See\nsources.cpu\nconfiguration options to change the behavior.

\n\n

See the full list in github.com/klauspost/cpuid.

\n\n

X86 CPUID attributes

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n
AttributeDescription
AVX10_VERSIONAVX10 vector ISA version (if supported)
\n\n

Arm CPUID flags (partial list)

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
IDIVAInteger divide instructions available in ARM mode
IDIVTInteger divide instructions available in Thumb mode
THUMBThumb instructions
FASTMULFast multiplication
VFPVector floating point instruction extension (VFP)
VFPv3Vector floating point extension v3
VFPv4Vector floating point extension v4
VFPD32VFP with 32 D-registers
HALFHalf-word loads and stores
EDSPDSP extensions
NEONNEON SIMD instructions
LPAELarge Physical Address Extensions
\n\n

Arm64 CPUID flags (partial list)

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
AESAnnouncing the Advanced Encryption Standard
EVSTRMEvent Stream Frequency Features
FPHPHalf Precision(16bit) Floating Point Data Processing Instructions
ASIMDHPHalf Precision(16bit) Asimd Data Processing Instructions
ATOMICSAtomic Instructions to the A64
ASIMRDMSupport for Rounding Double Multiply Add/Subtract
PMULLOptional Cryptographic and CRC32 Instructions
JSCVTPerform Conversion to Match Javascript
DCPOPPersistent Memory Support
\n\n

Kernel

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
kernel-config.<option>trueKernel config option is enabled (set ‘y’ or ‘m’). Default options are NO_HZ, NO_HZ_IDLE, NO_HZ_FULL and PREEMPT
kernel-selinux.enabledtrueSelinux is enabled on the node
kernel-version.fullstringFull kernel version as reported by /proc/sys/kernel/osrelease (e.g. ‘4.5.6-7-g123abcde’)
kernel-version.majorstringFirst component of the kernel version (e.g. ‘4’)
kernel-version.minorstringSecond component of the kernel version (e.g. ‘5’)
kernel-version.revisionstringThird component of the kernel version (e.g. ‘6’)
\n\n

The kernel label source is configurable, see\nworker configuration and\nsources.kernel\nconfiguration options for details.

\n\n

Memory

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
memory-numatrueMultiple memory nodes i.e. NUMA architecture detected
memory-nv.presenttrueNVDIMM device(s) are present
memory-nv.daxtrueNVDIMM region(s) configured in DAX mode are present
memory-swap.enabledtrueSwap is enabled on the node
\n\n

Network

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
network-sriov.capabletrueSingle Root Input/Output Virtualization (SR-IOV) enabled Network Interface Card(s) present
network-sriov.configuredtrueSR-IOV virtual functions have been configured
\n\n

PCI

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
pci-<device label>.presenttruePCI device is detected
pci-<device label>.sriov.capabletrueSingle Root Input/Output Virtualization (SR-IOV) enabled PCI device present
   
\n\n

<device label> is format is configurable and set to <class>_<vendor> by\ndefault. For more more details about configuration of the pci labels, see\nsources.pci options\nand worker configuration\ninstructions.

\n\n

USB

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
usb-<device label>.presenttrueUSB device is detected
\n\n

<device label> is format is configurable and set to\n<class>_<vendor>_<device> by default. For more more details about\nconfiguration of the usb labels, see\nsources.usb options\nand worker configuration\ninstructions.

\n\n

Storage

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
storage-nonrotationaldisktrueNon-rotational disk, like SSD, is present in the node
\n\n

System

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
system-os_release.IDstringOperating system identifier
system-os_release.VERSION_IDstringOperating system version identifier (e.g. ‘6.7’)
system-os_release.VERSION_ID.majorstringFirst component of the OS version id (e.g. ‘6’)
system-os_release.VERSION_ID.minorstringSecond component of the OS version id (e.g. ‘7’)
\n\n

Custom

\n\n

The custom label source is designed for creating\nuser defined labels. However, it has a few statically\ndefined built-in labels:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureValueDescription
custom-rdma.capabletrueThe node has an RDMA capable Network adapter
custom-rdma.enabledtrueThe node has the needed RDMA modules loaded to run RDMA traffic
   
\n\n

User defined labels

\n\n

NFD has many extension points for creating vendor and application specific\nlabels. See the customization guide for\ndetailed documentation.

\n\n

Extended resources

\n\n

NFD is able to create extended resources, see the\nNodeFeatureRule CRD and its\nextendedResources field for more\ndetails.

\n\n

Note that NFD is not a replacement for the usage of device plugins.

\n\n

An example use-case for extended resources could be based on custom feature\n(created e.g. with feature files that\nexposes the node SGX EPC memory section size. This value will then be turned\ninto an extended resource of the node, allowing PODs to request that resource\nand the Kubernetes scheduler to schedule such PODs to only those nodes which\nhave a sufficient capacity of said resource left.

\n\n\n","dir":"/usage/","name":"features.md","path":"usage/features.md","url":"/usage/features.html"},{"title":"Deployment","layout":"default","sort":2,"content":"

Deployment

\n\n

Node Feature Discovery can be deployed on any recent version of Kubernetes\n(v1.24+).

\n\n

See Image variants for description of the different NFD\ncontainer images available.

\n\n

Using Kustomize provides straightforward deployment with\nkubectl integration and declarative customization.

\n\n

Using Helm provides easy management of NFD deployments with nice\nconfiguration management and easy upgrades.

\n\n

Using Operator provides deployment and configuration management via\nCRDs.

\n","dir":"/deployment/","name":"index.md","path":"deployment/index.md","url":"/deployment/"},{"title":"Kustomize","layout":"default","sort":2,"content":"

Deployment with Kustomize

\n\n

Table of contents

\n\n
    \n
  1. Overlays
      \n
    1. Worker one-shot
    2. \n
    3. Master Worker Topologyupdater
    4. \n
    5. Topologyupdater
    6. \n
    7. Metrics
    8. \n
    \n
  2. \n
  3. Uninstallation
  4. \n
\n\n
\n\n

Kustomize can be used to\ndeploy NFD. Customization of the deployment is done by maintaining\ndeclarative overlays on top of the base overlays in NFD.

\n\n

To follow the deployment instructions here,\nkubectl v1.24 or\nlater is required.

\n\n

The kustomize overlays provided in the repo can be used directly:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4\n
\n\n

This will required RBAC rules and deploy nfd-master (as a deployment) and\nnfd-worker (as daemonset) in the node-feature-discovery namespace.

\n\n
\n

NOTE: nfd-topology-updater is not deployed as part of the default\noverlay. Refer to the Master Worker Topologyupdater\nand Topologyupdater below.

\n
\n\n

Alternatively you can clone the repository and customize the deployment by\ncreating your own overlays. See kustomize for more information\nabout managing deployment configurations.

\n\n

Overlays

\n\n

The NFD repository hosts a set of overlays for different usages and deployment\nscenarios under\ndeployment/overlays

\n\n\n\n

Worker one-shot

\n\n

Feature discovery can alternatively be configured as a one-shot job.\nThe default-job overlay may be used to achieve this:

\n\n
NUM_NODES=$(kubectl get no -o jsonpath='{.items[*].metadata.name}' | wc -w)\nkubectl kustomize https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default-job?ref=v0.16.4 | \\\n    sed s\"/NUM_NODES/$NUM_NODES/\" | \\\n    kubectl apply -f -\n
\n\n

The example above launches as many jobs as there are non-master nodes. Note that\nthis approach does not guarantee running once on every node. For example,\ntainted, non-ready nodes or some other reasons in Job scheduling may cause some\nnode(s) will run extra job instance(s) to satisfy the request.

\n\n

Master Worker Topologyupdater

\n\n

NFD-Master, nfd-worker and nfd-topology-updater can be configured to be\ndeployed as separate pods. The master-worker-topologyupdater overlay may be\nused to achieve this:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/master-worker-topologyupdater?ref=v0.16.4\n\n
\n\n

Topologyupdater

\n\n

To deploy just nfd-topology-updater (without nfd-master and nfd-worker)\nuse the topologyupdater overlay:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.4\n\n
\n\n

NFD-Topology-Updater can be configured along with the default overlay\n(which deploys nfd-worker and nfd-master) where all the software components\nare deployed as separate pods;

\n\n
\nkubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4\nkubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.4\n\n
\n\n

Metrics

\n\n

To allow prometheus operator\nto scrape metrics from node-feature-discovery,\nrun the following command:

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4\nkubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prometheus?ref=v0.16.4\n
\n\n

Uninstallation

\n\n

Simplest way is to invoke kubectl delete on the overlay that was used for\ndeployment. Beware that this will also delete the namespace that NFD is\nrunning in. For example, in case the default overlay from the repo was used:

\n\n
kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4\n
\n\n

Alternatively you can delete create objects one-by-one, depending on the type\nof deployment, for example:

\n\n
NFD_NS=node-feature-discovery\nkubectl -n $NFD_NS delete ds nfd-worker\nkubectl -n $NFD_NS delete deploy nfd-master\nkubectl -n $NFD_NS delete svc nfd-master\nkubectl -n $NFD_NS delete sa nfd-master\nkubectl delete clusterrole nfd-master\nkubectl delete clusterrolebinding nfd-master\n
\n\n\n","dir":"/deployment/","name":"kustomize.md","path":"deployment/kustomize.md","url":"/deployment/kustomize.html"},{"title":"Quick start","layout":"default","sort":2,"content":"

Quick start

\n\n

Minimal steps to deploy latest released version of NFD in your cluster.

\n\n

Installation

\n\n

Deploy with kustomize – creates a new namespace, service and required RBAC\nrules and deploys nfd-master and nfd-worker daemons.

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4\n
\n\n

Verify

\n\n

Wait until NFD master and NFD worker are running.

\n\n
$ kubectl -n node-feature-discovery get ds,deploy\nNAME                         DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE\ndaemonset.apps/nfd-worker    2         2         2       2            2           <none>          10s\n\nNAME                         READY   UP-TO-DATE   AVAILABLE   AGE\ndeployment.apps/nfd-master   1/1     1            1           17s\n\n
\n\n

Check that NFD feature labels have been created

\n\n
$ kubectl get no -o json | jq '.items[].metadata.labels'\n{\n  \"kubernetes.io/arch\": \"amd64\",\n  \"kubernetes.io/os\": \"linux\",\n  \"feature.node.kubernetes.io/cpu-cpuid.ADX\": \"true\",\n  \"feature.node.kubernetes.io/cpu-cpuid.AESNI\": \"true\",\n  \"feature.node.kubernetes.io/cpu-cpuid.AVX\": \"true\",\n...\n
\n\n

Use node labels

\n\n

Create a pod targeting a distinguishing feature (select a valid feature from\nthe list printed on the previous step)

\n\n
$ cat << EOF | kubectl apply -f -\napiVersion: v1\nkind: Pod\nmetadata:\n  name: feature-dependent-pod\nspec:\n  containers:\n  - image: registry.k8s.io/pause\n    name: pause\n  nodeSelector:\n    # Select a valid feature\n    feature.node.kubernetes.io/cpu-cpuid.AESNI: 'true'\nEOF\npod/feature-dependent-pod created\n
\n\n

See that the pod is running on a desired node

\n\n
$ kubectl get po feature-dependent-pod -o wide\nNAME                    READY   STATUS    RESTARTS   AGE   IP          NODE     NOMINATED NODE   READINESS GATES\nfeature-dependent-pod   1/1     Running   0          23s   10.36.0.4   node-2   <none>           <none>\n
\n\n

Additional Optional Installation Steps

\n\n

Deploy nfd-topology-updater

\n\n

To deploy nfd-topology-updater use the topologyupdater kustomize\noverlay.

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.4\n
\n\n

Verify nfd-topology-updater

\n\n

Wait until nfd-topology-updater is running.

\n\n
$ kubectl -n node-feature-discovery get ds\nNAME                                  DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE\ndaemonset.apps/nfd-topology-updater   2         2         2       2            2           <none>          5s\n\n
\n\n

Check that the NodeResourceTopology objects are created

\n\n
$ kubectl get noderesourcetopologies.topology.node.k8s.io\nNAME                 AGE\nkind-control-plane   23s\nkind-worker          23s\n
\n","dir":"/get-started/","name":"quick-start.md","path":"get-started/quick-start.md","url":"/get-started/quick-start.html"},{"title":"Worker cmdline reference","layout":"default","sort":2,"content":"

Commandline flags of nfd-worker

\n\n

Table of contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -feature-gates
  6. \n
  7. -config
  8. \n
  9. -options
  10. \n
  11. -server
  12. \n
  13. -ca-file
  14. \n
  15. -cert-file
  16. \n
  17. -key-file
  18. \n
  19. -kubeconfig
  20. \n
  21. -server-name-override
  22. \n
  23. -feature-sources
  24. \n
  25. -label-sources
  26. \n
  27. -metrics
  28. \n
  29. -no-publish
  30. \n
  31. -oneshot
  32. \n
  33. Logging
  34. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-worker -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 nfd-worker -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-feature-gates

\n\n

The -feature-gates flag is used to enable or disable non GA features.\nThe list of available feature gates can be found in the feature gates\ndocumentation.

\n\n

Example:

\n\n
nfd-master -feature-gates NodeFeatureAPI=false\n
\n\n

-config

\n\n

The -config flag specifies the path of the nfd-worker configuration file to\nuse.

\n\n

Default: /etc/kubernetes/node-feature-discovery/nfd-worker.conf

\n\n

Example:

\n\n
nfd-worker -config=/opt/nfd/worker.conf\n
\n\n

-options

\n\n

The -options flag may be used to specify and override configuration file\noptions directly from the command line. The required format is the same as in\nthe config file i.e. JSON or YAML. Configuration options specified via this\nflag will override those from the configuration file:

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-worker -options='{\"sources\":{\"cpu\":{\"cpuid\":{\"attributeWhitelist\":[\"AVX\",\"AVX2\"]}}}}'\n
\n\n

-server

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -server flag specifies the address of the nfd-master endpoint where to\nconnect to.

\n\n

Default: localhost:8080

\n\n

Example:

\n\n
nfd-worker -server=nfd-master.nfd.svc.cluster.local:443\n
\n\n

-ca-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -ca-file is one of the three flags (together with -cert-file and\n-key-file) controlling the mutual TLS authentication on the worker side.\nThis flag specifies the TLS root certificate that is used for verifying the\nauthenticity of nfd-master.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -key-file

\n
\n\n

Example:

\n\n
nfd-worker -ca-file=/opt/nfd/ca.crt -cert-file=/opt/nfd/worker.crt -key-file=/opt/nfd/worker.key\n
\n\n

-cert-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -cert-file is one of the three flags (together with -ca-file and\n-key-file) controlling mutual TLS authentication on the worker side. This\nflag specifies the TLS certificate presented for authenticating outgoing\nrequests.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -ca-file and -key-file

\n
\n\n

Example:

\n\n
nfd-workerr -cert-file=/opt/nfd/worker.crt -key-file=/opt/nfd/worker.key -ca-file=/opt/nfd/ca.crt\n
\n\n

-key-file

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -key-file is one of the three flags (together with -ca-file and\n-cert-file) controlling the mutual TLS authentication on the worker side.\nThis flag specifies the private key corresponding the given certificate file\n(-cert-file) that is used for authenticating outgoing requests.

\n\n

Default: empty

\n\n
\n

NOTE: Must be specified together with -cert-file and -ca-file

\n
\n\n

Example:

\n\n
nfd-worker -key-file=/opt/nfd/worker.key -cert-file=/opt/nfd/worker.crt -ca-file=/opt/nfd/ca.crt\n
\n\n

-kubeconfig

\n\n

The -kubeconfig flag specifies the kubeconfig to use for connecting to the\nKubernetes API server. It is needed for manipulating\nNodeFeature objects. An empty value\n(which is also the default) implies in-cluster kubeconfig.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-worker -kubeconfig ${HOME}/.kube/config\n
\n\n

-server-name-override

\n\n
\n

NOTE the gRPC API is deprecated and will be removed in a future release.\nand this flag will be removed as well.

\n
\n\n

The -server-name-override flag specifies the common name (CN) which to\nexpect from the nfd-master TLS certificate. This flag is mostly intended for\ndevelopment and debugging purposes.

\n\n

Default: empty

\n\n

Example:

\n\n
nfd-worker -server-name-override=localhost\n
\n\n

-feature-sources

\n\n

The -feature-sources flag specifies a comma-separated list of enabled feature\nsources. A special value all enables all sources. Prefixing a source name\nwith - indicates that the source will be disabled instead - this is only\nmeaningful when used in conjunction with all. This command line flag allows\ncompletely disabling the feature detection so that neither standard feature\nlabels are generated nor the raw feature data is available for custom rule\nprocessing. Consider using the core.featureSources config file option,\ninstead, allowing dynamic configurability.

\n\n
\n

NOTE: This flag takes precedence over the core.featureSources\nconfiguration file option.

\n
\n\n

Default: all

\n\n

Example:

\n\n
nfd-worker -feature-sources=all,-pci\n
\n\n

-label-sources

\n\n

The -label-sources flag specifies a comma-separated list of enabled label\nsources. A special value all enables all sources. Prefixing a source name\nwith - indicates that the source will be disabled instead - this is only\nmeaningful when used in conjunction with all. Consider using the\ncore.labelSources config file option, instead, allowing dynamic\nconfigurability.

\n\n
\n

NOTE: This flag takes precedence over the core.labelSources\nconfiguration file option.

\n
\n\n

Default: all

\n\n

Example:

\n\n
nfd-worker -label-sources=kernel,system,local\n
\n\n

-metrics

\n\n

The -metrics flag specifies the port on which to expose\nPrometheus metrics. Setting this to 0 disables the\nmetrics server on nfd-worker.

\n\n

Default: 8081

\n\n

Example:

\n\n
nfd-worker -metrics=12345\n
\n\n

-no-publish

\n\n

The -no-publish flag disables all communication with the nfd-master and the\nKubernetes API server. It is effectively a “dry-run” flag for nfd-worker.\nNFD-Worker runs feature detection normally, but no labeling requests are sent\nto nfd-master and no NodeFeature objects are created or updated in the API\nserver.

\n\n
\n

NOTE: This flag takes precedence over the\ncore.noPublish\nconfiguration file option.

\n
\n\n

Default: false

\n\n

Example:

\n\n
nfd-worker -no-publish\n
\n\n

-oneshot

\n\n

The -oneshot flag causes nfd-worker to exit after one pass of feature\ndetection.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-worker -oneshot -no-publish\n
\n\n

Logging

\n\n

The following logging-related flags are inherited from the\nklog package.

\n\n
\n

NOTE: The logger setup can also be specified via the core.klog\nconfiguration file options. However, the command line flags take precedence\nover any corresponding config file options specified.

\n
\n\n

-add_dir_header

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

-alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

-log_backtrace_at

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

-log_dir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

-log_file

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

-log_file_max_size

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

-logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

-skip_headers

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

-skip_log_headers

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

-stderrthreshold

\n\n

Logs at or above this threshold go to stderr.

\n\n

Default: 2

\n\n

-v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

-vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n","dir":"/reference/","name":"worker-commandline-reference.md","path":"reference/worker-commandline-reference.md","url":"/reference/worker-commandline-reference.html"},{"title":"Using node labels","layout":"default","sort":2,"content":"

Using node labels

\n\n
\n\n

Nodes with specific features can be targeted using the nodeSelector field. The\nfollowing example shows how to target nodes with Intel TurboBoost enabled.

\n\n
apiVersion: v1\nkind: Pod\nmetadata:\n  labels:\n    env: test\n  name: golang-test\nspec:\n  containers:\n    - image: golang\n      name: go1\n  nodeSelector:\n    feature.node.kubernetes.io/cpu-pstate.turbo: 'true'\n
\n\n

For more details on targeting nodes, see\nnode selection.

\n","dir":"/usage/","name":"using-labels.md","path":"usage/using-labels.md","url":"/usage/using-labels.html"},{"title":"Helm","layout":"default","sort":3,"content":"

Deployment with Helm

\n\n

Table of contents

\n\n
    \n
  1. Prerequisites
  2. \n
  3. Deployment
  4. \n
  5. Configuration
  6. \n
  7. Upgrading the chart
      \n
    1. From v0.7 and older
    2. \n
    3. From v0.8 - v0.11
    4. \n
    5. From v0.12 - v0.13
    6. \n
    7. From v0.14+
    8. \n
    \n
  8. \n
  9. Uninstalling the chart
  10. \n
  11. Chart parameters
      \n
    1. General parameters
    2. \n
    3. Master pod parameters
    4. \n
    5. Worker pod parameters
    6. \n
    7. Topology updater parameters
    8. \n
    9. Garbage collector parameters
    10. \n
    \n
  12. \n
\n\n
\n\n

Node Feature Discovery provides a Helm chart to manage its deployment.

\n\n
\n

NOTE: NFD is not ideal for other Helm charts to depend on as that may\nresult in multiple parallel NFD deployments in the same cluster which is not\nfully supported by the NFD Helm chart.

\n
\n\n

Prerequisites

\n\n

Helm package manager should be installed.

\n\n

Deployment

\n\n

To install the latest stable version:

\n\n
export NFD_NS=node-feature-discovery\nhelm repo add nfd https://kubernetes-sigs.github.io/node-feature-discovery/charts\nhelm repo update\nhelm install nfd/node-feature-discovery --namespace $NFD_NS --create-namespace --generate-name\n
\n\n

To install the latest development version you need to clone the NFD Git\nrepository and install from there.

\n\n
git clone https://github.com/kubernetes-sigs/node-feature-discovery/\ncd node-feature-discovery/deployment/helm\nexport NFD_NS=node-feature-discovery\nhelm install node-feature-discovery ./node-feature-discovery/ --namespace $NFD_NS --create-namespace\n
\n\n

See the configuration section below for instructions how to\nalter the deployment parameters.

\n\n

Configuration

\n\n

You can override values from values.yaml and provide a file with custom values:

\n\n
export NFD_NS=node-feature-discovery\nhelm install nfd/node-feature-discovery -f <path/to/custom/values.yaml> --namespace $NFD_NS --create-namespace\n
\n\n

To specify each parameter separately you can provide them to helm install command:

\n\n
export NFD_NS=node-feature-discovery\nhelm install nfd/node-feature-discovery --set nameOverride=NFDinstance --set master.replicaCount=2 --namespace $NFD_NS --create-namespace\n
\n\n

Upgrading the chart

\n\n

To upgrade the node-feature-discovery deployment to v0.16.4 via Helm.

\n\n

From v0.7 and older

\n\n

Please see the uninstallation guide.\nAnd then follow the standard deployment instructions.

\n\n

From v0.8 - v0.11

\n\n

Helm deployment of NFD was introduced in v0.8.0.

\n\n
export NFD_NS=node-feature-discovery\n# Uninstall the old NFD deployment\nhelm uninstall node-feature-discovery --namespace $NFD_NS\n# Update Helm repository\nhelm repo update\n# Install the new NFD deployment\nhelm upgrade --install node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=false\n# Wait for NFD Worker to be ready\nkubectl wait --timeout=-1s --for=condition=ready pod -l app.kubernetes.io/name=node-feature-discovery --namespace $NFD_NS\n# Enable the NFD Master\nhelm upgrade --install node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=true\n
\n\n

From v0.12 - v0.13

\n\n

In v0.12 the NodeFeature CRD was introduced as experimental.\nThe API was not enabled by default.

\n\n
export NFD_NS=node-feature-discovery\n# Update Helm repository\nhelm repo update\n# Install and upgrade CRD's\nkubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/master/deployment/base/nfd-crds/nfd-api-crds.yaml\n# Install the new NFD deployment\nhelm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=false\n# Wait for NFD Worker to be ready\nkubectl wait --timeout=-1s --for=condition=ready pod -l app.kubernetes.io/name=node-feature-discovery --namespace $NFD_NS\n# Enable the NFD Master\nhelm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS --set master.enable=true\n
\n\n

From v0.14+

\n\n

As of version v0.14 the Helm chart is the primary deployment method for NFD,\nand the CRD NodeFeature is enabled by default.

\n\n
export NFD_NS=node-feature-discovery\n# Update Helm repository\nhelm repo update\n# Install and upgrade CRD's\nkubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.4/deployment/base/nfd-crds/nfd-api-crds.yaml\n# Install the new NFD deployment\nhelm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS\n
\n\n

Uninstalling the chart

\n\n

To uninstall the node-feature-discovery deployment:

\n\n
export NFD_NS=node-feature-discovery\nhelm uninstall node-feature-discovery --namespace $NFD_NS\n
\n\n

The command removes all the Kubernetes components associated with the chart and\ndeletes the release. It also runs a post-delete hook that cleans up the nodes\nof all labels, annotations, taints and extended resources that were created by\nNFD.

\n\n

Chart parameters

\n\n

To tailor the deployment of the Node Feature Discovery to your needs following\nChart parameters are available.

\n\n

General parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultDescription
image.repositorystringregistry.k8s.io/nfd/node-feature-discoveryNFD image repository
image.tagstringv0.16.4NFD image tag
image.pullPolicystringAlwaysImage pull policy
imagePullSecretslist[]ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info
nameOverridestring Override the name of the chart
fullnameOverridestring Override a default fully qualified app name
tls.enableboolfalseSpecifies whether to use TLS for communications between components. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManagerboolfalseIf enabled, requires cert-manager to be installed and will automatically create the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerNamestring If specified, it will use a pre-existing issuer instead for the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerKindstring Specifies on what kind of issuer is used, can be either ClusterIssuer or Issuer (default). Requires tls.certManager.certManagerCertificate.issuerName to be set. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
featureGates.NodeFeatureAPIbooltrueEnable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication.
featureGates.NodeFeatureGroupAPIboolfalseEnable the NodeFeatureGroup CRD API.
featureGates.DisableAutoPrefixboolfalseEnable DisableAutoPrefix feature gate. Disables automatic prefixing of unprefixed labels, annotations and extended resources.
enableNodeFeatureApibooltrueEnable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication. DEPRECATED: will be removed in NFD v0.17, use featureGates.NodeFeatureAPI instead.
prometheus.enableboolfalseSpecifies whether to expose metrics using prometheus operator
prometheus.labelsdict{}Specifies labels for use with the prometheus operator to control how it is selected
prometheus.scrapeIntervalstring10sSpecifies the interval by which metrics are scraped
priorityClassNamestring The name of the PriorityClass to be used for the NFD pods.
\n\n

Metrics are configured to be exposed using prometheus operator API’s by\ndefault. If you want to expose metrics using the prometheus operator\nAPI’s you need to install the prometheus operator in your cluster.

\n\n

Master pod parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
master.*dict NFD master deployment configuration
master.enablebooltrueSpecifies whether nfd-master should be deployed
master.portinteger Specifies the TCP port that nfd-master listens for incoming requests. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.metricsPortinteger8081Port on which to expose metrics from components to prometheus operator
master.instancestring Instance name. Used to separate annotation namespaces for multiple parallel deployments
master.resyncPeriodstring NFD API controller resync period.
master.extraLabelNsarray[]List of allowed extra label namespaces
master.resourceLabelsarray[]List of labels to be registered as extended resources
master.enableTaintsboolfalseSpecifies whether to enable or disable node tainting
master.crdControllerboolnullSpecifies whether the NFD CRD API controller is enabled. If not set, controller will be enabled if master.instance is empty.
master.featureRulesControllerboolnullDEPRECATED: use master.crdController instead
master.replicaCountinteger1Number of desired pods. This is a pointer to distinguish between explicit zero and not specified
master.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
master.securityContextdict{}Container security settings
master.serviceAccount.createbooltrueSpecifies whether a service account should be created
master.serviceAccount.annotationsdict{}Annotations to add to the service account
master.serviceAccount.namestring The name of the service account to use. If not set and create is true, a name is generated using the fullname template
master.rbac.createbooltrueSpecifies whether to create RBAC configuration for nfd-master
master.service.typestringClusterIPNFD master service type. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.service.portinteger8080NFD master service port. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.resources.limitsdict{memory: 4Gi}NFD master pod resources limits
master.resources.requestsdict{cpu: 100m, memory: 128Mi}NFD master pod resources requests. You may want to use the same value for requests.memory and limits.memory. The “requests” value affects scheduling to accommodate pods on nodes. If there is a large difference between “requests” and “limits” and nodes experience memory pressure, the kernel may invoke the OOM Killer, even if the memory does not exceed the “limits” threshold. This can cause unexpected pod evictions. Memory cannot be compressed and once allocated to a pod, it can only be reclaimed by killing the pod. Natan Yellin 22/09/2022 that discusses this issue.
master.tolerationsdictScheduling to master node is disabledNFD master pod tolerations
master.annotationsdict{}NFD master pod annotations
master.affinitydict NFD master pod required node affinity
master.deploymentAnnotationsdict{}NFD master deployment annotations
master.nfdApiParallelisminteger10Specifies the maximum number of concurrent node updates.
master.configdict NFD master configuration
master.revisionHistoryLimitinteger Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit
master.livenessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:10}NFD master pod liveness probe
master.readinessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:5,”failureThreshold”: 10}NFD master pod readiness probe
\n\n

Worker pod parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
worker.*dict NFD worker daemonset configuration
worker.enablebooltrueSpecifies whether nfd-worker should be deployed
worker.metricsPort*int8081Port on which to expose metrics from components to prometheus operator
worker.configdict NFD worker configuration
worker.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
worker.securityContextdict{}Container security settings
worker.serviceAccount.createbooltrueSpecifies whether a service account for nfd-worker should be created
worker.serviceAccount.annotationsdict{}Annotations to add to the service account for nfd-worker
worker.serviceAccount.namestring The name of the service account to use for nfd-worker. If not set and create is true, a name is generated using the fullname template (suffixed with -worker)
worker.rbac.createbooltrueSpecifies whether to create RBAC configuration for nfd-worker
worker.mountUsrSrcboolfalseSpecifies whether to allow users to mount the hostpath /user/src. Does not work on systems without /usr/src AND a read-only /usr
worker.resources.limitsdict{memory: 512Mi}NFD worker pod resources limits
worker.resources.requestsdict{cpu: 5m, memory: 64Mi}NFD worker pod resources requests
worker.nodeSelectordict{}NFD worker pod node selector
worker.tolerationsdict{}NFD worker pod node tolerations
worker.priorityClassNamestring NFD worker pod priority class
worker.annotationsdict{}NFD worker pod annotations
worker.daemonsetAnnotationsdict{}NFD worker daemonset annotations
worker.revisionHistoryLimitinteger Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
worker.livenessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:10}NFD worker pod liveness probe
worker.readinessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:5,”failureThreshold”: 10}NFD worker pod readiness probe
\n\n

Topology updater parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
topologyUpdater.*dict NFD Topology Updater configuration
topologyUpdater.enableboolfalseSpecifies whether the NFD Topology Updater should be created
topologyUpdater.createCRDsboolfalseSpecifies whether the NFD Topology Updater CRDs should be created
topologyUpdater.serviceAccount.createbooltrueSpecifies whether the service account for topology updater should be created
topologyUpdater.serviceAccount.annotationsdict{}Annotations to add to the service account for topology updater
topologyUpdater.serviceAccount.namestring The name of the service account for topology updater to use. If not set and create is true, a name is generated using the fullname template and -topology-updater suffix
topologyUpdater.rbac.createbooltrueSpecifies whether to create RBAC configuration for topology updater
topologyUpdater.metricsPortinteger8081Port on which to expose prometheus metrics
topologyUpdater.kubeletConfigPathstring””Specifies the kubelet config host path
topologyUpdater.kubeletPodResourcesSockPathstring””Specifies the kubelet sock path to read pod resources
topologyUpdater.updateIntervalstring60sTime to sleep between CR updates. Non-positive value implies no CR update.
topologyUpdater.watchNamespacestring*Namespace to watch pods, * for all namespaces
topologyUpdater.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
topologyUpdater.securityContextdict{}Container security settings
topologyUpdater.resources.limitsdict{memory: 60Mi}NFD Topology Updater pod resources limits
topologyUpdater.resources.requestsdict{cpu: 50m, memory: 40Mi}NFD Topology Updater pod resources requests
topologyUpdater.nodeSelectordict{}Topology updater pod node selector
topologyUpdater.tolerationsdict{}Topology updater pod node tolerations
topologyUpdater.annotationsdict{}Topology updater pod annotations
topologyUpdater.daemonsetAnnotationsdict{}Topology updater daemonset annotations
topologyUpdater.affinitydict{}Topology updater pod affinity
topologyUpdater.configdict configuration
topologyUpdater.podSetFingerprintbooltrueEnables compute and report of pod fingerprint in NRT objects.
topologyUpdater.kubeletStateDirstring/var/lib/kubeletSpecifies kubelet state directory path for watching state and checkpoint files. Empty value disables kubelet state tracking.
topologyUpdater.revisionHistoryLimitinteger Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
topologyUpdater.livenessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:10}Topology updater pod liveness probe
topologyUpdater.readinessProbedict{“grpc”:{“port”:8082},”initialDelaySeconds”:5,”failureThreshold”: 10}Topology updater pod readiness probe
\n\n

Garbage collector parameters

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameTypeDefaultdescription
gc.*dict NFD Garbage Collector configuration
gc.enablebooltrueSpecifies whether the NFD Garbage Collector should be created
gc.serviceAccount.createbooltrueSpecifies whether the service account for garbage collector should be created
gc.serviceAccount.annotationsdict{}Annotations to add to the service account for garbage collector
gc.serviceAccount.namestring The name of the service account for garbage collector to use. If not set and create is true, a name is generated using the fullname template and -gc suffix
gc.rbac.createbooltrueSpecifies whether to create RBAC configuration for garbage collector
gc.intervalstring1hTime between periodic garbage collector runs
gc.podSecurityContextdict{}PodSecurityContext holds pod-level security attributes and common container settings
gc.resources.limitsdict{memory: 1Gi}NFD Garbage Collector pod resources limits
gc.resources.requestsdict{cpu: 10m, memory: 128Mi}NFD Garbage Collector pod resources requests
gc.metricsPortinteger8081Port on which to serve Prometheus metrics
gc.nodeSelectordict{}Garbage collector pod node selector
gc.tolerationsdict{}Garbage collector pod node tolerations
gc.annotationsdict{}Garbage collector pod annotations
gc.deploymentAnnotationsdict{}Garbage collector deployment annotations
gc.affinitydict{}Garbage collector pod affinity
gc.revisionHistoryLimitinteger Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit
\n\n\n","dir":"/deployment/","name":"helm.md","path":"deployment/helm.md","url":"/deployment/helm.html"},{"title":"Master config reference","layout":"default","sort":3,"content":"

Configuration file reference of nfd-master

\n\n

Table of contents

\n\n
    \n
  1. noPublish
  2. \n
  3. extraLabelNs
  4. \n
  5. denyLabelNs
  6. \n
  7. autoDefaultNs
  8. \n
  9. resourceLabels
  10. \n
  11. enableTaints
  12. \n
  13. labelWhiteList
  14. \n
  15. resyncPeriod
  16. \n
  17. leaderElection
      \n
    1. leaderElection.leaseDuration
    2. \n
    3. leaderElection.renewDeadline
    4. \n
    5. leaderElection.retryPeriod
    6. \n
    \n
  18. \n
  19. nfdApiParallelism
  20. \n
  21. klog
      \n
    1. klog.addDirHeader
    2. \n
    3. klog.alsologtostderr
    4. \n
    5. klog.logBacktraceAt
    6. \n
    7. klog.logDir
    8. \n
    9. klog.logFile
    10. \n
    11. klog.logFileMaxSize
    12. \n
    13. klog.logtostderr
    14. \n
    15. klog.skipHeaders
    16. \n
    17. klog.skipLogHeaders
    18. \n
    19. klog.stderrthreshold
    20. \n
    21. klog.v
    22. \n
    23. klog.vmodule
    24. \n
    \n
  22. \n
\n\n
\n\n

See the\nsample configuration file\nfor a full example configuration.

\n\n

noPublish

\n\n

noPublish option disables updates to the Node objects in the Kubernetes\nAPI server, making a “dry-run” flag for nfd-master. No Labels, Annotations, Taints\nor ExtendedResources of nodes are updated.

\n\n

Default: false

\n\n

Example:

\n\n
noPublish: true\n
\n\n

extraLabelNs

\n

extraLabelNs specifies a list of allowed feature\nlabel namespaces. This option can be used to allow\nother vendor or application specific namespaces for custom labels from the\nlocal and custom feature sources, even though these labels were denied using\nthe denyLabelNs parameter.

\n\n

The same namespace control and this option applies to Extended Resources (created\nwith resourceLabels), too.

\n\n

Default: empty

\n\n

Example:

\n\n
extraLabelNs: [\"added.ns.io\",\"added.kubernets.io\"]\n
\n\n

denyLabelNs

\n

denyLabelNs specifies a list of excluded\nlabel namespaces. By default, nfd-master allows creating labels in all\nnamespaces, excluding kubernetes.io namespace and its sub-namespaces\n(i.e. *.kubernetes.io). However, you should note that\nkubernetes.io and its sub-namespaces are always denied.\nThis option can be used to exclude some vendors or application specific\nnamespaces.

\n\n

Default: empty

\n\n

Example:

\n\n
denyLabelNs: [\"denied.ns.io\",\"denied.kubernetes.io\"]\n
\n\n

autoDefaultNs

\n\n

DEPRECATED: Will be removed in NFD v0.17. Use the\nDisableAutoPrefix feature gate instead.

\n\n

The autoDefaultNs option controls the automatic prefixing of names. When set\nto true (the default in NFD version v0.16) nfd-master\nautomatically adds the default feature.node.kubernetes.io/ prefix to\nunprefixed labels, annotations and extended resources - this is also the\ndefault behavior in NFD v0.15 and earlier. When the option is set to false,\nno prefix will be prepended to unprefixed names, effectively causing them to be\nfiltered out (as NFD does not allow unprefixed names of labels, annotations or\nextended resources). The default will be changed to false in a future\nrelease.

\n\n

For example, with the autoDefaultNs set to true, a NodeFeatureRule with

\n\n
  labels:\n    foo: bar\n
\n\n

Will turn into feature.node.kubernetes.io/foo=bar node label. With\nautoDefaultNs set to false, no prefix is added and the label will be\nfiltered out.

\n\n

Note that taint keys are not affected by this option.

\n\n

Default: true

\n\n

Example:

\n\n
autoDefaultNs: false\n
\n\n

resourceLabels

\n\n

DEPRECATED: NodeFeatureRule\nshould be used for managing extended resources in NFD.

\n\n

The resourceLabels option specifies a list of features to be\nadvertised as extended resources instead of labels. Features that have integer\nvalues can be published as Extended Resources by listing them in this option.

\n\n

Default: empty

\n\n

Example:

\n\n
resourceLabels: [\"vendor-1.com/feature-1\",\"vendor-2.io/feature-2\"]\n
\n\n

enableTaints

\n

enableTaints enables/disables node tainting feature of NFD.

\n\n

Default: false

\n\n

Example:

\n\n
enableTaints: true\n
\n\n

labelWhiteList

\n

labelWhiteList specifies a regular expression for filtering feature\nlabels based on their name. Each label must match against the given regular\nexpression or it will not be published.

\n\n
\n

** NOTE:** The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label namespace is\nomitted.

\n
\n\n

Default: empty

\n\n

Example:

\n\n
labelWhiteList: \"foo\"\n
\n\n

resyncPeriod

\n\n

The resyncPeriod option specifies the NFD API controller resync period.\nThe resync means nfd-master replaying all NodeFeature and NodeFeatureRule objects,\nthus effectively re-syncing all nodes in the cluster (i.e. ensuring labels, annotations,\nextended resources and taints are in place).

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 1 hour.

\n\n

Example:

\n\n
resyncPeriod: 2h\n
\n\n

leaderElection

\n\n

The leaderElection section exposes configuration to tweak leader election.

\n\n

leaderElection.leaseDuration

\n\n

leaderElection.leaseDuration is the duration that non-leader candidates will\nwait to force acquire leadership. This is measured against time of\nlast observed ack.

\n\n

A client needs to wait a full LeaseDuration without observing a change to\nthe record before it can attempt to take over. When all clients are\nshutdown and a new set of clients are started with different names against\nthe same leader record, they must wait the full LeaseDuration before\nattempting to acquire the lease. Thus LeaseDuration should be as short as\npossible (within your tolerance for clock skew rate) to avoid a possible\nlong waits in the scenario.

\n\n

Default: 15 seconds.

\n\n

Example:

\n\n
leaderElection:\n  leaseDurtation: 15s\n
\n\n

leaderElection.renewDeadline

\n\n

leaderElection.renewDeadline is the duration that the acting master will retry\nrefreshing leadership before giving up.

\n\n

This value has to be lower than leaseDuration and greater than retryPeriod*1.2.

\n\n

Default: 10 seconds.

\n\n

Example:

\n\n
leaderElection:\n  renewDeadline: 10s\n
\n\n

leaderElection.retryPeriod

\n\n

leaderElection.retryPeriod is the duration the LeaderElector clients should wait\nbetween tries of actions.

\n\n

It has to be greater than 0.

\n\n

Default: 2 seconds.

\n\n

Example:

\n\n
leaderElection:\n  retryPeriod: 2s\n
\n\n

nfdApiParallelism

\n\n

The nfdApiParallelism option can be used to specify the maximum\nnumber of concurrent node updates.

\n\n

Does not have effect if the NodeFeatureAPI\nfeature gate is disabled.

\n\n

Default: 10

\n\n

Example:

\n\n
nfdApiParallelism: 1\n
\n\n

klog

\n\n

The following options specify the logger configuration. Most of which can be\ndynamically adjusted at run-time.

\n\n
\n

NOTE: The logger options can also be specified via command line flags\nwhich take precedence over any corresponding config file options.

\n
\n\n

klog.addDirHeader

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

klog.alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

klog.logBacktraceAt

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n\n

klog.logDir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

klog.logFile

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

klog.logFileMaxSize

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

Run-time configurable: no

\n\n

klog.logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

Run-time configurable: yes

\n\n

klog.skipHeaders

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

klog.skipLogHeaders

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

Run-time configurable: no

\n\n

klog.stderrthreshold

\n\n

Logs at or above this threshold go to stderr (default 2)

\n\n

Run-time configurable: yes

\n\n

klog.v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

Run-time configurable: yes

\n\n

klog.vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n","dir":"/reference/","name":"master-configuration-reference.md","path":"reference/master-configuration-reference.md","url":"/reference/master-configuration-reference.html"},{"title":"Usage","layout":"default","sort":3,"content":"

Usage

\n\n

Usage instructions.

\n","dir":"/usage/","name":"index.md","path":"usage/index.md","url":"/usage/"},{"title":"NFD-Master","layout":"default","sort":3,"content":"

NFD-Master

\n\n
\n\n

NFD-Master is responsible for connecting to the Kubernetes API server and\nupdating node objects. More specifically, it modifies node labels, taints and\nextended resources based on requests from nfd-workers and 3rd party extensions.

\n\n

NodeFeature controller

\n\n

The NodeFeature Controller uses NodeFeature objects as\nthe input for the NodeFeatureRule\nprocessing pipeline. In addition, any labels listed in the NodeFeature object\nare created on the node (note the allowed\nlabel namespaces are controlled).

\n\n

NodeFeatureRule controller

\n\n

NFD-Master acts as the controller for\nNodeFeatureRule objects.\nIt applies the rules specified in NodeFeatureRule objects on raw feature data\nand creates node labels accordingly. The feature data used as the input is\nreceived from nfd-worker instances through\nNodeFeature objects.

\n\n
\n

NOTE: when gRPC (DEPRECATED) is used for communicating\nthe features (by setting the flag -feature-gates NodeFeatureAPI=false on both\nnfd-master and nfd-worker, or via Helm values.featureGates.NodeFeatureAPI=false),\n(re-)labelling only happens when a request is received from nfd-worker.\nThat is, in practice rules are evaluated and labels for each node are created\non intervals specified by the\ncore.sleepInterval\nconfiguration option of nfd-worker instances. This means that modification or\ncreation of NodeFeatureRule objects does not instantly cause the node\nlabels to be updated. Instead, the changes only come visible in node labels\nas nfd-worker instances send their labelling requests. This limitation is not\npresent when gRPC interface is disabled\nand NodeFeature API is used.

\n
\n\n

Master configuration

\n\n

NFD-Master supports dynamic configuration through a configuration file. The\ndefault location is /etc/kubernetes/node-feature-discovery/nfd-master.conf,\nbut, this can be changed by specifying the-config command line flag.\nConfiguration file is re-read whenever it is modified which makes run-time\nre-configuration of nfd-master straightforward.

\n\n

Master configuration file is read inside the container, and thus, Volumes and\nVolumeMounts are needed to make your configuration available for NFD. The\npreferred method is to use a ConfigMap which provides easy deployment and\nre-configurability.

\n\n

The provided nfd-master deployment templates create an empty configmap and\nmount it inside the nfd-master containers. In kustomize deployments,\nconfiguration can be edited with:

\n\n
kubectl -n ${NFD_NS} edit configmap nfd-master-conf\n
\n\n

In Helm deployments,\nMaster pod parameter\nmaster.config can be used to edit the respective configuration.

\n\n

See\nnfd-master configuration file reference\nfor more details.\nThe (empty-by-default)\nexample config\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.

\n\n

Deployment notes

\n\n

NFD-Master runs as a deployment, by default\nit prefers running on the cluster’s master nodes but will run on worker\nnodes if no master nodes are found.

\n\n

For High Availability, you should increase the replica count of\nthe deployment object. You should also look into adding\ninter-pod\naffinity to prevent masters from running on the same node.\nHowever note that inter-pod affinity is costly and is not recommended\nin bigger clusters.

\n\n
\n

Note: When NFD-Master is intended to run with more than one replica,\nit is advised to use -enable-leader-election flag. This flag turns on\nleader election for NFD-Master and let only one replica to act on changes\nin NodeFeature and NodeFeatureRule objects.

\n
\n\n

If you have RBAC authorization enabled (as is the default e.g. with clusters\ninitialized with kubeadm) you need to configure the appropriate ClusterRoles,\nClusterRoleBindings and a ServiceAccount for NFD to create node\nlabels. The provided template will configure these for you.

\n","dir":"/usage/","name":"nfd-master.md","path":"usage/nfd-master.md","url":"/usage/nfd-master.html"},{"title":"NFD Operator","layout":"default","sort":4,"content":"

Deployment with NFD Operator

\n\n

Table of contents

\n\n
    \n
  1. Deployment
  2. \n
  3. Uninstallation
  4. \n
\n\n
\n\n

The Node Feature Discovery Operator automates installation,\nconfiguration and updates of NFD using a specific NodeFeatureDiscovery custom\nresource. This also provides good support for managing NFD as a dependency of\nother operators.

\n\n

Deployment

\n\n

Deployment using the\nNode Feature Discovery Operator\nis recommended to be done via\noperatorhub.io.

\n\n
    \n
  1. You need to have\nOLM\ninstalled. If you don’t, take a look at the\nlatest release\nfor detailed instructions.
  2. \n
  3. \n

    Install the operator:

    \n\n
    kubectl create -f https://operatorhub.io/install/nfd-operator.yaml\n
    \n
  4. \n
  5. \n

    Create NodeFeatureDiscovery object (in nfd namespace here):

    \n\n
    cat << EOF | kubectl apply -f -\napiVersion: v1\nkind: Namespace\nmetadata:\n  name: nfd\n---\napiVersion: nfd.kubernetes.io/v1\nkind: NodeFeatureDiscovery\nmetadata:\n  name: my-nfd-deployment\n  namespace: nfd\nspec:\n  operand:\n    image: registry.k8s.io/nfd/node-feature-discovery:v0.16.4\n    imagePullPolicy: IfNotPresent\nEOF\n
    \n
  6. \n
\n\n

Uninstallation

\n\n

If you followed the deployment instructions above you can uninstall NFD with:

\n\n
kubectl -n nfd delete NodeFeatureDiscovery my-nfd-deployment\n
\n\n

Optionally, you can also remove the namespace:

\n\n
kubectl delete ns nfd\n
\n\n

See the node-feature-discovery-operator and OLM project\ndocumentation for instructions for uninstalling the operator and operator\nlifecycle manager, respectively.

\n\n\n","dir":"/deployment/","name":"operator.md","path":"deployment/operator.md","url":"/deployment/operator.html"},{"title":"Reference","layout":"default","sort":4,"content":"

Reference

\n\n

Command line and configuration reference.

\n","dir":"/reference/","name":"index.md","path":"reference/index.md","url":"/reference/"},{"title":"Worker config reference","layout":"default","sort":4,"content":"

Configuration file reference of nfd-worker

\n\n

Table of contents

\n\n
    \n
  1. core
      \n
    1. core.sleepInterval
    2. \n
    3. core.featureSources
    4. \n
    5. core.labelSources
    6. \n
    7. core.sources
    8. \n
    9. core.labelWhiteList
    10. \n
    11. core.noPublish
    12. \n
    13. core.klog
    14. \n
    \n
  2. \n
  3. sources
      \n
    1. sources.cpu
    2. \n
    3. sources.kernel
    4. \n
    5. sources.local
    6. \n
    7. sources.local.hooksEnabled
    8. \n
    9. sources.pci
    10. \n
    11. sources.usb
    12. \n
    13. sources.custom
    14. \n
    \n
  4. \n
\n\n
\n\n

See the\nsample configuration file\nfor a full example configuration.

\n\n

core

\n\n

The core section contains common configuration settings that are not specific\nto any particular feature source.

\n\n

core.sleepInterval

\n\n

core.sleepInterval specifies the interval between consecutive passes of\nfeature (re-)detection, and thus also the interval between node re-labeling. A\nnon-positive value implies infinite sleep interval, i.e. no re-detection or\nre-labeling is done.

\n\n

Default: 60s

\n\n

Example:

\n\n
core:\n  sleepInterval: 60s\n
\n\n

core.featureSources

\n\n

core.featureSources specifies the list of enabled feature sources. A special\nvalue all enables all sources. Prefixing a source name with - indicates\nthat the source will be disabled instead - this is only meaningful when used in\nconjunction with all. This option allows completely disabling the feature\ndetection so that neither standard feature labels are generated nor the raw\nfeature data is available for custom rule processing.

\n\n

Default: [all]

\n\n

Example:

\n\n
core:\n  # Enable all but cpu and local sources\n  featureSources:\n    - \"all\"\n    - \"-cpu\"\n    - \"-local\"\n
\n\n
core:\n  # Enable only cpu and local sources\n  featureSources:\n    - \"cpu\"\n    - \"local\"\n
\n\n

core.labelSources

\n\n

core.labelSources specifies the list of enabled label sources. A special\nvalue all enables all sources. Prefixing a source name with - indicates\nthat the source will be disabled instead - this is only meaningful when used in\nconjunction with all. This configuration option affects the generation of\nnode labels but not the actual discovery of the underlying feature data that is\nused e.g. in custom/NodeFeatureRule rules.

\n\n
\n

NOTE: Overridden by the -label-sources command line flag and the\ncore.sources configurations option (if either of them is specified).

\n
\n\n

Default: [all]

\n\n

Example:

\n\n
core:\n  # Enable all but cpu and system sources\n  labelSources:\n    - \"all\"\n    - \"-cpu\"\n    - \"-system\"\n
\n\n
core:\n  # Enable only cpu and system sources\n  labelSources:\n    - \"cpu\"\n    - \"system\"\n
\n\n

core.sources

\n\n

DEPRECATED: use core.labelSources instead.

\n\n
\n

NOTE: core.sources takes precedence over the core.labelSources\nconfiguration file option.

\n
\n\n

core.labelWhiteList

\n\n

core.labelWhiteList specifies a regular expression for filtering feature\nlabels based on the label name. Non-matching labels are not published.

\n\n
\n

NOTE: The regular expression is only matches against the “basename” part\nof the label, i.e. to the part of the name after ‘/’. The label prefix (or\nnamespace) is omitted.

\n
\n\n

Default: null

\n\n

Example:

\n\n
core:\n  labelWhiteList: '^cpu-cpuid'\n
\n\n

core.noPublish

\n\n

Setting core.noPublish to true disables all communication with the\nnfd-master and the Kubernetes API server. It is effectively a “dry-run” option.\nNFD-Worker runs feature detection normally, but no labeling requests are sent\nto nfd-master and no NodeFeature\nobjects are created or updated in the API server.

\n\n
\n

NOTE: Overridden by the\n-no-publish\ncommand line flag (if specified).

\n
\n\n

Default: false

\n\n

Example:

\n\n
core:\n  noPublish: true\n
\n\n

core.klog

\n\n

The following options specify the logger configuration. Most of which can be\ndynamically adjusted at run-time.

\n\n
\n

NOTE: The logger options can also be specified via command line flags\nwhich take precedence over any corresponding config file options.

\n
\n\n

core.klog.addDirHeader

\n\n

If true, adds the file directory to the header of the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

core.klog.alsologtostderr

\n\n

Log to standard error as well as files.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

core.klog.logBacktraceAt

\n\n

When logging hits line file:N, emit a stack trace.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n\n

core.klog.logDir

\n\n

If non-empty, write log files in this directory.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

core.klog.logFile

\n\n

If non-empty, use this log file.

\n\n

Default: empty

\n\n

Run-time configurable: no

\n\n

core.klog.logFileMaxSize

\n\n

Defines the maximum size a log file can grow to. Unit is megabytes. If the\nvalue is 0, the maximum file size is unlimited.

\n\n

Default: 1800

\n\n

Run-time configurable: no

\n\n

core.klog.logtostderr

\n\n

Log to standard error instead of files

\n\n

Default: true

\n\n

Run-time configurable: yes

\n\n

core.klog.skipHeaders

\n\n

If true, avoid header prefixes in the log messages.

\n\n

Default: false

\n\n

Run-time configurable: yes

\n\n

core.klog.skipLogHeaders

\n\n

If true, avoid headers when opening log files.

\n\n

Default: false

\n\n

Run-time configurable: no

\n\n

core.klog.stderrthreshold

\n\n

Logs at or above this threshold go to stderr (default 2)

\n\n

Run-time configurable: yes

\n\n

core.klog.v

\n\n

Number for the log level verbosity.

\n\n

Default: 0

\n\n

Run-time configurable: yes

\n\n

core.klog.vmodule

\n\n

Comma-separated list of pattern=N settings for file-filtered logging.

\n\n

Default: empty

\n\n

Run-time configurable: yes

\n\n

sources

\n\n

The sources section contains feature source specific configuration parameters.

\n\n

sources.cpu

\n\n

sources.cpu.cpuid

\n\n
sources.cpu.cpuid.attributeBlacklist
\n\n

Prevent publishing cpuid features listed in this option.

\n\n
\n

NOTE: overridden by sources.cpu.cpuid.attributeWhitelist (if specified)

\n
\n\n

Default: [AVX10, BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT,\nNX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SGXLC, SSE, SSE2, SSE3, SSE4.1,\nSSE4.2, SSSE3, TDX_GUEST]

\n\n

Example:

\n\n
sources:\n  cpu:\n    cpuid:\n      attributeBlacklist: [MMX, MMXEXT]\n
\n\n
sources.cpu.cpuid.attributeWhitelist
\n\n

Only publish the cpuid features listed in this option.

\n\n
\n

NOTE: takes precedence over sources.cpu.cpuid.attributeBlacklist

\n
\n\n

Default: empty

\n\n

Example:

\n\n
sources:\n  cpu:\n    cpuid:\n      attributeWhitelist: [AVX512BW, AVX512CD, AVX512DQ, AVX512F, AVX512VL]\n
\n\n

sources.kernel

\n\n

sources.kernel.kconfigFile

\n\n

Path of the kernel config file. If empty, NFD runs a search in the well-known\nstandard locations.

\n\n

Default: empty

\n\n

Example:

\n\n
sources:\n  kernel:\n    kconfigFile: \"/path/to/kconfig\"\n
\n\n

sources.kernel.configOpts

\n\n

Kernel configuration options to publish as feature labels.

\n\n

Default: [NO_HZ, NO_HZ_IDLE, NO_HZ_FULL, PREEMPT]

\n\n

Example:

\n\n
sources:\n  kernel:\n    configOpts: [NO_HZ, X86, DMI]\n
\n\n

sources.local

\n\n

sources.local.hooksEnabled

\n\n

DEPRECATED: Hooks are DEPRECATED since v0.12.0 release and support (and\nthis configuration option) will be removed in NFD v0.17. Use\nfeature files instead.

\n\n

Configuration option to disable/enable hooks execution. Disabled by default.

\n\n
\n

NOTE: The default NFD container image only supports statically linked\nbinaries. Use the full image variant\nfor a slightly more extensive environment that additionally supports bash and\nperl runtimes.

\n
\n\n

GitHub tracking issue:\nDrop support for hooks (#856).

\n\n

Default: false

\n\n

Example:

\n\n
sources:\n  local:\n    hooksEnabled: true\n
\n\n

sources.pci

\n\n

sources.pci.deviceClassWhitelist

\n\n

List of PCI device class IDs for which to\npublish a label. Can be specified as a main class only (e.g. 03) or full\nclass-subclass combination (e.g. 0300) - the former implies that all\nsubclasses are accepted. The format of the labels can be further configured\nwith deviceLabelFields.

\n\n

Default: [\"03\", \"0b40\", \"12\"]

\n\n

Example:

\n\n
sources:\n  pci:\n    deviceClassWhitelist: [\"0200\", \"03\"]\n
\n\n

sources.pci.deviceLabelFields

\n\n

The set of PCI ID fields to use when constructing the name of the feature\nlabel. Valid fields are class, vendor, device, subsystem_vendor and\nsubsystem_device.

\n\n

Default: [class, vendor]

\n\n

Example:

\n\n
sources:\n  pci:\n    deviceLabelFields: [class, vendor, device]\n
\n\n

With the example config above NFD would publish labels like:\nfeature.node.kubernetes.io/pci-<class-id>_<vendor-id>_<device-id>.present=true

\n\n

sources.usb

\n\n

sources.usb.deviceClassWhitelist

\n\n

List of USB device class IDs for\nwhich to publish a feature label. The format of the labels can be further\nconfigured with deviceLabelFields.

\n\n

Default: [\"0e\", \"ef\", \"fe\", \"ff\"]

\n\n

Example:

\n\n
sources:\n  usb:\n    deviceClassWhitelist: [\"ef\", \"ff\"]\n
\n\n

sources.usb.deviceLabelFields

\n\n

The set of USB ID fields from which to compose the name of the feature label.\nValid fields are class, vendor, device and serial.

\n\n

Default: [class, vendor, device]

\n\n

Example:

\n\n
sources:\n  pci:\n    deviceLabelFields: [class, vendor]\n
\n\n

With the example config above NFD would publish labels like:\nfeature.node.kubernetes.io/usb-<class-id>_<vendor-id>.present=true

\n\n

sources.custom

\n\n

List of rules to process in the custom feature source to create user-specific\nlabels. Refer to the documentation of the\ncustom feature source for\ndetails of the available rules and their configuration.

\n\n

Default: empty

\n\n

Example:

\n\n
sources:\n  custom:\n    - name: \"my custom rule\"\n      labels:\n        my-custom-feature: \"true\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            e1000e: {op: Exists}\n        - feature: pci.device\n          matchExpressions:\n            class: {op: In, value: [\"0200\"]}\n            vendor: {op: In, value: [\"8086\"]}\n
\n","dir":"/reference/","name":"worker-configuration-reference.md","path":"reference/worker-configuration-reference.md","url":"/reference/worker-configuration-reference.html"},{"title":"NFD-Worker","layout":"default","sort":4,"content":"

NFD-Worker

\n\n
\n\n

NFD-Worker is preferably run as a Kubernetes DaemonSet. This assures\nre-labeling on regular intervals capturing changes in the system configuration\nand makes sure that new nodes are labeled as they are added to the cluster.\nWorker connects to the nfd-master service to advertise hardware features.

\n\n

When run as a daemonset, nodes are re-labeled at an default interval of 60s.\nThis can be changed by using the\ncore.sleepInterval\nconfig option.

\n\n

The worker configuration file is watched and re-read on every change which\nprovides a mechanism of dynamic run-time reconfiguration. See\nworker configuration for more details.

\n\n

Worker configuration

\n\n

NFD-Worker supports dynamic configuration through a configuration file. The\ndefault location is /etc/kubernetes/node-feature-discovery/nfd-worker.conf,\nbut, this can be changed by specifying the-config command line flag.\nConfiguration file is re-read whenever it is modified which makes run-time\nre-configuration of nfd-worker straightforward.

\n\n

Worker configuration file is read inside the container, and thus, Volumes and\nVolumeMounts are needed to make your configuration available for NFD. The\npreferred method is to use a ConfigMap which provides easy deployment and\nre-configurability.

\n\n

The provided nfd-worker deployment templates create an empty configmap and\nmount it inside the nfd-worker containers. In kustomize deployments,\nconfiguration can be edited with:

\n\n
kubectl -n ${NFD_NS} edit configmap nfd-worker-conf\n
\n\n

In Helm deployments,\nWorker pod parameter\nworker.config can be used to edit the respective configuration.

\n\n

See\nnfd-worker configuration file reference\nfor more details.\nThe (empty-by-default)\nexample config\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.

\n\n

Configuration options can also be specified via the -options command line\nflag, in which case no mounts need to be used. The same format as in the config\nfile must be used, i.e. JSON (or YAML). For example:

\n\n
-options='{\"sources\": { \"pci\": { \"deviceClassWhitelist\": [\"12\"] } } }'\n
\n\n

Configuration options specified from the command line will override those read\nfrom the config file.

\n","dir":"/usage/","name":"nfd-worker.md","path":"usage/nfd-worker.md","url":"/usage/nfd-worker.html"},{"title":"TLS authentication","layout":"default","sort":5,"content":"

Communication security with TLS

\n\n

Table of contents

\n\n
    \n
  1. Automated TLS certificate management using cert-manager
  2. \n
  3. Manual TLS certificate management
  4. \n
\n\n
\n\n
\n

DEPRECATED: this section only applies when the gRPC API is used, i.e.\nwhen the NodeFeature API is disabled (via the -feature-gates\nNodeFeatureAPI=false flag) on both nfd-master and nfd-worker. The gRPC API\nis deprecated and will be removed in a future release.

\n
\n\n

NFD supports mutual TLS authentication between the nfd-master and nfd-worker\ninstances. That is, nfd-worker and nfd-master both verify that the other end\npresents a valid certificate.

\n\n

TLS authentication is enabled by specifying -ca-file, -key-file and\n-cert-file args, on both the nfd-master and nfd-worker instances. The\ntemplate specs provided with NFD contain (commented out) example configuration\nfor enabling TLS authentication.

\n\n

The Common Name (CN) of the nfd-master certificate must match the DNS name of\nthe nfd-master Service of the cluster. By default, nfd-master only check that\nthe nfd-worker has been signed by the specified root certificate (-ca-file).

\n\n

Additional hardening can be enabled by specifying -verify-node-name in\nnfd-master args, in which case nfd-master verifies that the NodeName presented\nby nfd-worker matches the Common Name (CN) or a Subject Alternative Name (SAN)\nof its certificate.

\n\n

Automated TLS certificate management using cert-manager

\n\n

cert-manager can be used to automate certificate\nmanagement between nfd-master and the nfd-worker pods.

\n\n

The NFD source code repository contains an example kustomize overlay and helm\nchart that can be used to deploy NFD with cert-manager supplied certificates\nenabled.

\n\n

To install cert-manager itself, you can run:

\n\n
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml\n
\n\n

Alternatively, you can refer to cert-manager documentation for other\ninstallation methods such as the Helm chart they provide.

\n\n

When using the Helm chart to deploy NFD, override values.yaml to enable both the\ntls.enabled and tls.certManager options. Note that if you do not enable\ntls.certManager, helm will successfully install the application, but\ndeployment will wait until certificates are manually created, as demonstrated\nbelow.

\n\n

See the sample installation commands in the Helm Deployment\nand Configuration sections above for how to either override\nindividual values, or provide a yaml file with which to override default\nvalues.

\n\n

Manual TLS certificate management

\n\n

If you do not with to make use of cert-manager, the certificates can be\nmanually created and stored as secrets within the NFD namespace.

\n\n

Create a CA certificate

\n\n
openssl req -x509 -newkey rsa:4096 -keyout ca.key -nodes \\\n        -subj \"/CN=nfd-ca\" -days 10000 -out ca.crt\n
\n\n

Create a common openssl config file.

\n\n
cat <<EOF > nfd-common.conf\n[ req ]\ndefault_bits = 4096\nprompt = no\ndefault_md = sha256\nreq_extensions = req_ext\ndistinguished_name = dn\n\n[ dn ]\nC = XX\nST = some-state\nL = some-city\nO = some-company\nOU = node-feature-discovery\n\n[ req_ext ]\nsubjectAltName = @alt_names\n\n[ v3_ext ]\nauthorityKeyIdentifier=keyid,issuer:always\nbasicConstraints=CA:FALSE\nkeyUsage=keyEncipherment,dataEncipherment\nextendedKeyUsage=serverAuth,clientAuth\nsubjectAltName=@alt_names\nEOF\n
\n\n

Now, create the nfd-master certificate.

\n\n
cat <<EOF > nfd-master.conf\n.include nfd-common.conf\n\n[ dn ]\nCN = nfd-master\n\n[ alt_names ]\nDNS.1 = nfd-master\nDNS.2 = nfd-master.node-feature-discovery.svc.cluster.local\nDNS.3 = localhost\nEOF\n\nopenssl req -new -newkey rsa:4096 -keyout nfd-master.key -nodes -out nfd-master.csr -config nfd-master.conf\n
\n\n

Create certificates for nfd-worker and nfd-topology-updater

\n\n
cat <<EOF > nfd-worker.conf\n.include nfd-common.conf\n\n[ dn ]\nCN = nfd-worker\n\n[ alt_names ]\nDNS.1 = nfd-worker\nDNS.2 = nfd-worker.node-feature-discovery.svc.cluster.local\nEOF\n\n# Config for topology updater is identical except for the DN and alt_names\nsed -e 's/worker/topology-updater/g' < nfd-worker.conf > nfd-topology-updater.conf\n\nopenssl req -new -newkey rsa:4096 -keyout nfd-worker.key -nodes -out nfd-worker.csr -config nfd-worker.conf\nopenssl req -new -newkey rsa:4096 -keyout nfd-topology-updater.key -nodes -out nfd-topology-updater.csr -config nfd-topology-updater.conf\n
\n\n

Now, sign the certificates with the CA created earlier.

\n\n
for cert in nfd-master nfd-worker nfd-topology-updater; do\n  echo signing $cert\n  openssl x509 -req -in $cert.csr -CA ca.crt -CAkey ca.key \\\n    -CAcreateserial -out $cert.crt -days 10000 \\\n    -extensions v3_ext -extfile $cert.conf\ndone\n
\n\n

Finally, turn these certificates into secrets.

\n\n
for cert in nfd-master nfd-worker nfd-topology-updater; do\n  echo creating secret for $cert in node-feature-discovery namespace\n  cat <<EOF | kubectl create -n node-feature-discovery -f -\n---\napiVersion: v1\nkind: Secret\ntype: kubernetes.io/tls\nmetadata:\n  name: ${cert}-cert\ndata:\n  ca.crt: $( cat ca.crt | base64 -w 0 )\n  tls.crt: $( cat $cert.crt | base64 -w 0 )\n  tls.key: $( cat $cert.key | base64 -w 0 )\nEOF\n\ndone\n
\n","dir":"/deployment/","name":"tls.md","path":"deployment/tls.md","url":"/deployment/tls.html"},{"title":"Developer guide","layout":"default","sort":5,"content":"

Developer guide

\n\n

Table of contents

\n\n
    \n
  1. Building from source
      \n
    1. Download the source code
    2. \n
    3. Docker build
    4. \n
    5. Docker multi-arch builds with buildx
    6. \n
    7. Deployment
    8. \n
    9. Building locally
    10. \n
    11. Customizing the build
    12. \n
    13. Testing
    14. \n
    \n
  2. \n
  3. Running locally
      \n
    1. NFD-Master
    2. \n
    3. NFD-Worker
    4. \n
    5. NFD-Topology-Updater
    6. \n
    \n
  4. \n
  5. Running with Tilt
      \n
    1. Prerequisites
    2. \n
    3. Environment variables
    4. \n
    \n
  6. \n
  7. Documentation
  8. \n
\n\n
\n\n

Building from source

\n\n

Download the source code

\n\n
git clone https://github.com/kubernetes-sigs/node-feature-discovery\ncd node-feature-discovery\n
\n\n

Docker build

\n\n

Build the container image

\n\n

See customizing the build below for altering the\ncontainer image registry, for example.

\n\n
make\n
\n\n

Push the container image

\n\n

Optional, this example with Docker.

\n\n
docker push <IMAGE_TAG>\n
\n\n

Docker multi-arch builds with buildx

\n\n

The default set of architectures enabled for mulit-arch builds are linux/amd64\nand linux/arm64. If more architectures are needed one can override the\nIMAGE_ALL_PLATFORMS variable with a comma separated list of OS/ARCH tuples.

\n\n

Build the manifest-list with a container image per arch

\n\n
make image-all\n
\n\n

Currently docker does not support loading of manifest-lists meaning the images\nare not shown when executing docker images, see:\nbuildx issue #59.

\n\n

Push the manifest-list with container image per arch

\n\n
make push-all\n
\n\n

The resulting container image can be used in the same way on each arch by pulling\ne.g. node-feature-discovery:v0.16.4 without specifying the\narchitecture. The manifest-list will take care of providing the right\narchitecture image.

\n\n

Change the job spec to use your custom image (optional)

\n\n

To use your published image from the step above instead of the\nregistry.k8s.io/nfd/node-feature-discovery image, edit image\nattribute in the spec template(s) to the new location\n(<registry-name>/<image-name>[:<version>]).

\n\n

Deployment

\n\n

The yamls makefile generates a kustomization.yaml matching your locally\nbuilt image and using the deploy/overlays/default deployment. See\nbuild customization below for configurability, e.g.\nchanging the deployment namespace.

\n\n
K8S_NAMESPACE=my-ns make yamls\nkubectl apply -k .\n
\n\n

You can use alternative deployment methods by modifying the auto-generated\nkustomization file.

\n\n

Building locally

\n\n

You can also build the binaries locally

\n\n
make build\n
\n\n

This will compile binaries under bin/

\n\n

Customizing the build

\n\n

There are several Makefile variables that control the build process and the\nname of the resulting container image. The following are targeted targeted for\nbuild customization and they can be specified via environment variables or\nmakefile overrides.

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
VariableDescriptionDefault value
HOSTMOUNT_PREFIXPrefix of system directories for feature discovery (local builds)/ (local builds) /host- (container builds)
IMAGE_BUILD_CMDCommand to build the imagedocker build
IMAGE_BUILD_EXTRA_OPTSExtra options to pass to build commandempty
IMAGE_BUILDX_CMDCommand to build and push multi-arch images with buildxDOCKER_CLI_EXPERIMENTAL=enabled docker buildx build –platform=${IMAGE_ALL_PLATFORMS} –progress=auto –pull
IMAGE_ALL_PLATFORMSComma separated list of OS/ARCH tuples for mulit-arch buildslinux/amd64,linux/arm64
IMAGE_PUSH_CMDCommand to push the image to remote registrydocker push
IMAGE_REGISTRYContainer image registry to useregistry.k8s.io/nfd
IMAGE_TAG_NAMEContainer image tag name<nfd version>
IMAGE_EXTRA_TAG_NAMESAdditional container image tag(s) to create when building imageempty
K8S_NAMESPACEnfd-master and nfd-worker namespacenode-feature-discovery
\n\n

For example, to use a custom registry:

\n\n
make IMAGE_REGISTRY=<my custom registry uri>\n
\n\n

Or to specify a build tool different from Docker, It can be done in 2 ways:

\n\n
    \n
  1. \n

    via environment

    \n\n
     IMAGE_BUILD_CMD=\"buildah bud\" make\n
    \n
  2. \n
  3. \n

    by overriding the variable value

    \n\n
     make  IMAGE_BUILD_CMD=\"buildah bud\"\n
    \n
  4. \n
\n\n

Testing

\n\n

Unit tests are automatically run as part of the container image build. You can\nalso run them manually in the source code tree by running:

\n\n
make test\n
\n\n

End-to-end tests are built on top of the e2e test framework of Kubernetes, and,\nthey required a cluster to run them on. For running the tests on your test\ncluster you need to specify the kubeconfig to be used:

\n\n
make e2e-test KUBECONFIG=$HOME/.kube/config\n
\n\n

There are several environment variables that can be used to customize the\ne2e-tests:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
VariableDescriptionDefault value
KUBECONFIGKubeconfig for running e2e-testsempty
E2E_TEST_CONFIGParameterization file of e2e-tests (see example)empty
E2E_PULL_IF_NOT_PRESENTTrue-ish value makes the image pull policy IfNotPresent (to be used only in e2e tests)false
E2E_TEST_FULL_IMAGERun e2e-test also against the Full Image tagfalse
E2E_GINKGO_LABEL_FILTERGinkgo label filter to use for running e2e testsempty
OPENSHIFTNon-empty value enables OpenShift specific support (only affects e2e tests)empty
\n\n

Running locally

\n\n
\n

**DEPRECATED: Running NFD locally is deprecated and will be removed in a\nfuture release. It depends on the gRPC API which is deprecated and will be\nremoved in a future release. To run NFD locally, disable the NodeFeature API\nwith -feature-gates NodeFeatureAPI=false flag.

\n
\n\n

You can run NFD locally, either directly on your host OS or in containers for\ntesting and development purposes. This may be useful e.g. for checking\nfeatures-detection.

\n\n

NFD-Master

\n\n

When running as a standalone container labeling is expected to fail because\nKubernetes API is not available. Thus, it is recommended to use -no-publish\nAlso specify -crd-controller=false and -feature-gates NodeFeatureAPI=false\ncommand line flags to disable CRD controller and enable gRPC. E.g.

\n\n
$ export NFD_CONTAINER_IMAGE=registry.k8s.io/nfd/node-feature-discovery:v0.16.4\n$ docker run --rm --name=nfd-test ${NFD_CONTAINER_IMAGE} nfd-master -no-publish -crd-controller=false -feature-gates NodeFeatureAPI=false\n2019/02/01 14:48:21 Node Feature Discovery Master <NFD_VERSION>\n2019/02/01 14:48:21 gRPC server serving on port: 8080\n
\n\n

NFD-Worker

\n\n

To run nfd-worker as a “stand-alone” container you need to run it in the same\nnetwork namespace as the nfd-master container:

\n\n
$ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-worker -feature-gates NodeFeatureAPI=false\n2019/02/01 14:48:56 Node Feature Discovery Worker <NFD_VERSION>\n...\n
\n\n

If you just want to try out feature discovery without connecting to nfd-master,\npass the -no-publish flag to nfd-worker.

\n\n
\n

NOTE: Some feature sources need certain directories and/or files from the\nhost mounted inside the NFD container. Thus, you need to provide Docker with\nthe correct --volume options for them to work correctly when run\nstand-alone directly with docker run. See\nthe default deployment\nfor up-to-date information about the required volume mounts.

\n
\n\n

NFD-Topology-Updater

\n\n

To run nfd-topology-updater as a “stand-alone” container\nyou need to run it in with the -no-publish flag to disable communication to\nthe Kubernetes apiserver.

\n\n
$ docker run --rm ${NFD_CONTAINER_IMAGE} nfd-topology-updater -no-publish\n2019/02/01 14:48:56 Node Feature Discovery Topology Updater <NFD_VERSION>\n...\n
\n\n

If you just want to try out resource topology discovery without connecting to\nthe Kubernetes API, pass the -no-publish flag to nfd-topology-updater.

\n\n
\n

NOTE: NFD topology updater needs certain directories and/or files from\nthe host mounted inside the NFD container. Thus, you need to provide Docker\nwith the correct --volume options for them to work correctly when\nrun stand-alone directly with docker run. See\nthe template spec\nfor up-to-date information about the required volume mounts.

\n
\n\n

Running with Tilt

\n\n

Another option for building NFD locally is via Tilt tool, which can build container\nimages, push them to a local registry and reload your Kubernetes pods automatically.\nWhen using Tilt, you don’t have to build container images and re-deploy your pods\nmanually but instead let the Tilt take care of it. Tiltfile is a configuration file\nfor the Tilt and is located at the root directory. To develop NFD with Tilt, follow\nthe steps below.

\n\n

Prerequisites

\n\n
    \n
  1. Install Docker
  2. \n
  3. Setup Docker as a non-root user.
  4. \n
  5. Install kubectl
  6. \n
  7. Install kustomize
  8. \n
  9. Install tilt
  10. \n
  11. Create a local Kubernetes cluster
  12. \n
\n\n

To start up your Tilt development environment, run

\n\n
tilt up\n
\n\n

at the root of your local NFD codebase. Tilt will start a web interface in the\nlocalhost and port 10350. From the web interface, you are able to see how NFD worker\nand master are progressing, watch their build and runtime logs. Once your code changes\nare saved locally, Tilt will notice it and re-build the container image from the\ncurrent code, push the image to the registry and re-deploy NFD pods with the latest\ncontainer image.

\n\n

Environment variables

\n\n

To override environment variables used in the Tiltfile during image build,\nexport them in your current terminal before starting Tilt.

\n\n
export IMAGE_TAG_NAME=\"v1\"\ntilt up\n
\n\n

This will override the default value(master) of IMAGE_TAG_NAME variable defined\nin the Tiltfile.

\n\n

Documentation

\n\n

All documentation resides under the\ndocs\ndirectory in the source tree. It is designed to be served as a html site by\nGitHub Pages.

\n\n

Building the documentation is containerized to fix the build\nenvironment. The recommended way for developing documentation is to run:

\n\n
make site-serve\n
\n\n

This will build the documentation in a container and serve it under\nlocalhost:4000/ making it easy to verify the results.\nAny changes made to the docs/ will automatically re-trigger a rebuild and are\nreflected in the served content and can be inspected with a browser refresh.

\n\n

To just build the html documentation run:

\n\n
make site-build\n
\n\n

This will generate html documentation under docs/_site/.

\n\n\n","dir":"/developer-guide/","name":"index.md","path":"developer-guide/index.md","url":"/developer-guide/"},{"title":"Topology Updater Cmdline Reference","layout":"default","sort":5,"content":"

NFD-Topology-Updater Commandline Flags

\n\n

Table of Contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -config
  6. \n
  7. -no-publish
  8. \n
  9. -oneshot
  10. \n
  11. -metrics
  12. \n
  13. -sleep-interval
  14. \n
  15. -watch-namespace
  16. \n
  17. -kubelet-config-uri
  18. \n
  19. -api-auth-token-file
  20. \n
  21. -podresources-socket
  22. \n
  23. -pods-fingerprint
  24. \n
  25. -kubelet-state-dir
  26. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-topology-updater -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 \\\nnfd-topology-updater -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-config

\n\n

The -config flag specifies the path of the nfd-topology-updater\nconfiguration file to use.

\n\n

Default: /etc/kubernetes/node-feature-discovery/nfd-topology-updater.conf

\n\n

Example:

\n\n
nfd-topology-updater -config=/opt/nfd/nfd-topology-updater.conf\n
\n\n

-no-publish

\n\n

The -no-publish flag makes for a “dry-run” flag for nfd-topology-updater.\nNFD-Topology-Updater runs resource hardware topology detection normally, but\nNodeResourceTopology\nobjects are not created or updated.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-topology-updater -no-publish\n
\n\n

-oneshot

\n\n

The -oneshot flag causes nfd-topology-updater to exit after one pass of\nresource hardware topology detection.

\n\n

Default: false

\n\n

Example:

\n\n
nfd-topology-updater -oneshot -no-publish\n
\n\n

-metrics

\n\n

The -metrics flag specifies the port on which to expose\nPrometheus metrics. Setting this to 0 disables the\nmetrics server on nfd-topology-updater.

\n\n

Default: 8081

\n\n

Example:

\n\n
nfd-topology-updater -metrics=12345\n
\n\n

-sleep-interval

\n\n

The -sleep-interval specifies the interval between resource hardware\ntopology re-examination (and CR updates). zero means no CR updates on interval basis.

\n\n

Default: 60s

\n\n

Example:

\n\n
nfd-topology-updater -sleep-interval=1h\n
\n\n

-watch-namespace

\n\n

The -watch-namespace specifies the namespace to ensure that resource\nhardware topology examination only happens for the pods running in the\nspecified namespace. Pods that are not running in the specified namespace\nare not considered during resource accounting. This is particularly useful\nfor testing/debugging purpose. A “*” value would mean that all the pods would\nbe considered during the accounting process.

\n\n

Default: “*”

\n\n

Example:

\n\n
nfd-topology-updater -watch-namespace=rte\n
\n\n

-kubelet-config-uri

\n\n

The -kubelet-config-uri specifies the path to the Kubelet’s configuration.\nNote that the URi could either be a local host file or an HTTP endpoint.

\n\n

Default: https://${NODE_ADDRESS}:10250/configz

\n\n

Example:

\n\n
nfd-topology-updater -kubelet-config-uri=file:///var/lib/kubelet/config.yaml\n
\n\n

-api-auth-token-file

\n\n

The -api-auth-token-file specifies the path to the api auth token file\nwhich is used to retrieve Kubelet’s configuration from Kubelet secure port,\nonly taking effect when -kubelet-config-uri is https.\nNote that this token file must bind to a role that has the get capability to\nnodes/proxy resources.

\n\n

Default: /var/run/secrets/kubernetes.io/serviceaccount/token

\n\n

Example:

\n\n
nfd-topology-updater -token-file=/var/run/secrets/kubernetes.io/serviceaccount/token\n
\n\n

-podresources-socket

\n\n

The -podresources-socket specifies the path to the Unix socket where kubelet\nexports a gRPC service to enable discovery of in-use CPUs and devices, and to\nprovide metadata for them.

\n\n

Default: /host-var/lib/kubelet/pod-resources/kubelet.sock

\n\n

Example:

\n\n
nfd-topology-updater -podresources-socket=/var/lib/kubelet/pod-resources/kubelet.sock\n
\n\n

-pods-fingerprint

\n\n

Enables compute and report the pod set fingerprint in the NRT.\nA pod fingerprint is a compact representation of the “node state” regarding resources.

\n\n

Default: true

\n\n

Example:

\n\n
nfd-topology-updater -pods-fingerprint=false\n
\n\n

-kubelet-state-dir

\n\n

The -kubelet-state-dir specifies the path to the Kubelet state directory,\nwhere state and checkpoint files are stored.\nThe files are mount as read-only and cannot be change by the updater.\nEnabled by default.\nPassing an empty string will disable the watching.

\n\n

Default: /host-var/lib/kubelet

\n\n

Example:

\n\n
nfd-topology-updater -kubelet-state-dir=/var/lib/kubelet\n
\n","dir":"/reference/","name":"topology-updater-commandline-reference.md","path":"reference/topology-updater-commandline-reference.md","url":"/reference/topology-updater-commandline-reference.html"},{"title":"NFD-Topology-Updater","layout":"default","sort":5,"content":"

NFD-Topology-Updater

\n\n
\n\n

NFD-Topology-Updater is preferably run as a Kubernetes DaemonSet.\nThis assures re-examination on regular intervals\nand/or per pod life-cycle events, capturing changes in the allocated\nresources and hence the allocatable resources on a per-zone basis by updating\nNodeResourceTopology custom resources.\nIt makes sure that new NodeResourceTopology instances are created for each new\nnodes that get added to the cluster.

\n\n

Because of the design and implementation of Kubernetes, only resources exclusively\nallocated to Guaranteed Quality of Service\npods will be accounted.\nThis includes\nCPU cores,\nmemory\nand\ndevices.

\n\n

When run as a daemonset, nodes are re-examined for the allocated resources\n(to determine the information of the allocatable resources on a per-zone basis\nwhere a zone can be a NUMA node) at an interval specified using the\n-sleep-interval\noption. The default sleep interval is set to 60s\nwhich is the value when no -sleep-interval is specified.\nThe re-examination can be disabled by setting the sleep-interval to 0.

\n\n

Another option is to configure the updater to update\nthe allocated resources per pod life-cycle events.\nThe updater will monitor the checkpoint file stated in\n-kubelet-state-dir\nand triggers an update for every change occurs in the files.

\n\n

In addition, it can avoid examining specific allocated resources\ngiven a configuration of resources to exclude via -excludeList

\n\n

Deployment Notes

\n\n

Kubelet PodResource API with the\nGetAllocatableResources functionality enabled is a\nprerequisite for nfd-topology-updater to be able to run (i.e. Kubernetes v1.21\nor later is required).

\n\n

Preceding Kubernetes v1.23, the kubelet must be started with\n--feature-gates=KubeletPodResourcesGetAllocatable=true.

\n\n

Starting from Kubernetes v1.23, the KubeletPodResourcesGetAllocatable\nfeature gate. is enabled by default

\n\n

Topology-Updater Configuration

\n\n

NFD-Topology-Updater supports configuration through a configuration file. The\ndefault location is /etc/kubernetes/node-feature-discovery/topology-updater.conf,\nbut, this can be changed by specifying the-config command line flag.

\n\n
\n

NOTE: unlike nfd-worker, dynamic configuration updates are not supported.

\n
\n\n

Topology-Updater configuration file is read inside the container,\nand thus, Volumes and VolumeMounts are needed\nto make your configuration available for NFD.\nThe preferred method is to use a ConfigMap\nwhich provides easy deployment and re-configurability.

\n\n

The provided nfd-topology-updater deployment templates\ncreate an empty configmap\nand mount it inside the nfd-topology-updater containers.\nIn kustomize deployments, configuration can be edited with:

\n\n
kubectl -n ${NFD_NS} edit configmap nfd-topology-updater-conf\n
\n\n

In Helm deployments,\nTopology Updater parameters\ntoplogyUpdater.config can be used to edit the respective configuration.

\n\n

See\nnfd-topology-updater configuration file reference\nfor more details.\nThe (empty-by-default)\nexample config\ncontains all available configuration options and can be used as a reference\nfor creating a configuration.

\n\n\n","dir":"/usage/","name":"nfd-topology-updater.md","path":"usage/nfd-topology-updater.md","url":"/usage/nfd-topology-updater.html"},{"title":"Contributing","layout":"default","sort":6,"content":"

Contributing

\n\n
\n\n

Community

\n\n

You can reach us via the following channels:

\n\n\n\n

Governance

\n\n

This is a\nSIG-node\nsubproject, hosted under the\nKubernetes SIGs organization in Github.\nThe project was established in 2016 and was migrated to Kubernetes SIGs in 2018.

\n\n

License

\n\n

This is open source software released under the Apache 2.0 License.

\n","dir":"/contributing/","name":"index.md","path":"contributing/index.md","url":"/contributing/"},{"title":"Uninstallation","layout":"default","sort":6,"content":"

Uninstallation

\n\n
\n\n

Follow the uninstallation instructions of the deployment method used\n(kustomize,\nhelm or\noperator).

\n\n

Removing feature labels

\n\n
\n

NOTE: This is unnecessary when using the Helm chart for deployment as it\nwill clean up the nodes when NFD is uninstalled.

\n
\n\n

NFD-Master has a special -prune command line flag for removing all\nnfd-related node labels, annotations, extended resources and taints from the\ncluster.

\n\n
kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.4\nkubectl -n node-feature-discovery wait job.batch/nfd-master --for=condition=complete && \\\n    kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.4\n
\n\n
\n

NOTE: You must run prune before removing the RBAC rules (serviceaccount,\nclusterrole and clusterrolebinding).

\n
\n","dir":"/deployment/","name":"uninstallation.md","path":"deployment/uninstallation.md","url":"/deployment/uninstallation.html"},{"title":"Topology-Updater config reference","layout":"default","sort":6,"content":"

Configuration file reference of nfd-topology-updater

\n\n

Table of contents

\n\n
    \n
  1. excludeList
      \n
    1. excludeList.*
    2. \n
    \n
  2. \n
\n\n
\n\n

See the\nsample configuration file\nfor a full example configuration.

\n\n

excludeList

\n\n

The excludeList specifies a key-value map of allocated resources\nthat should not be examined by the topology-updater\nagent per node.\nEach key is a node name with a value as a list of resources\nthat should not be examined by the agent for that specific node.

\n\n

Default: empty

\n\n

Example:

\n\n
excludeList:\n  nodeA: [hugepages-2Mi]\n  nodeB: [memory]\n  nodeC: [cpu, hugepages-2Mi]\n
\n\n

excludeList.*

\n

excludeList.* is a special value that use to specify all nodes.\nA resource that would be listed under this key, would be excluded from all nodes.

\n\n

Default: empty

\n\n

Example:

\n\n
excludeList:\n  '*': [hugepages-2Mi]\n
\n","dir":"/reference/","name":"topology-updater-configuration-reference.md","path":"reference/topology-updater-configuration-reference.md","url":"/reference/topology-updater-configuration-reference.html"},{"title":"NFD-Garbage-Collector","layout":"default","sort":6,"content":"

NFD-GC

\n\n
\n\n

NFD-GC (NFD Garbage-Collector) is preferably run as a Kubernetes deployment\nwith one replica. It makes sure that all\nNodeFeature and\nNodeResourceTopology objects\nhave corresponding nodes and removes stale objects for non-existent nodes.

\n\n

The daemon watches for Node deletion events and removes NodeFeature and\nNodeResourceTopology objects upon them. It also runs periodically to make sure\nno node delete event was missed and to remove any NodeFeature or\nNodeResourceTopology objects that were created without corresponding node. The\ndefault garbage collector interval is set to 1h which is the value when no\n-gc-interval is specified.

\n\n

Configuration

\n\n

In Helm deployments (see\ngarbage collector parameters)\nNFD-GC will only be deployed when featureGates.NodeFeatureAPI or\ntopologyUpdater.enable is set to true.

\n","dir":"/usage/","name":"nfd-gc.md","path":"usage/nfd-gc.md","url":"/usage/nfd-gc.html"},{"title":"Metrics","layout":"default","sort":7,"content":"

Metrics

\n\n

Metrics are configured to be exposed using prometheus operator\nAPI’s by default. If you want to expose metrics using the prometheus operator\nAPI’s you need to install the prometheus operator in your cluster.\nBy default NFD Master and Worker expose metrics on port 8081.

\n\n

The exposed metrics are

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
MetricTypeDescription
nfd_master_build_infoGaugeVersion from which nfd-master was built
nfd_worker_build_infoGaugeVersion from which nfd-worker was built
nfd_gc_build_infoGaugeVersion from which nfd-gc was built
nfd_topology_updater_build_infoGaugeVersion from which nfd-topology-updater was built
nfd_node_update_requests_totalCounterNumber of node update requests received by the master over gRPC
nfd_node_updates_totalCounterNumber of nodes updated
nfd_node_update_failures_totalCounterNumber of nodes update failures
nfd_node_labels_rejected_totalCounterNumber of nodes labels rejected by nfd-master
nfd_node_extendedresources_rejected_totalCounterNumber of nodes extended resources rejected by nfd-master
nfd_node_taints_rejected_totalCounterNumber of nodes taints rejected by nfd-master
nfd_nodefeaturerule_processing_duration_secondsHistogramTime taken to process NodeFeatureRule objects
nfd_nodefeaturerule_processing_errors_totalCounterNumber or errors encountered while processing NodeFeatureRule objects
nfd_feature_discovery_duration_secondsHistogramTime taken to discover features on a node
nfd_topology_updater_scan_errors_totalCounterNumber of errors in scanning resource allocation of pods.
nfd_gc_objects_deleted_totalCounterNumber of NodeFeature and NodeResourceTopology objects garbage collected.
nfd_gc_object_delete_failures_totalCounterNumber of errors in deleting NodeFeature and NodeResourceTopology objects.
\n\n

Kustomize

\n\n

To deploy NFD with metrics enabled using kustomize, you can use the\nprometheus overlay.

\n\n

Helm

\n\n

By default metrics are enabled when deploying NFD via Helm. To enable Prometheus\nto scrape metrics from NFD, you need to pass the following values to Helm:

\n\n
--set prometheus.enable=true\n
\n\n

For more info on Helm deployment, see Helm.

\n\n

It is recommended to specify\n--set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false\nwhen deploying prometheus-operator via Helm to enable the prometheus-operator\nto scrape metrics from any PodMonitor.

\n\n

or setting labels on the PodMonitor via the helm parameter prometheus.labels\nto control which Prometheus instances will scrape this PodMonitor.

\n\n

Grafana dashboard

\n\n

NFD contains an example Grafana dashboard. You can import\nexamples/grafana-dashboard.json\nto your Grafana instance to visualize the NFD metrics.

\n","dir":"/deployment/","name":"metrics.md","path":"deployment/metrics.md","url":"/deployment/metrics.html"},{"title":"Garbage Collector Cmdline Reference","layout":"default","sort":7,"content":"

NFD-GC Commandline Flags

\n\n

Table of Contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. -version
  4. \n
  5. -gc-interval
  6. \n
\n\n
\n\n

To quickly view available command line flags execute nfd-gc -help.\nIn a docker container:

\n\n
docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 \\\nnfd-gc -help\n
\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

-version

\n\n

Print version and exit.

\n\n

-gc-interval

\n\n

The -gc-interval specifies the interval between periodic garbage collector runs.

\n\n

Default: 1h

\n\n

Example:

\n\n
nfd-gc -gc-interval=1h\n
\n","dir":"/reference/","name":"gc-commandline-reference.md","path":"reference/gc-commandline-reference.md","url":"/reference/gc-commandline-reference.html"},{"title":"CRDs","layout":"default","sort":7,"content":"

Custom Resources

\n\n

Table of contents

\n\n
    \n
  1. NodeFeature
  2. \n
  3. NodeFeatureGroup
  4. \n
  5. NodeFeatureRule
  6. \n
  7. NodeResourceTopology
  8. \n
\n\n
\n\n

NFD uses some Kubernetes custom resources.

\n\n

NodeFeature

\n\n

NodeFeature is an NFD-specific custom resource for communicating node\nfeatures and node labeling requests. The nfd-master pod watches for NodeFeature\nobjects, labels nodes as specified and uses the listed features as input when\nevaluating NodeFeatureRules. NodeFeature objects can be\nused for implementing 3rd party extensions (see\ncustomization guide for more\ndetails).

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeature\nmetadata:\n  labels:\n    nfd.node.kubernetes.io/node-name: node-1\n  name: node-1-vendor-features\nspec:\n  features:\n    instances:\n      vendor.device:\n        elements:\n        - attributes:\n            model: \"xpu-1\"\n            memory: \"4000\"\n            type: \"fast\"\n        - attributes:\n            model: \"xpu-2\"\n            memory: \"16000\"\n            type: \"slow\"\n  labels:\n    vendor-xpu-present: \"true\"\n
\n\n

NodeFeatureGroup

\n\n

NodeFeatureGroup is an NFD-specific custom resource that is designed for\ngrouping nodes based on their features. NFD-Master watches for NodeFeatureGroup\nobjects in the cluster and updates the status of the NodeFeatureGroup object\nwith the list of nodes that match the feature group rules. The NodeFeatureGroup\nrules follow the same syntax as the NodeFeatureRule rules.

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureGroup\nmetadata:\n  name: node-feature-group-example\nspec:\n  featureGroupRules:\n    - name: \"node has kernel version discovered\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: Exists}\n
\n\n

NodeFeatureGroup API is an alpha feature and disabled by default in NFD version\nv0.16. For more details and examples see the\ncustomization guide.

\n\n

NodeFeatureRule

\n\n

NodeFeatureRule is an NFD-specific custom resource that is designed for\nrule-based custom labeling of nodes. NFD-Master watches for NodeFeatureRule\nobjects in the cluster and labels nodes according to the rules within. Some use\ncases are e.g. application specific labeling in a specific environments or\nbeing distributed by hardware vendors to create specific labels for their\ndevices.

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: example-rule\nspec:\n  rules:\n    - name: \"example rule\"\n      labels:\n        \"example-custom-feature\": \"true\"\n      # Label is created if all of the rules below match\n      matchFeatures:\n        # Match if \"veth\" kernel module is loaded\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            veth: {op: Exists}\n        # Match if any PCI device with vendor 8086 exists in the system\n        - feature: pci.device\n          matchExpressions:\n            vendor: {op: In, value: [\"8086\"]}\n
\n\n

See the\nCustomization guide\nfor full documentation of the NodeFeatureRule resource and its usage.

\n\n

The\ndeployment/nodefeaturerule/samples/\ndirectory contains sample NodeFeatureRule objects that replicate the built-in\ndefault feature labels generated by NFD. The sample rules can be used as a base\nto customize NFD feature labels. To use them in place of the the NFD built-in\nlabels, the corresponding feature source(s) of nfd-worker should be disabled\nwith the\ncore.labelSources\nconfiguration option.

\n\n

NodeResourceTopology

\n\n

When run with NFD-Topology-Updater, NFD creates NodeResourceTopology objects\ncorresponding to node resource hardware topology such as:

\n\n
apiVersion: topology.node.k8s.io/v1alpha1\nkind: NodeResourceTopology\nmetadata:\n  name: node1\ntopologyPolicies: [\"SingleNUMANodeContainerLevel\"]\nzones:\n  - name: node-0\n    type: Node\n    resources:\n      - name: cpu\n        capacity: 20\n        allocatable: 16\n        available: 10\n      - name: vendor/nic1\n        capacity: 3\n        allocatable: 3\n        available: 3\n  - name: node-1\n    type: Node\n    resources:\n      - name: cpu\n        capacity: 30\n        allocatable: 30\n        available: 15\n      - name: vendor/nic2\n        capacity: 6\n        allocatable: 6\n        available: 6\n  - name: node-2\n    type: Node\n    resources:\n      - name: cpu\n        capacity: 30\n        allocatable: 30\n        available: 15\n      - name: vendor/nic1\n        capacity: 3\n        allocatable: 3\n        available: 3\n
\n\n

The NodeResourceTopology objects created by NFD can be used to gain insight\ninto the allocatable resources along with the granularity of those resources at\na per-zone level (represented by node-0 and node-1 in the above example) or can\nbe used by an external entity (e.g. topology-aware scheduler plugin) to take an\naction based on the gathered information.

\n\n\n","dir":"/usage/","name":"custom-resources.md","path":"usage/custom-resources.md","url":"/usage/custom-resources.html"},{"title":"Kubectl plugin cmdline reference","layout":"default","sort":8,"content":"

Commandline flags of kubectl-nfd (plugin)

\n\n

Table of contents

\n\n
    \n
  1. -h, -help
  2. \n
  3. Validate
      \n
    1. -f / –nodefeature-file
    2. \n
    \n
  4. \n
  5. Test
      \n
    1. -k, –kubeconfig
    2. \n
    3. -s, –namespace
    4. \n
    5. -n, –nodename
    6. \n
    7. -f, –nodefeaturerule-file
    8. \n
    \n
  6. \n
  7. DryRun
      \n
    1. -f, –nodefeaturerule-file
    2. \n
    3. -n, –nodefeature-file
    4. \n
    \n
  8. \n
\n\n
\n\n

To quickly view available command line flags execute kubectl nfd -help.

\n\n

-h, -help

\n\n

Print usage and exit.

\n\n

Validate

\n\n

Validate a NodeFeatureRule file.

\n\n

-f / –nodefeature-file

\n\n

The --nodefeature-file flag specifies the path to the NodeFeatureRule file\nto validate.

\n\n

Test

\n\n

Test a NodeFeatureRule file against a node without applying it.

\n\n

-k, –kubeconfig

\n\n

The --kubeconfig flag specifies the path to the kubeconfig file to use for\nCLI requests.

\n\n

-s, –namespace

\n\n

The --namespace flag specifies the namespace to use for CLI requests.\nDefault: default.

\n\n

-n, –nodename

\n\n

The --nodename flag specifies the name of the node to test the\nNodeFeatureRule against.

\n\n

-f, –nodefeaturerule-file

\n\n

The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file\nto test.

\n\n

DryRun

\n\n

Process a NodeFeatureRule file against a NodeFeature file.

\n\n

-f, –nodefeaturerule-file

\n\n

The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file\nto test.

\n\n

-n, –nodefeature-file

\n\n

The --nodefeature-file flag specifies the path to the NodeFeature file to test.

\n","dir":"/reference/","name":"plugin-commandline-reference.md","path":"reference/plugin-commandline-reference.md","url":"/reference/plugin-commandline-reference.html"},{"title":"Customization guide","layout":"default","sort":8,"content":"

Customization guide

\n\n

Table of contents

\n\n
    \n
  1. Overview
  2. \n
  3. NodeFeature custom resource
      \n
    1. A NodeFeature example
    2. \n
    3. Feature types
    4. \n
    \n
  4. \n
  5. NodeFeatureRule custom resource
      \n
    1. A NodeFeatureRule example
    2. \n
    3. Node tainting
    4. \n
    \n
  6. \n
  7. NodeFeatureGroup custom resource
      \n
    1. A NodeFeatureGroup example
    2. \n
    \n
  8. \n
  9. Local feature source
      \n
    1. An example
    2. \n
    3. Feature files
    4. \n
    5. Hooks
    6. \n
    7. Input format
    8. \n
    9. Mounts
    10. \n
    \n
  10. \n
  11. Custom feature source
      \n
    1. An example custom feature source configuration
    2. \n
    3. Additional configuration directory
    4. \n
    \n
  12. \n
  13. Node labels
  14. \n
  15. Feature rule format
      \n
    1. Fields
    2. \n
    3. Available features
    4. \n
    5. Templating
    6. \n
    7. Backreferences
    8. \n
    9. Examples
    10. \n
    \n
  16. \n
\n\n
\n\n

Overview

\n\n

NFD provides multiple extension points for vendor and application specific\nlabeling:

\n\n\n\n

NodeFeature custom resource

\n\n

NodeFeature objects provide a way for 3rd party extensions to advertise custom\nfeatures, both as “raw” features that serve as input to\nNodeFeatureRule objects and as feature\nlabels directly.

\n\n

Note that RBAC rules must be created for each extension for them to be able to\ncreate and manipulate NodeFeature objects in their namespace.

\n\n

The NodeFeature CRD API can be disabled with the\nNodeFeatureAPI feature gate\n(-feature-gates NodeFeatureAPI=false on command line). The -feature-gates\ncommand line flag must be specified for both nfd-master and nfd-worker as it\nwill enable the gRPC communication between them. Note that the gRPC API is\nDEPRECATED and will be removed in a future release, at which point the\nNodeFeature API cannot be disabled.

\n\n

A NodeFeature example

\n\n

Consider the following referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeature\nmetadata:\n  labels:\n    nfd.node.kubernetes.io/node-name: node-1\n  name: vendor-features-for-node-1\nspec:\n  # Features for NodeFeatureRule matching\n  features:\n    flags:\n      vendor.flags:\n        elements:\n          feature-x: {}\n          feature-y: {}\n    attributes:\n      vendor.config:\n        elements:\n          setting-a: \"auto\"\n          knob-b: \"123\"\n    instances:\n      vendor.devices:\n        elements:\n        - attributes:\n            model: \"dev-1000\"\n            vendor: \"acme\"\n        - attributes:\n            model: \"dev-2000\"\n            vendor: \"acme\"\n  # Labels to be created\n  labels:\n    vendor.io/feature.enabled: \"true\"\n
\n\n

The object targets node named node-1. It lists two “flag type” features under\nthe vendor.flags domain, two “attribute type” features and under the\nvendor.config domain and two “instance type” features under the\nvendor.devices domain. These features will not be directly affecting the node\nlabels but they will be used as input when the\nNodeFeatureRule objects are evaluated.

\n\n

In addition, the example requests directly the\nvendor.io/feature.enabled=true node label to be created.

\n\n

The nfd.node.kubernetes.io/node-name=<node-name> must be in place for each\nNodeFeature object as NFD uses it to determine the node which it is targeting.

\n\n

Feature types

\n\n

Features have three different types:

\n\n\n\n

NodeFeatureRule custom resource

\n\n

NodeFeatureRule objects provide an easy way to create vendor or application\nspecific labels and taints. It uses a flexible rule-based mechanism for creating\nlabels and optionally taints based on node features.

\n\n

A NodeFeatureRule example

\n\n

Consider the following referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-sample-rule-object\nspec:\n  rules:\n    - name: \"my sample rule\"\n      labels:\n        \"feature.node.kubernetes.io/my-sample-feature\": \"true\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            dummy: {op: Exists}\n        - feature: kernel.config\n          matchExpressions:\n            X86: {op: In, value: [\"y\"]}\n
\n\n

It specifies one rule which creates node label\nfeature.node.kubernetes.io/my-sample-feature=true if both of the following\nconditions are true (matchFeatures implements a logical AND over the\nmatchers):

\n\n\n\n

Create a NodeFeatureRule with a yaml file:

\n\n
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.4/examples/nodefeaturerule.yaml\n
\n\n

Now, on X86 platforms the feature label appears after doing modprobe dummy on\na system and correspondingly the label is removed after rmmod dummy. Note a\nre-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).

\n\n

See Feature rule format for detailed description of\navailable fields and how to write labeling rules.

\n\n

Node tainting

\n\n

This feature is experimental.

\n\n

In some circumstances, it is desirable to keep nodes with specialized hardware\naway from running general workload and instead leave them for workloads that\nneed the specialized hardware. One way to achieve it is to taint the nodes with\nthe specialized hardware and add corresponding toleration to pods that require\nthe special hardware. NFD offers node tainting functionality which is disabled\nby default. User can define one or more custom taints via the taints field of\nthe NodeFeatureRule CR. The same rule-based mechanism is applied here and the\nNFD taints only rule matching nodes.

\n\n

To enable the tainting feature, --enable-taints flag needs to be set to true.\nIf the flag --enable-taints is set to false (i.e. disabled), taints defined in\nthe NodeFeatureRule CR have no effect and will be ignored by the NFD master.

\n\n

See documentation of the taints field for detailed description how\nto specify taints in the NodeFeatureRule object.

\n\n
\n

NOTE: Before enabling any taints, make sure to edit nfd-worker daemonset\nto tolerate the taints to be created. Otherwise, already running pods that do\nnot tolerate the taint are evicted immediately from the node including the\nnfd-worker pod.

\n
\n\n

NodeFeatureGroup custom resource

\n\n

NodeFeatureGroup API is an alpha feature and disabled by default in NFD version\nv0.16. Use the\nNodeFeatureAPI feature\ngate to enable it.

\n\n

NodeFeatureGroup objects provide a way to create node groups that share the\nsame set of features. The NodeFeatureGroup object spec consists of a list of\nNodeFeatureRule that follow the same format as the NodeFeatureRule,\nbut the difference in this case is that nodes that match any of the rules in the\nNodeFeatureGroup will be listed in the NodeFeatureGroup status.

\n\n

A NodeFeatureGroup example

\n\n

Consider the following referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureGroup\nmetadata:\n  name: node-feature-group-example\nspec:\n  featureGroupRules:\n    - name: \"kernel version\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: In, value: [\"6\"]}\nstatus:\n  nodes:\n    - name: node-1\n    - name: node-2\n    - name: node-3\n
\n\n

The object specifies a group of nodes that share the same\nkernel.version.major (Linux kernel v6.x).

\n\n

Create a NodeFeatureGroup with a yaml file:

\n\n
kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.4/examples/nodefeaturegroup.yaml\n
\n\n

See Feature rule format for detailed description of\navailable fields and how to write group filtering rules.

\n\n

Local feature source

\n\n

NFD-Worker has a special feature source named local which is an integration\npoint for external feature detectors. It provides a mechanism for pluggable\nextensions, allowing the creation of new user-specific features and even\noverriding built-in labels.

\n\n

The local feature source has two methods for detecting features, feature\nfiles and hooks (hooks are deprecated and slated for removal in NFD v0.17). The\nfeatures discovered by the local source can further be used in label rules\nspecified in NodeFeatureRule objects and\nthe custom feature source.

\n\n
\n

NOTE: Be careful when creating and/or updating hook or feature files\nwhile NFD is running. To avoid race conditions you should write\ninto a temporary file, and atomically create/update the original file by\ndoing a file rename operation. NFD ignores dot files,\nso temporary file can be written to the same directory and renamed\n(.my.feature -> my.feature) once file is complete. Both file names should\n(obviously) be unique for the given application.

\n
\n\n

An example

\n\n

Consider a plaintext file\n/etc/kubernetes/node-feature-discovery/features.d/my-features\nhaving the following contents (or alternatively a shell script\n/etc/kubernetes/node-feature-discovery/source.d/my-hook.sh having the\nfollowing stdout output):

\n\n
feature.node.kubernetes.io/my-feature.1\nfeature.node.kubernetes.io/my-feature.2=myvalue\nvendor.io/my-feature.3=456\n
\n\n

This will translate into the following node labels:

\n\n
feature.node.kubernetes.io/my-feature.1: \"true\"\nfeature.node.kubernetes.io/my-feature.2: \"myvalue\"\nvendor.io/my-feature.3: \"456\"\n
\n\n

Feature files

\n\n

The local source reads files found in\n/etc/kubernetes/node-feature-discovery/features.d/. File content is parsed\nand translated into node labels, see the input format below.

\n\n

Hooks

\n\n

DEPRECATED Hooks are deprecated and will be completely removed in NFD\nv0.17.

\n\n

The local source executes hooks found in\n/etc/kubernetes/node-feature-discovery/source.d/. The hook files must be\nexecutable and they are supposed to print all discovered features in stdout.\nSince NFD v0.13 the default container image only supports statically linked ELF\nbinaries.

\n\n

stderr output of hooks is propagated to NFD log so it can be used for\ndebugging and logging.

\n\n

NFD tries to execute any regular files found from the hooks directory.\nAny additional data files the hook might need (e.g. a configuration file)\nshould be placed in a separate directory to avoid NFD unnecessarily\ntrying to execute them. A subdirectory under the hooks directory can be used,\nfor example /etc/kubernetes/node-feature-discovery/source.d/conf/.

\n\n
\n

NOTE: Starting from release v0.14 hooks are disabled by default and can\nbe enabled via sources.local.hooksEnabled field in the worker\nconfiguration.

\n
\n\n
sources:\n  local:\n    hooksEnabled: true  # true by default at this point\n
\n\n
\n

NOTE: NFD will blindly run any executables placed/mounted in the hooks\ndirectory. It is the user’s responsibility to review the hooks for e.g.\npossible security implications.

\n\n

NOTE: The full image variant\nprovides backwards-compatibility with older NFD versions by including a more\nexpanded environment, supporting bash and perl runtimes.

\n
\n\n

Input format

\n\n

The hook stdout and feature files are expected to contain features in simple\nkey-value pairs, separated by newlines:

\n\n
# This is a comment\n<key>[=<value>]\n
\n\n

The label value defaults to true, if not specified.

\n\n

Label namespace must be specified with <namespace>/<name>[=<value>].

\n\n
\n

NOTE: The feature file size limit it 64kB. The feature file will be\nignored if the size limit is exceeded.

\n
\n\n

Comment lines (starting with #) are ignored.

\n\n

Adding following line anywhere to feature file defines date when\nits content expires / is ignored:

\n\n
# +expiry-time=2023-07-29T11:22:33Z\n
\n\n

Also, the expiry-time value would stay the same during the processing of the\nfeature file until another expiry-time directive is encountered.\nConsidering the following file:

\n\n
# +expiry-time=2012-07-28T11:22:33Z\nvendor.io/feature1=featureValue\n\n# +expiry-time=2080-07-28T11:22:33Z\nvendor.io/feature2=featureValue2\n\n# +expiry-time=2070-07-28T11:22:33Z\nvendor.io/feature3=featureValue3\n\n# +expiry-time=2002-07-28T11:22:33Z\nvendor.io/feature4=featureValue4\n
\n\n

After processing the above file, only vendor.io/feature2 and\nvendor.io/feature3 would be included in the list of accepted features.

\n\n
\n

NOTE: The time format supported is RFC3339. Also, the expiry-time\ntag is only evaluated in each re-discovery period, and the expiration of\nnode labels is not tracked.

\n
\n\n

To exclude specific features from the local.feature Feature, you can use the\n# +no-feature directive. The # +no-label directive causes the feature to\nbe excluded from the local.label Feature and a node label not to be generated.

\n\n

Considering the following file:

\n\n
# +no-feature\nvendor.io/label-only=value\n\nvendor.io/my-feature=value\n\nvendor.io/foo=bar\n\n# +no-label\nfoo=baz\n
\n\n

Processing the above file would result in the following Features:

\n\n
local.features:\n  foo: baz\n  vendor.io/my-feature: value\nlocal.labels:\n  vendor.io/label-only: value\n  vendor.io/my-feature: value\n
\n\n

and the following labels added to the Node:

\n\n
vendor.io/label-only=value\nvendor.io/my-feature=value\n
\n\n
\n

NOTE: use of unprefixed label names (like foo=bar) should not be used.\nIn NFD v0.16 unprefixed names will be automatically prefixed\nwith feature.node.kubernetes.io/ but this will change in a future version\n(see\nautoDefaultNs config option.\nUnprefixed names for plain Features (tagged with # +no-label) can be used\nwithout restrictions, however.

\n
\n\n

Mounts

\n\n

The standard NFD deployments contain hostPath mounts for\n/etc/kubernetes/node-feature-discovery/source.d/ and\n/etc/kubernetes/node-feature-discovery/features.d/, making these directories\nfrom the host available inside the nfd-worker container.

\n\n

Injecting labels from other pods

\n\n

One use case for the feature files and hooks is detecting features in other\nPods outside NFD, e.g. in Kubernetes device plugins. By using the same\nhostPath mounts for /etc/kubernetes/node-feature-discovery/source.d/ and\n/etc/kubernetes/node-feature-discovery/features.d/ in the side-car (e.g.\ndevice plugin) creates a shared area for deploying feature files and hooks to\nNFD. NFD periodically scans the directories and reads any feature files and\nruns any hooks it finds.

\n\n

Custom feature source

\n\n

The custom feature source in nfd-worker provides a rule-based mechanism for\nlabel creation, similar to the\nNodeFeatureRule objects. The difference is\nthat the rules are specified in the worker configuration instead of a\nKubernetes API object.

\n\n

See worker configuration\nfor instructions how to set-up and manage the worker configuration.

\n\n

An example custom feature source configuration

\n\n

Consider the following referential configuration for nfd-worker:

\n\n
core:\n  labelSources: [\"custom\"]\nsources:\n  custom:\n    - name: \"my sample rule\"\n      labels:\n        \"feature.node.kubenernetes.io/my-sample-feature\": \"true\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            dummy: {op: Exists}\n        - feature: kernel.config\n          matchExpressions:\n            X86: {op: In, value: [\"y\"]}\n
\n\n

It specifies one rule which creates node label\nfeature.node.kubenernetes.io/my-sample-feature=true if both of the following\nconditions are true (matchFeatures implements a logical AND over the\nmatchers):

\n\n\n\n

In addition, the configuration only enables the custom source, disabling all\nbuilt-in labels.

\n\n

Now, on X86 platforms the feature label appears after doing modprobe dummy on\na system and correspondingly the label is removed after rmmod dummy. Note a\nre-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).

\n\n

Additional configuration directory

\n\n

In addition to the rules defined in the nfd-worker configuration file, the\ncustom feature source can read more configuration files located in the\n/etc/kubernetes/node-feature-discovery/custom.d/ directory. This makes more\ndynamic and flexible configuration easier.

\n\n

As an example, consider having file\n/etc/kubernetes/node-feature-discovery/custom.d/my-rule.yaml with the\nfollowing content:

\n\n
- name: \"my e1000 rule\"\n  labels:\n    \"feature.node.kubenernetes.io/e1000.present\": \"true\"\n  matchFeatures:\n    - feature: kernel.loadedmodule\n      matchExpressions:\n        e1000: {op: Exists}\n
\n\n

This simple rule will create feature.node.kubenernetes.io/e1000.present=true\nlabel if the e1000 kernel module has been loaded.

\n\n

The\nsamples/custom-rules\nkustomize overlay sample contains an example for deploying a custom rule from a\nConfigMap.

\n\n

Node labels

\n\n

Feature labels have the following format:

\n\n
<namespace>/<name> = <value>\n
\n\n

The namespace part (i.e. prefix) of the labels is controlled by nfd:

\n\n\n\n

Feature rule format

\n\n

This section describes the rule format used in\nNodeFeatureRule objects and in the\nconfiguration of the custom feature source.

\n\n

It is based on a generic feature matcher that covers all features discovered by\nnfd-worker. The rules rely on a unified data model of the available features\nand a generic expression-based format. Features that can be used in the rules\nare described in detail in available features below.

\n\n

Take this rule as a referential example:

\n\n
    - name: \"my feature rule\"\n      labels:\n        \"feature.node.kubernetes.io/my-special-feature\": \"my-value\"\n      matchFeatures:\n        - feature: cpu.cpuid\n          matchExpressions:\n            AVX512F: {op: Exists}\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: In, value: [\"5\"]}\n            minor: {op: Gt, value: [\"1\"]}\n        - feature: pci.device\n          matchExpressions:\n            vendor: {op: In, value: [\"8086\"]}\n            class: {op: In, value: [\"0200\"]}\n
\n\n

This will yield feature.node.kubernetes.io/my-special-feature=my-value node\nlabel if all of these are true (matchFeatures implements a logical AND over\nthe matchers):

\n\n\n\n

Fields

\n\n

name

\n\n

The .name field is required and used as an identifier of the rule.

\n\n

labels

\n\n

The .labels is a map of the node labels to create if the rule matches.

\n\n

Take this rule as a referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-sample-rule-object\nspec:\n  rules:\n    - name: \"my dynamic label value rule\"\n      labels:\n        feature.node.kubernetes.io/linux-lsm-enabled: \"@kernel.config.LSM\"\n        feature.node.kubernetes.io/custom-label: \"customlabel\"\n
\n\n

Label linux-lsm-enabled uses the @ notation for dynamic values.\nThe value of the label will be the value of the attribute LSM\nof the feature kernel.config.

\n\n

The @<feature-name>.<element-name> format can be used to inject values of\ndetected features to the label. See\navailable features for possible values to use.

\n\n

This will yield into the following node label:

\n\n
  labels:\n    ...\n    feature.node.kubernetes.io/linux-lsm-enabled: apparmor\n    feature.node.kubernetes.io/custom-label: \"customlabel\"\n
\n\n

labelsTemplate

\n\n

The .labelsTemplate field specifies a text template for dynamically creating\nlabels based on the matched features. See templating for\ndetails.

\n\n
\n

NOTE: The labels field has priority over labelsTemplate, i.e.\nlabels specified in the labels field will override anything\noriginating from labelsTemplate.

\n
\n\n

annotations

\n\n

The .annotations field is a list of features to be advertised as node\nannotations.

\n\n

Take this rule as a referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: feature-annotations-example\nspec:\n  rules:\n    - name: \"annotation-example\"\n      annotations:\n        feature.node.kubernetes.io/defaul-ns-annotation: \"foo\"\n        custom.vendor.io/feature: \"baz\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: Exists}\n
\n\n

This will yield into the following node annotations:

\n\n
  annotations:\n    ...\n    feature.node.kubernetes.io/defaul-ns-annotation: \"foo\"\n    custom.vendor.io/feature: \"baz\"\n    ...\n
\n\n

NFD enforces some limitations to the namespace (or prefix)/ of the annotations:

\n\n\n\n
\n

NOTE: The annotations field has will only advertise features via node\nannotations the features won’t be advertised as node labels unless they are\nspecified in the labels field.

\n
\n\n

taints

\n\n

taints is a list of taint entries and each entry can have key, value and effect,\nwhere the value is optional. Effect could be NoSchedule, PreferNoSchedule\nor NoExecute. To learn more about the meaning of these effects, check out k8s documentation.

\n\n

Example NodeFeatureRule with taints:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-sample-rule-object\nspec:\n  rules:\n    - name: \"my sample taint rule\"\n      taints:\n        - effect: PreferNoSchedule\n          key: \"feature.node.kubernetes.io/special-node\"\n          value: \"true\"\n        - effect: NoExecute\n          key: \"feature.node.kubernetes.io/dedicated-node\"\n      matchFeatures:\n        - feature: kernel.loadedmodule\n          matchExpressions:\n            dummy: {op: Exists}\n        - feature: kernel.config\n          matchExpressions:\n            X86: {op: In, value: [\"y\"]}\n
\n\n

In this example, if the my sample taint rule rule is matched,\nfeature.node.kubernetes.io/pci-0300_1d0f.present=true:NoExecute\nand feature.node.kubernetes.io/cpu-cpuid.ADX:NoExecute taints are set on the node.

\n\n

There are some limitations to the namespace part (i.e. prefix/) of the taint\nkey:

\n\n\n\n
\n

NOTE: taints field is not available for the custom rules of nfd-worker\nand only for NodeFeatureRule objects.

\n
\n\n

vars

\n\n

The .vars field is a map of values (key-value pairs) to store for subsequent\nrules to use. In other words, these are variables that are not advertised as\nnode labels. See backreferences for more details on the\nusage of vars.

\n\n

extendedResources

\n\n

The .extendedResources field is a list of extended resources to advertise.\nSee extended resources for more details.

\n\n

Take this rule as a referential example:

\n\n
apiVersion: nfd.k8s-sigs.io/v1alpha1\nkind: NodeFeatureRule\nmetadata:\n  name: my-extended-resource-rule\nspec:\n  rules:\n    - name: \"my extended resource rule\"\n      extendedResources:\n        vendor.io/dynamic: \"@kernel.version.major\"\n        vendor.io/static: \"123\"\n      matchFeatures:\n        - feature: kernel.version\n          matchExpressions:\n            major: {op: Exists}\n
\n\n

The extended resource vendor.io/dynamic is defined in the form @feature.attribute.\nThe value of the extended resource will be the value of the attribute major\nof the feature kernel.version.

\n\n

The @<feature-name>.<element-name> format can be used to inject values of\ndetected features to the extended resource. See\navailable features for possible values to use. Note that\nthe value must be eligible as a\nKubernetes resource quantity.

\n\n

This will yield into the following node status:

\n\n
  allocatable:\n    ...\n    vendor.io/dynamic: \"5\"\n    vendor.io/static: \"123\"\n    ...\n  capacity:\n    ...\n    vendor.io/dynamic: \"5\"\n    vendor.io/static: \"123\"\n    ...\n
\n\n

There are some limitations to the namespace part (i.e. prefix)/ of the Extended\nResources names:

\n\n\n\n
\n

NOTE: .extendedResources is not supported by the\ncustom feature source – it can only be used in\nNodeFeatureRule objects.

\n
\n\n

varsTemplate

\n\n

The .varsTemplate field specifies a text template for dynamically creating\nvars based on the matched features. See templating for details\non using templates and backreferences for more details on\nthe usage of vars.

\n\n
\n

NOTE: The vars field has priority over varsTemplate, i.e.\nvars specified in the vars field will override anything originating from\nvarsTemplate.

\n
\n\n

matchFeatures

\n\n

The .matchFeatures field specifies a feature matcher, consisting of a list of\nfeature matcher terms. It implements a logical AND over the terms i.e. all\nof them must match for the rule to trigger.

\n\n
      matchFeatures:\n        - feature: <feature-name>\n          matchExpressions:\n            <key>:\n              op: <op>\n              value:\n                - <value-1>\n                - ...\n          matchName:\n            op: <op>\n            value:\n                - <value-1>\n                - ...\n
\n\n

The .matchFeatures[].feature field specifies the feature which to evaluate.

\n\n
\n

NOTE:If both matchExpressions and\nmatchName are specified, they both must match.

\n
\n\n
matchExpressions
\n\n

The .matchFeatures[].matchExpressions field is used to match against the\nvalue(s) of a feature. The matchExpressions field consists of a set of\nexpressions, each of which is evaluated against all elements of the specified\nfeature.

\n\n
      matchExpressions:\n        <key>:\n          op: <op>\n          value:\n            - <value-1>\n            - ...\n
\n\n

In each MatchExpression the key specifies the name of of the feature element\n(flag and attribute features) or name of the attribute (instance\nfeatures) which to look for. The behavior of MatchExpression depends on the\nfeature type:

\n\n\n\n

The op field specifies the operator to apply. Valid values are described\nbelow.

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OperatorNumber of valuesMatches when
In1 or greaterInput is equal to one of the values
NotIn1 or greaterInput is not equal to any of the values
InRegexp1 or greaterValues of the MatchExpression are treated as regexps and input matches one or more of them
Exists0The key exists
DoesNotExist0The key does not exists
Gt1Input is greater than the value. Both the input and value must be integer numbers.
Lt1Input is less than the value. Both the input and value must be integer numbers.
GtLt2Input is between two values. Both the input and value must be integer numbers.
IsTrue0Input is equal to “true”
IsFalse0Input is equal “false”
\n\n

The value field of MatchExpression is a list of string arguments to the\noperator.

\n\n
matchName
\n\n

The .matchFeatures[].matchName field is used to match against the\nname(s) of a feature (whereas the matchExpressions field\nmatches against the value(s). The matchName field consists of a single\nexpression which is evaulated against the name of each element of the specified\nfeature.

\n\n
      matchName:\n        op: <op>\n        value:\n          - <value-1>\n          - ...\n
\n\n

The behavior of matchName depends on the feature type:

\n\n\n\n

The op field specifies the operator to apply. Same operators as for\nmatchExpressions above are available.

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
OperatorNumber of valuesMatches
In1 or greaterAll name is equal to one of the values
NotIn1 or greaterAll name that is not equal to any of the values
InRegexp1 or greaterAll name that matches any of the values (treated as regexps)
Exists0All elements
\n\n

Other operators are not practical with matchName (DoesNotExist never\nmatches; Gt,Lt and GtLt are only usable if feature names are integers;\nIsTrue and IsFalse are only usable if the feature name is true or\nfalse).

\n\n

The value field is a list of string arguments to the operator.

\n\n

An example:

\n\n
      matchFeatures:\n        - feature: cpu.cpuid\n          matchName: {op: InRegexp, value: [\"^AVX\"]}\n
\n\n

The snippet above would match if any CPUID feature starting with AVX is present\n(e.g. AVX1 or AVX2 or AVX512F etc).

\n\n

matchAny

\n\n

The .matchAny field is a list of of matchFeatures\nmatchers. A logical OR is applied over the matchers, i.e. at least one of them\nmust match for the rule to trigger.

\n\n

Consider the following example:

\n\n
      matchAny:\n        - matchFeatures:\n            - feature: kernel.loadedmodule\n              matchExpressions:\n                kmod-1: {op: Exists}\n            - feature: pci.device\n              matchExpressions:\n                vendor: {op: In, value: [\"0eee\"]}\n                class: {op: In, value: [\"0200\"]}\n        - matchFeatures:\n            - feature: kernel.loadedmodule\n              matchExpressions:\n                kmod-2: {op: Exists}\n            - feature: pci.device\n              matchExpressions:\n                vendor: {op: In, value: [\"0fff\"]}\n                class: {op: In, value: [\"0200\"]}\n
\n\n

This matches if kernel module kmod-1 is loaded and a network controller from\nvendor 0eee is present, OR, if kernel module kmod-2 has been loaded and a\nnetwork controller from vendor 0fff is present (OR both of these conditions are\ntrue).

\n\n

Available features

\n\n

The following features are available for matching:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FeatureFeature typesElementsValue typeDescription
cpu.cpuidflag  Supported CPU capabilities
  <cpuid-flag> CPUID flag is present
 attribute  CPU capability attributes
  AVX10_VERSIONintAVX10 vector ISA version (if supported)
cpu.cstateattribute  Status of cstates in the intel_idle cpuidle driver
  enabledbool‘true’ if cstates are set, otherwise ‘false’. Does not exist of intel_idle driver is not active.
cpu.modelattribute  CPU model related attributes
  familyintCPU family
  vendor_idstringCPU vendor ID
  idintCPU model ID
cpu.pstateattribute  State of the Intel pstate driver. Does not exist if the driver is not enabled.
  statusstringStatus of the driver, possible values are ‘active’ and ‘passive’
  turbobool‘true’ if turbo frequencies are enabled, otherwise ‘false’
  scalingstringActive scaling_governor, possible values are ‘powersave’ or ‘performance’.
cpu.rdtattribute  Intel RDT capabilities supported by the system
  <rdt-flag> RDT capability is supported, see RDT flags for details
  RDTL3CA_NUM_CLOSIDintThe number or available CLOSID (Class of service ID) for Intel L3 Cache Allocation Technology
cpu.securityattribute  Features related to security and trusted execution environments
  sgx.enabledbooltrue if Intel SGX (Software Guard Extensions) has been enabled, otherwise does not exist
  sgx.epcintThe total amount Intel SGX Encrypted Page Cache memory in bytes. It’s only present if sgx.enabled is true.
  se.enabledbooltrue if IBM Secure Execution for Linux is available and has been enabled, otherwise does not exist
  tdx.enabledbooltrue if Intel TDX (Trusted Domain Extensions) is available on the host and has been enabled, otherwise does not exist
  tdx.total_keysintThe total amount of keys an Intel TDX (Trusted Domain Extensions) host can provide. It’s only present if tdx.enabled is true.
  tdx.protectedbooltrue if a guest VM was started using Intel TDX (Trusted Domain Extensions), otherwise does not exist.
  sev.enabledbooltrue if AMD SEV (Secure Encrypted Virtualization) is available on the host and has been enabled, otherwise does not exist
  sev.es.enabledbooltrue if AMD SEV-ES (Encrypted State supported) is available on the host and has been enabled, otherwise does not exist
  sev.snp.enabledbooltrue if AMD SEV-SNP (Secure Nested Paging supported) is available on the host and has been enabled, otherwise does not exist
  sev.asidsintThe total amount of AMD SEV address-space identifiers (ASIDs), based on the /sys/fs/cgroup/misc.capacity information.
  sev.encrypted_state_idsintThe total amount of AMD SEV-ES and SEV-SNP supported, based on the /sys/fs/cgroup/misc.capacity information.
cpu.sstattribute  Intel SST (Speed Select Technology) capabilities
  bf.enabledbooltrue if Intel SST-BF (Intel Speed Select Technology - Base frequency) has been enabled, otherwise does not exist
cpu.topologyattribute  CPU topology related features
  hardware_multithreadingboolHardware multithreading, such as Intel HTT, is enabled
  socket_countintNumber of CPU Sockets
cpu.coprocessorattribute  CPU Coprocessor related features
  nx_gzipboolNest Accelerator GZIP support is enabled
kernel.configattribute  Kernel configuration options
  <config-flag>stringValue of the kconfig option
kernel.loadedmoduleflag  Kernel modules loaded on the node as reported by /proc/modules
kernel.enabledmoduleflag  Kernel modules loaded on the node and available as built-ins as reported by modules.builtin
  mod-name Kernel module <mod-name> is loaded
kernel.selinuxattribute  Kernel SELinux related features
  enabledbooltrue if SELinux has been enabled and is in enforcing mode, otherwise false
kernel.versionattribute  Kernel version information
  fullstringFull kernel version (e.g. ‘4.5.6-7-g123abcde’)
  majorintFirst component of the kernel version (e.g. ‘4’)
  minorintSecond component of the kernel version (e.g. ‘5’)
  revisionintThird component of the kernel version (e.g. ‘6’)
local.labelattribute  Labels from feature files and hooks, i.e. labels from the local feature source
local.featureattribute  Features from feature files and hooks, i.e. features from the local feature source
  <label-name>stringLabel <label-name> created by the local feature source, value equals the value of the label
memory.nvinstance  NVDIMM devices present in the system
  <sysfs-attribute>stringValue of the sysfs device attribute, available attributes: devtype, mode
memory.numaattribute  NUMA nodes
  is_numabooltrue if NUMA architecture, false otherwise
  node_countintNumber of NUMA nodes
memory.swapattribute  Swap enabled on node
  enabledbooltrue if swap partition detected, false otherwise
network.deviceinstance  Physical (non-virtual) network interfaces present in the system
  namestringName of the network interface
  <sysfs-attribute>stringSysfs network interface attribute, available attributes: operstate, speed, sriov_numvfs, sriov_totalvfs
network.virtualinstance  Virtual network interfaces present in the system
  namestringName of the network interface
  <sysfs-attribute>stringSysfs network interface attribute, available attributes: operstate, speed
pci.deviceinstance  PCI devices present in the system
  <sysfs-attribute>stringValue of the sysfs device attribute, available attributes: class, vendor, device, subsystem_vendor, subsystem_device, sriov_totalvfs, iommu_group/type, iommu/intel-iommu/version
storage.blockinstance  Block storage devices present in the system
  namestringName of the block device
  <sysfs-attribute>stringSysfs network interface attribute, available attributes: dax, rotational, nr_zones, zoned
system.osreleaseattribute  System identification data from /etc/os-release
  <parameter>stringOne parameter from /etc/os-release
system.dmiidattribute  DMI identification data from /sys/devices/virtual/dmi/id/
  sys_vendorstringVendor name from /sys/devices/virtual/dmi/id/sys_vendor
system.nameattribute  System name information
  nodenamestringName of the kubernetes node object
usb.deviceinstance  USB devices present in the system
  <sysfs-attribute>stringValue of the sysfs device attribute, available attributes: class, vendor, device, serial
rule.matchedattribute  Previously matched rules
  <label-or-var>stringLabel or var from a preceding rule that matched
\n\n

Intel RDT flags

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
FlagDescription
RDTMONIntel RDT Monitoring Technology
RDTCMTIntel Cache Monitoring (CMT)
RDTMBMIntel Memory Bandwidth Monitoring (MBM)
RDTL3CAIntel L3 Cache Allocation Technology
RDTl2CAIntel L2 Cache Allocation Technology
RDTMBAIntel Memory Bandwidth Allocation (MBA) Technology
\n\n

Templating

\n\n

Rules support template-based creation of labels and vars with the\n.labelsTemplate and .varsTemplate fields. These makes it possible to\ndynamically generate labels and vars based on the features that matched.

\n\n

The template must expand into a simple format with <key>=<value> pairs\nseparated by newline.

\n\n

Consider the following example:\n

\n\n
    labelsTemplate: |\n      {{ range .pci.device }}vendor-{{ .class }}-{{ .device }}.present=true\n      {{ end }}\n    matchFeatures:\n      - feature: pci.device\n        matchExpressions:\n          class: {op: InRegexp, value: [\"^02\"]}\n          vendor: [\"0fff\"]\n
\n\n\n

The rule above will create individual labels\nfeature.node.kubernetes.io/vendor-<class-id>-<device-id>.present=true for\neach network controller device (device class starting with 02) from vendor\n0fff.

\n\n

All the matched features of each feature matcher term under matchFeatures\nfields are available for the template engine. Matched features can be\nreferenced with {{ .<feature-name> }} in the template, and\nthe available data could be described in yaml as follows:

\n\n
.\n  <key-feature>:\n    - Name: <matched-key>\n    - ...\n\n  <value-feature>:\n    - Name: <matched-key>\n      Value: <matched-value>\n    - ...\n\n  <instance-feature>:\n    - <attribute-1-name>: <attribute-1-value>\n      <attribute-2-name>: <attribute-2-value>\n      ...\n    - ...\n
\n\n

That is, the per-feature data is a list of objects whose data fields depend on\nthe type of the feature:

\n\n\n\n

A simple example of a template utilizing name and value from an attribute\nfeature:\n

\n\n
    labelsTemplate: |\n      {{ range .system.osrelease }}system-{{ .Name }}={{ .Value }}\n      {{ end }}\n    matchFeatures:\n      - feature: system.osRelease\n        matchExpressions:\n          ID: {op: Exists}\n          VERSION_ID.major: {op: Exists}\n
\n\n\n
\n

NOTE:If both matchExpressions and matchName for a feature matcher\nterm (see matchFeatures) is specified, the list of\nmatched features (for the template engine) is the union from both of these.\n\nNOTE: In case of matchAny is specified, the template is executed\nseparately against each individual matchFeatures field and the final set of\nlabels will be superset of all these separate template expansions. E.g.\nconsider the following:

\n
\n\n
  - name: <name>\n    labelsTemplate: <template>\n    matchFeatures: <matcher#1>\n    matchAny:\n      - matchFeatures: <matcher#2>\n      - matchFeatures: <matcher#3>\n
\n\n

In the example above (assuming the overall result is a match) the template\nwould be executed on matcher#1 as well as on matcher#2 and/or matcher#3\n(depending on whether both or only one of them match). All the labels from\nthese separate expansions would be created, i.e. the end result would be a\nunion of all the individual expansions.

\n\n

Rule templates use the Golang text/template\npackage and all its built-in functionality (e.g. pipelines and functions) can\nbe used. An example template taking use of the built-in len function,\nadvertising the number of PCI network controllers from a specific vendor:\n

\n\n
    labelsTemplate: |\n      num-intel-network-controllers={{ .pci.device | len }}\n    matchFeatures:\n      - feature: pci.device\n        matchExpressions:\n          vendor: {op: In, value: [\"8086\"]}\n          class: {op: In, value: [\"0200\"]}\n\n
\n\n\n

Imaginative template pipelines are possible, but care must be taken to\nproduce understandable and maintainable rule sets.

\n\n

Backreferences

\n\n

Rules support referencing the output of preceding rules. This enables\nsophisticated scenarios where multiple rules are combined together\nto for more complex heuristics than a single rule can provide. The labels and\nvars created by the execution of preceding rules are available as a special\nrule.matched feature.

\n\n

Consider the following configuration:

\n\n
  - name: \"my kernel label rule\"\n    labels:\n      kernel-feature: \"true\"\n    matchFeatures:\n      - feature: kernel.version\n        matchExpressions:\n          major: {op: Gt, value: [\"4\"]}\n\n  - name: \"my var rule\"\n    vars:\n      nolabel-feature: \"true\"\n    matchFeatures:\n      - feature: cpu.cpuid\n        matchExpressions:\n          AVX512F: {op: Exists}\n      - feature: pci.device\n        matchExpressions:\n          vendor: {op: In, value: [\"0fff\"]}\n          device: {op: In, value: [\"1234\", \"1235\"]}\n\n  - name: \"my high level feature rule\"\n    labels:\n      high-level-feature: \"true\"\n    matchFeatures:\n      - feature: rule.matched\n        matchExpressions:\n          kernel-feature: {op: IsTrue}\n          nolabel-feature: {op: IsTrue}\n
\n\n

The feature.node.kubernetes.io/high-level-feature = true label depends on the\ntwo previous rules.

\n\n

Note that when referencing rules across multiple\nNodeFeatureRule objects attention must be\npaid to the ordering. NodeFeatureRule objects are processed in alphabetical\norder (based on their .metadata.name).

\n\n

Examples

\n\n

Some more configuration examples below.

\n\n

Match certain CPUID features:

\n\n
  - name: \"example cpuid rule\"\n    labels:\n      my-special-cpu-feature: \"true\"\n    matchFeatures:\n      - feature: cpu.cpuid\n        matchExpressions:\n          AESNI: {op: Exists}\n          AVX: {op: Exists}\n
\n\n

Require a certain loaded kernel module and OS version:

\n\n
  - name: \"my multi-feature rule\"\n    labels:\n      my-special-multi-feature: \"true\"\n    matchFeatures:\n      - feature: kernel.loadedmodule\n        matchExpressions:\n          e1000: {op: Exists}\n      - feature: system.osrelease\n        matchExpressions:\n          NAME: {op: InRegexp, values: [\"^openSUSE\"]}\n          VERSION_ID.major: {op: Gt, values: [\"14\"]}\n
\n\n

Require a loaded kernel module and two specific PCI devices (both of which\nmust be present):

\n\n
  - name: \"my multi-device rule\"\n    labels:\n      my-multi-device-feature: \"true\"\n    matchFeatures:\n      - feature: kernel.loadedmodule\n        matchExpressions:\n          my-driver-module: {op: Exists}\n      - pci.device:\n          vendor: \"0fff\"\n          device: \"1234\"\n      - pci.device:\n          vendor: \"0fff\"\n          device: \"abcd\"\n
\n","dir":"/usage/","name":"customization-guide.md","path":"usage/customization-guide.md","url":"/usage/customization-guide.html"},{"title":"Versions","layout":"default","sort":9,"content":"

Versions and deprecation

\n\n
\n\n

Supported versions

\n\n

Node Feature Discovery follows semantic versioning where\nthe version number consists of three components, i.e. MAJOR.MINOR.PATCH.

\n\n

The most recent two minor releases (or release branches) of Node Feature\nDiscovery are supported. That is, with X being the latest release, X and X-1\nare supported and X-1 reaches end-of-life when X+1 is released.

\n\n

Deprecation policy

\n\n

Feature labels

\n\n

Built-in feature labels and\nfeatures are supported\nfor 2 releases after being deprecated, at minimum. That is, if a feature label\nis deprecated in version X, it will be supported in X+1 and X+2 and\nmay be dropped in X+3.

\n\n

Configuration options

\n\n

Command-line flags and configuration file options are supported for 1 more\nrelease after being deprecated, at minimum. That is, if option/flag is\ndeprecated in version X, it will be supported in X+1 and may be removed\nin X+2.

\n\n

The same policy (support for 1 release after deprecation) also applies to Helm\nchart parameters.

\n\n

Kubernetes compatibility

\n\n

Node Feature Discovery is compatible with Kubernetes v1.24 and later.

\n","dir":"/reference/","name":"versions.md","path":"reference/versions.md","url":"/reference/versions.html"},{"title":"Examples and demos","layout":"default","sort":9,"content":"

Examples and demos

\n\n

Table of contents

\n\n
    \n
  1. Demos
      \n
    1. Usage demo
    2. \n
    3. Demo use case
    4. \n
    \n
  2. \n
\n\n
\n\n

This page contains usage examples and demos.

\n\n

Demos

\n\n

Usage demo

\n\n

\"asciicast\"

\n\n

Demo use case

\n\n

A demo on the benefits of using node feature discovery can be found in the\nsource code repository under\ndemo/.

\n","dir":"/usage/","name":"examples-and-demos.md","path":"usage/examples-and-demos.md","url":"/usage/examples-and-demos.html"},{"title":"Feature Gates","layout":"default","sort":10,"content":"

Feature Gates

\n\n
\n\n

Feature gates are a set of key-value pairs that control the behavior of NFD.\nThey are used to enable or disable certain features of NFD.\nThe feature gates are set using the -feature-gates command line flag or\nfeatureGates value in the Helm chart. The following feature gates are available:

\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
NameDefaultStageSinceUntil
NodeFeatureAPItrueBetaV0.14 
DisableAutoPrefixfalseAlphaV0.16 
NodeFeatureGroupAPIfalseAlphaV0.16 
\n\n

NodeFeatureAPI

\n\n

The NodeFeatureAPI feature gate enables the Node Feature API.\nWhen enabled, NFD will register the Node Feature API with the Kubernetes API\nserver. The Node Feature API is used to expose node-specific hardware and\nsoftware features to the Kubernetes scheduler. The Node Feature API is a beta\nfeature and is enabled by default.

\n\n

NodeFeatureGroupAPI

\n\n

The NodeFeatureGroupAPI feature gate enables the Node Feature Group API.\nWhen enabled, NFD will register the Node Feature Group API with the Kubernetes API\nserver. The Node Feature Group API is used to create node groups based on\nhardware and software features. The Node Feature Group API is an alpha feature\nand is disabled by default.

\n\n

DisableAutoPrefix

\n\n

The DisableAutoPrefix feature gate controls the automatic prefixing of names.\nWhen enabled nfd-master does not automatically add the default\nfeature.node.kubernetes.io/ prefix to unprefixed labels, annotations and\nextended resources. Automatic prefixing is the default behavior in NFD v0.16\nand earlier.

\n\n

Note that enabling the feature gate effectively causes unprefixed names to be\nfiltered out as NFD does not allow unprefixed names of labels, annotations or\nextended resources. For example, with the DisableAutoPrefix feature gate set\nto false, a NodeFeatureRule with

\n\n
  labels:\n    foo: bar\n
\n\n

will turn into feature.node.kubernetes.io/foo=bar node label. With\nDisableAutoPrefix set to true, no prefix is added and the label will be\nfiltered out.

\n\n

Note that taint keys are not affected by this feature gate.

\n","dir":"/reference/","name":"feature-gates.md","path":"reference/feature-gates.md","url":"/reference/feature-gates.html"},{"title":"Kubectl plugin","layout":"default","sort":10,"content":"

Kubectl plugin

\n\n

Table of contents

\n\n
    \n
  1. Overview
      \n
    1. Validate
    2. \n
    3. Test
    4. \n
    5. DryRun
    6. \n
    \n
  2. \n
\n\n
\n\n
\n

Developer Preview This feature is currently in developer preview and\nsubject to change. It is not recommended to use it in production\nenvironments.

\n
\n\n

Overview

\n\n

The kubectl plugin kubectl nfd can be used to validate/dryrun and test\nNodeFeatureRule objects. It can be installed with the following command:

\n\n
git clone https://github.com/kubernetes-sigs/node-feature-discovery\ncd node-feature-discovery\nmake build-kubectl-nfd\nKUBECTL_PATH=/usr/local/bin/\nmv ./bin/kubectl-nfd ${KUBECTL_PATH}\n
\n\n

Validate

\n\n

The plugin can be used to validate a NodeFeatureRule object:

\n\n
kubectl nfd validate -f <nodefeaturerule.yaml>\n
\n\n

Test

\n\n

The plugin can be used to test a NodeFeatureRule object against a node:

\n\n
kubectl nfd test -f <nodefeaturerule.yaml> -n <node-name>\n
\n\n

DryRun

\n\n

The plugin can be used to DryRun a NodeFeatureRule object against a NodeFeature\nfile:

\n\n
kubectl get -n node-feature-discovery nodefeature <nodename> -o yaml > <nodefeature.yaml>\nkubectl nfd dryrun -f <nodefeaturerule.yaml> -n <nodefeature.yaml>\n
\n\n

Or you can use the example NodeFeature file(it is a minimal NodeFeature file):

\n\n
$ kubectl nfd dryrun -f examples/nodefeaturerule.yaml -n examples/nodefeature.yaml\nEvaluating NodeFeatureRule \"examples/nodefeaturerule.yaml\" against NodeFeature \"examples/nodefeature.yaml\"\nProcessing rule:  my sample rule\n*** Labels ***\nvendor.io/my-sample-feature=true\nNodeFeatureRule \"examples/nodefeaturerule.yaml\" is valid for NodeFeature \"examples/nodefeature.yaml\"\n
\n","dir":"/usage/","name":"kubectl-plugin.md","path":"usage/kubectl-plugin.md","url":"/usage/kubectl-plugin.html"}] \ No newline at end of file diff --git a/v0.16/deployment/helm.html b/v0.16/deployment/helm.html index 611e4434f0..2fa9c002ee 100644 --- a/v0.16/deployment/helm.html +++ b/v0.16/deployment/helm.html @@ -1,4 +1,4 @@ - Helm · Node Feature Discovery

Deployment with Helm

Table of contents

  1. Prerequisites
  2. Deployment
  3. Configuration
  4. Upgrading the chart
    1. From v0.7 and older
    2. From v0.8 - v0.11
    3. From v0.12 - v0.13
    4. From v0.14+
  5. Uninstalling the chart
  6. Chart parameters
    1. General parameters
    2. Master pod parameters
    3. Worker pod parameters
    4. Topology updater parameters
    5. Garbage collector parameters

Node Feature Discovery provides a Helm chart to manage its deployment.

NOTE: NFD is not ideal for other Helm charts to depend on as that may result in multiple parallel NFD deployments in the same cluster which is not fully supported by the NFD Helm chart.

Prerequisites

Helm package manager should be installed.

Deployment

To install the latest stable version:

export NFD_NS=node-feature-discovery
+        Helm · Node Feature Discovery                      

Deployment with Helm

Table of contents

  1. Prerequisites
  2. Deployment
  3. Configuration
  4. Upgrading the chart
    1. From v0.7 and older
    2. From v0.8 - v0.11
    3. From v0.12 - v0.13
    4. From v0.14+
  5. Uninstalling the chart
  6. Chart parameters
    1. General parameters
    2. Master pod parameters
    3. Worker pod parameters
    4. Topology updater parameters
    5. Garbage collector parameters

Node Feature Discovery provides a Helm chart to manage its deployment.

NOTE: NFD is not ideal for other Helm charts to depend on as that may result in multiple parallel NFD deployments in the same cluster which is not fully supported by the NFD Helm chart.

Prerequisites

Helm package manager should be installed.

Deployment

To install the latest stable version:

export NFD_NS=node-feature-discovery
 helm repo add nfd https://kubernetes-sigs.github.io/node-feature-discovery/charts
 helm repo update
 helm install nfd/node-feature-discovery --namespace $NFD_NS --create-namespace --generate-name
@@ -10,7 +10,7 @@
 helm install nfd/node-feature-discovery -f <path/to/custom/values.yaml> --namespace $NFD_NS --create-namespace
 

To specify each parameter separately you can provide them to helm install command:

export NFD_NS=node-feature-discovery
 helm install nfd/node-feature-discovery --set nameOverride=NFDinstance --set master.replicaCount=2 --namespace $NFD_NS --create-namespace
-

Upgrading the chart

To upgrade the node-feature-discovery deployment to v0.16.3 via Helm.

From v0.7 and older

Please see the uninstallation guide. And then follow the standard deployment instructions.

From v0.8 - v0.11

Helm deployment of NFD was introduced in v0.8.0.

export NFD_NS=node-feature-discovery
+

Upgrading the chart

To upgrade the node-feature-discovery deployment to v0.16.4 via Helm.

From v0.7 and older

Please see the uninstallation guide. And then follow the standard deployment instructions.

From v0.8 - v0.11

Helm deployment of NFD was introduced in v0.8.0.

export NFD_NS=node-feature-discovery
 # Uninstall the old NFD deployment
 helm uninstall node-feature-discovery --namespace $NFD_NS
 # Update Helm repository
@@ -36,9 +36,9 @@
 # Update Helm repository
 helm repo update
 # Install and upgrade CRD's
-kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.3/deployment/base/nfd-crds/nfd-api-crds.yaml
+kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.4/deployment/base/nfd-crds/nfd-api-crds.yaml
 # Install the new NFD deployment
 helm upgrade node-feature-discovery nfd/node-feature-discovery --namespace $NFD_NS
 

Uninstalling the chart

To uninstall the node-feature-discovery deployment:

export NFD_NS=node-feature-discovery
 helm uninstall node-feature-discovery --namespace $NFD_NS
-

The command removes all the Kubernetes components associated with the chart and deletes the release. It also runs a post-delete hook that cleans up the nodes of all labels, annotations, taints and extended resources that were created by NFD.

Chart parameters

To tailor the deployment of the Node Feature Discovery to your needs following Chart parameters are available.

General parameters

Name Type Default Description
image.repository string registry.k8s.io/nfd/node-feature-discovery NFD image repository
image.tag string v0.16.3 NFD image tag
image.pullPolicy string Always Image pull policy
imagePullSecrets list [] ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info
nameOverride string   Override the name of the chart
fullnameOverride string   Override a default fully qualified app name
tls.enable bool false Specifies whether to use TLS for communications between components. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager bool false If enabled, requires cert-manager to be installed and will automatically create the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerName string   If specified, it will use a pre-existing issuer instead for the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerKind string   Specifies on what kind of issuer is used, can be either ClusterIssuer or Issuer (default). Requires tls.certManager.certManagerCertificate.issuerName to be set. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
featureGates.NodeFeatureAPI bool true Enable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication.
featureGates.NodeFeatureGroupAPI bool false Enable the NodeFeatureGroup CRD API.
featureGates.DisableAutoPrefix bool false Enable DisableAutoPrefix feature gate. Disables automatic prefixing of unprefixed labels, annotations and extended resources.
enableNodeFeatureApi bool true Enable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication. DEPRECATED: will be removed in NFD v0.17, use featureGates.NodeFeatureAPI instead.
prometheus.enable bool false Specifies whether to expose metrics using prometheus operator
prometheus.labels dict {} Specifies labels for use with the prometheus operator to control how it is selected
prometheus.scrapeInterval string 10s Specifies the interval by which metrics are scraped
priorityClassName string   The name of the PriorityClass to be used for the NFD pods.

Metrics are configured to be exposed using prometheus operator API's by default. If you want to expose metrics using the prometheus operator API's you need to install the prometheus operator in your cluster.

Master pod parameters

Name Type Default description
master.* dict   NFD master deployment configuration
master.enable bool true Specifies whether nfd-master should be deployed
master.port integer   Specifies the TCP port that nfd-master listens for incoming requests. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.metricsPort integer 8081 Port on which to expose metrics from components to prometheus operator
master.instance string   Instance name. Used to separate annotation namespaces for multiple parallel deployments
master.resyncPeriod string   NFD API controller resync period.
master.extraLabelNs array [] List of allowed extra label namespaces
master.resourceLabels array [] List of labels to be registered as extended resources
master.enableTaints bool false Specifies whether to enable or disable node tainting
master.crdController bool null Specifies whether the NFD CRD API controller is enabled. If not set, controller will be enabled if master.instance is empty.
master.featureRulesController bool null DEPRECATED: use master.crdController instead
master.replicaCount integer 1 Number of desired pods. This is a pointer to distinguish between explicit zero and not specified
master.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
master.securityContext dict {} Container security settings
master.serviceAccount.create bool true Specifies whether a service account should be created
master.serviceAccount.annotations dict {} Annotations to add to the service account
master.serviceAccount.name string   The name of the service account to use. If not set and create is true, a name is generated using the fullname template
master.rbac.create bool true Specifies whether to create RBAC configuration for nfd-master
master.service.type string ClusterIP NFD master service type. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.service.port integer 8080 NFD master service port. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.resources.limits dict {memory: 4Gi} NFD master pod resources limits
master.resources.requests dict {cpu: 100m, memory: 128Mi} NFD master pod resources requests. You may want to use the same value for requests.memory and limits.memory. The "requests" value affects scheduling to accommodate pods on nodes. If there is a large difference between "requests" and "limits" and nodes experience memory pressure, the kernel may invoke the OOM Killer, even if the memory does not exceed the "limits" threshold. This can cause unexpected pod evictions. Memory cannot be compressed and once allocated to a pod, it can only be reclaimed by killing the pod. Natan Yellin 22/09/2022 that discusses this issue.
master.tolerations dict Scheduling to master node is disabled NFD master pod tolerations
master.annotations dict {} NFD master pod annotations
master.affinity dict   NFD master pod required node affinity
master.deploymentAnnotations dict {} NFD master deployment annotations
master.nfdApiParallelism integer 10 Specifies the maximum number of concurrent node updates.
master.config dict   NFD master configuration
master.revisionHistoryLimit integer   Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit
master.livenessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":10} NFD master pod liveness probe
master.readinessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":5,"failureThreshold": 10} NFD master pod readiness probe

Worker pod parameters

Name Type Default description
worker.* dict   NFD worker daemonset configuration
worker.enable bool true Specifies whether nfd-worker should be deployed
worker.metricsPort* int 8081 Port on which to expose metrics from components to prometheus operator
worker.config dict   NFD worker configuration
worker.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
worker.securityContext dict {} Container security settings
worker.serviceAccount.create bool true Specifies whether a service account for nfd-worker should be created
worker.serviceAccount.annotations dict {} Annotations to add to the service account for nfd-worker
worker.serviceAccount.name string   The name of the service account to use for nfd-worker. If not set and create is true, a name is generated using the fullname template (suffixed with -worker)
worker.rbac.create bool true Specifies whether to create RBAC configuration for nfd-worker
worker.mountUsrSrc bool false Specifies whether to allow users to mount the hostpath /user/src. Does not work on systems without /usr/src AND a read-only /usr
worker.resources.limits dict {memory: 512Mi} NFD worker pod resources limits
worker.resources.requests dict {cpu: 5m, memory: 64Mi} NFD worker pod resources requests
worker.nodeSelector dict {} NFD worker pod node selector
worker.tolerations dict {} NFD worker pod node tolerations
worker.priorityClassName string   NFD worker pod priority class
worker.annotations dict {} NFD worker pod annotations
worker.daemonsetAnnotations dict {} NFD worker daemonset annotations
worker.revisionHistoryLimit integer   Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
worker.livenessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":10} NFD worker pod liveness probe
worker.readinessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":5,"failureThreshold": 10} NFD worker pod readiness probe

Topology updater parameters

Name Type Default description
topologyUpdater.* dict   NFD Topology Updater configuration
topologyUpdater.enable bool false Specifies whether the NFD Topology Updater should be created
topologyUpdater.createCRDs bool false Specifies whether the NFD Topology Updater CRDs should be created
topologyUpdater.serviceAccount.create bool true Specifies whether the service account for topology updater should be created
topologyUpdater.serviceAccount.annotations dict {} Annotations to add to the service account for topology updater
topologyUpdater.serviceAccount.name string   The name of the service account for topology updater to use. If not set and create is true, a name is generated using the fullname template and -topology-updater suffix
topologyUpdater.rbac.create bool true Specifies whether to create RBAC configuration for topology updater
topologyUpdater.metricsPort integer 8081 Port on which to expose prometheus metrics
topologyUpdater.kubeletConfigPath string "" Specifies the kubelet config host path
topologyUpdater.kubeletPodResourcesSockPath string "" Specifies the kubelet sock path to read pod resources
topologyUpdater.updateInterval string 60s Time to sleep between CR updates. Non-positive value implies no CR update.
topologyUpdater.watchNamespace string * Namespace to watch pods, * for all namespaces
topologyUpdater.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
topologyUpdater.securityContext dict {} Container security settings
topologyUpdater.resources.limits dict {memory: 60Mi} NFD Topology Updater pod resources limits
topologyUpdater.resources.requests dict {cpu: 50m, memory: 40Mi} NFD Topology Updater pod resources requests
topologyUpdater.nodeSelector dict {} Topology updater pod node selector
topologyUpdater.tolerations dict {} Topology updater pod node tolerations
topologyUpdater.annotations dict {} Topology updater pod annotations
topologyUpdater.daemonsetAnnotations dict {} Topology updater daemonset annotations
topologyUpdater.affinity dict {} Topology updater pod affinity
topologyUpdater.config dict   configuration
topologyUpdater.podSetFingerprint bool true Enables compute and report of pod fingerprint in NRT objects.
topologyUpdater.kubeletStateDir string /var/lib/kubelet Specifies kubelet state directory path for watching state and checkpoint files. Empty value disables kubelet state tracking.
topologyUpdater.revisionHistoryLimit integer   Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
topologyUpdater.livenessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":10} Topology updater pod liveness probe
topologyUpdater.readinessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":5,"failureThreshold": 10} Topology updater pod readiness probe

Garbage collector parameters

Name Type Default description
gc.* dict   NFD Garbage Collector configuration
gc.enable bool true Specifies whether the NFD Garbage Collector should be created
gc.serviceAccount.create bool true Specifies whether the service account for garbage collector should be created
gc.serviceAccount.annotations dict {} Annotations to add to the service account for garbage collector
gc.serviceAccount.name string   The name of the service account for garbage collector to use. If not set and create is true, a name is generated using the fullname template and -gc suffix
gc.rbac.create bool true Specifies whether to create RBAC configuration for garbage collector
gc.interval string 1h Time between periodic garbage collector runs
gc.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
gc.resources.limits dict {memory: 1Gi} NFD Garbage Collector pod resources limits
gc.resources.requests dict {cpu: 10m, memory: 128Mi} NFD Garbage Collector pod resources requests
gc.metricsPort integer 8081 Port on which to serve Prometheus metrics
gc.nodeSelector dict {} Garbage collector pod node selector
gc.tolerations dict {} Garbage collector pod node tolerations
gc.annotations dict {} Garbage collector pod annotations
gc.deploymentAnnotations dict {} Garbage collector deployment annotations
gc.affinity dict {} Garbage collector pod affinity
gc.revisionHistoryLimit integer   Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit

Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file +

The command removes all the Kubernetes components associated with the chart and deletes the release. It also runs a post-delete hook that cleans up the nodes of all labels, annotations, taints and extended resources that were created by NFD.

Chart parameters

To tailor the deployment of the Node Feature Discovery to your needs following Chart parameters are available.

General parameters

Name Type Default Description
image.repository string registry.k8s.io/nfd/node-feature-discovery NFD image repository
image.tag string v0.16.4 NFD image tag
image.pullPolicy string Always Image pull policy
imagePullSecrets list [] ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. For example, in the case of docker, only DockerConfig type secrets are honored. More info
nameOverride string   Override the name of the chart
fullnameOverride string   Override a default fully qualified app name
tls.enable bool false Specifies whether to use TLS for communications between components. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager bool false If enabled, requires cert-manager to be installed and will automatically create the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerName string   If specified, it will use a pre-existing issuer instead for the required TLS certificates. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
tls.certManager.certManagerCertificate.issuerKind string   Specifies on what kind of issuer is used, can be either ClusterIssuer or Issuer (default). Requires tls.certManager.certManagerCertificate.issuerName to be set. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
featureGates.NodeFeatureAPI bool true Enable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication.
featureGates.NodeFeatureGroupAPI bool false Enable the NodeFeatureGroup CRD API.
featureGates.DisableAutoPrefix bool false Enable DisableAutoPrefix feature gate. Disables automatic prefixing of unprefixed labels, annotations and extended resources.
enableNodeFeatureApi bool true Enable the NodeFeature CRD API for communicating node features. This will automatically disable the gRPC communication. DEPRECATED: will be removed in NFD v0.17, use featureGates.NodeFeatureAPI instead.
prometheus.enable bool false Specifies whether to expose metrics using prometheus operator
prometheus.labels dict {} Specifies labels for use with the prometheus operator to control how it is selected
prometheus.scrapeInterval string 10s Specifies the interval by which metrics are scraped
priorityClassName string   The name of the PriorityClass to be used for the NFD pods.

Metrics are configured to be exposed using prometheus operator API's by default. If you want to expose metrics using the prometheus operator API's you need to install the prometheus operator in your cluster.

Master pod parameters

Name Type Default description
master.* dict   NFD master deployment configuration
master.enable bool true Specifies whether nfd-master should be deployed
master.port integer   Specifies the TCP port that nfd-master listens for incoming requests. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.metricsPort integer 8081 Port on which to expose metrics from components to prometheus operator
master.instance string   Instance name. Used to separate annotation namespaces for multiple parallel deployments
master.resyncPeriod string   NFD API controller resync period.
master.extraLabelNs array [] List of allowed extra label namespaces
master.resourceLabels array [] List of labels to be registered as extended resources
master.enableTaints bool false Specifies whether to enable or disable node tainting
master.crdController bool null Specifies whether the NFD CRD API controller is enabled. If not set, controller will be enabled if master.instance is empty.
master.featureRulesController bool null DEPRECATED: use master.crdController instead
master.replicaCount integer 1 Number of desired pods. This is a pointer to distinguish between explicit zero and not specified
master.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
master.securityContext dict {} Container security settings
master.serviceAccount.create bool true Specifies whether a service account should be created
master.serviceAccount.annotations dict {} Annotations to add to the service account
master.serviceAccount.name string   The name of the service account to use. If not set and create is true, a name is generated using the fullname template
master.rbac.create bool true Specifies whether to create RBAC configuration for nfd-master
master.service.type string ClusterIP NFD master service type. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.service.port integer 8080 NFD master service port. NOTE: this parameter is related to the deprecated gRPC API and will be removed with it in a future release
master.resources.limits dict {memory: 4Gi} NFD master pod resources limits
master.resources.requests dict {cpu: 100m, memory: 128Mi} NFD master pod resources requests. You may want to use the same value for requests.memory and limits.memory. The "requests" value affects scheduling to accommodate pods on nodes. If there is a large difference between "requests" and "limits" and nodes experience memory pressure, the kernel may invoke the OOM Killer, even if the memory does not exceed the "limits" threshold. This can cause unexpected pod evictions. Memory cannot be compressed and once allocated to a pod, it can only be reclaimed by killing the pod. Natan Yellin 22/09/2022 that discusses this issue.
master.tolerations dict Scheduling to master node is disabled NFD master pod tolerations
master.annotations dict {} NFD master pod annotations
master.affinity dict   NFD master pod required node affinity
master.deploymentAnnotations dict {} NFD master deployment annotations
master.nfdApiParallelism integer 10 Specifies the maximum number of concurrent node updates.
master.config dict   NFD master configuration
master.revisionHistoryLimit integer   Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit
master.livenessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":10} NFD master pod liveness probe
master.readinessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":5,"failureThreshold": 10} NFD master pod readiness probe

Worker pod parameters

Name Type Default description
worker.* dict   NFD worker daemonset configuration
worker.enable bool true Specifies whether nfd-worker should be deployed
worker.metricsPort* int 8081 Port on which to expose metrics from components to prometheus operator
worker.config dict   NFD worker configuration
worker.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
worker.securityContext dict {} Container security settings
worker.serviceAccount.create bool true Specifies whether a service account for nfd-worker should be created
worker.serviceAccount.annotations dict {} Annotations to add to the service account for nfd-worker
worker.serviceAccount.name string   The name of the service account to use for nfd-worker. If not set and create is true, a name is generated using the fullname template (suffixed with -worker)
worker.rbac.create bool true Specifies whether to create RBAC configuration for nfd-worker
worker.mountUsrSrc bool false Specifies whether to allow users to mount the hostpath /user/src. Does not work on systems without /usr/src AND a read-only /usr
worker.resources.limits dict {memory: 512Mi} NFD worker pod resources limits
worker.resources.requests dict {cpu: 5m, memory: 64Mi} NFD worker pod resources requests
worker.nodeSelector dict {} NFD worker pod node selector
worker.tolerations dict {} NFD worker pod node tolerations
worker.priorityClassName string   NFD worker pod priority class
worker.annotations dict {} NFD worker pod annotations
worker.daemonsetAnnotations dict {} NFD worker daemonset annotations
worker.revisionHistoryLimit integer   Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
worker.livenessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":10} NFD worker pod liveness probe
worker.readinessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":5,"failureThreshold": 10} NFD worker pod readiness probe

Topology updater parameters

Name Type Default description
topologyUpdater.* dict   NFD Topology Updater configuration
topologyUpdater.enable bool false Specifies whether the NFD Topology Updater should be created
topologyUpdater.createCRDs bool false Specifies whether the NFD Topology Updater CRDs should be created
topologyUpdater.serviceAccount.create bool true Specifies whether the service account for topology updater should be created
topologyUpdater.serviceAccount.annotations dict {} Annotations to add to the service account for topology updater
topologyUpdater.serviceAccount.name string   The name of the service account for topology updater to use. If not set and create is true, a name is generated using the fullname template and -topology-updater suffix
topologyUpdater.rbac.create bool true Specifies whether to create RBAC configuration for topology updater
topologyUpdater.metricsPort integer 8081 Port on which to expose prometheus metrics
topologyUpdater.kubeletConfigPath string "" Specifies the kubelet config host path
topologyUpdater.kubeletPodResourcesSockPath string "" Specifies the kubelet sock path to read pod resources
topologyUpdater.updateInterval string 60s Time to sleep between CR updates. Non-positive value implies no CR update.
topologyUpdater.watchNamespace string * Namespace to watch pods, * for all namespaces
topologyUpdater.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
topologyUpdater.securityContext dict {} Container security settings
topologyUpdater.resources.limits dict {memory: 60Mi} NFD Topology Updater pod resources limits
topologyUpdater.resources.requests dict {cpu: 50m, memory: 40Mi} NFD Topology Updater pod resources requests
topologyUpdater.nodeSelector dict {} Topology updater pod node selector
topologyUpdater.tolerations dict {} Topology updater pod node tolerations
topologyUpdater.annotations dict {} Topology updater pod annotations
topologyUpdater.daemonsetAnnotations dict {} Topology updater daemonset annotations
topologyUpdater.affinity dict {} Topology updater pod affinity
topologyUpdater.config dict   configuration
topologyUpdater.podSetFingerprint bool true Enables compute and report of pod fingerprint in NRT objects.
topologyUpdater.kubeletStateDir string /var/lib/kubelet Specifies kubelet state directory path for watching state and checkpoint files. Empty value disables kubelet state tracking.
topologyUpdater.revisionHistoryLimit integer   Specify how many old ControllerRevisions for this DaemonSet you want to retain. revisionHistoryLimit
topologyUpdater.livenessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":10} Topology updater pod liveness probe
topologyUpdater.readinessProbe dict {"grpc":{"port":8082},"initialDelaySeconds":5,"failureThreshold": 10} Topology updater pod readiness probe

Garbage collector parameters

Name Type Default description
gc.* dict   NFD Garbage Collector configuration
gc.enable bool true Specifies whether the NFD Garbage Collector should be created
gc.serviceAccount.create bool true Specifies whether the service account for garbage collector should be created
gc.serviceAccount.annotations dict {} Annotations to add to the service account for garbage collector
gc.serviceAccount.name string   The name of the service account for garbage collector to use. If not set and create is true, a name is generated using the fullname template and -gc suffix
gc.rbac.create bool true Specifies whether to create RBAC configuration for garbage collector
gc.interval string 1h Time between periodic garbage collector runs
gc.podSecurityContext dict {} PodSecurityContext holds pod-level security attributes and common container settings
gc.resources.limits dict {memory: 1Gi} NFD Garbage Collector pod resources limits
gc.resources.requests dict {cpu: 10m, memory: 128Mi} NFD Garbage Collector pod resources requests
gc.metricsPort integer 8081 Port on which to serve Prometheus metrics
gc.nodeSelector dict {} Garbage collector pod node selector
gc.tolerations dict {} Garbage collector pod node tolerations
gc.annotations dict {} Garbage collector pod annotations
gc.deploymentAnnotations dict {} Garbage collector deployment annotations
gc.affinity dict {} Garbage collector pod affinity
gc.revisionHistoryLimit integer   Specify how many old ReplicaSets for this Deployment you want to retain. revisionHistoryLimit

Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/deployment/image-variants.html b/v0.16/deployment/image-variants.html index af2ca1bc33..5baba83aa2 100644 --- a/v0.16/deployment/image-variants.html +++ b/v0.16/deployment/image-variants.html @@ -1 +1 @@ - Image variants · Node Feature Discovery

Image variants


NFD offers two variants of the container image. Released container images are available for x86_64 and Arm64 architectures.

Default

The default is a minimal image based on scratch and only supports running statically linked binaries.

For backwards compatibility a container image tag with suffix -minimal (e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.3-minimal) is provided.

Full

This image is based on debian:bookworm-slim and contains a full Linux system for running shell-based nfd-worker hooks and doing live debugging and diagnosis of the NFD images.

The container image tag has suffix -full (e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.3-full).


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file + Image variants · Node Feature Discovery

Image variants


NFD offers two variants of the container image. Released container images are available for x86_64 and Arm64 architectures.

Default

The default is a minimal image based on scratch and only supports running statically linked binaries.

For backwards compatibility a container image tag with suffix -minimal (e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.4-minimal) is provided.

Full

This image is based on debian:bookworm-slim and contains a full Linux system for running shell-based nfd-worker hooks and doing live debugging and diagnosis of the NFD images.

The container image tag has suffix -full (e.g. registry.k8s.io/nfd/node-feature-discovery:v0.16.4-full).


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/deployment/index.html b/v0.16/deployment/index.html index 50a65b2c34..76605fb44c 100644 --- a/v0.16/deployment/index.html +++ b/v0.16/deployment/index.html @@ -1 +1 @@ - Deployment · Node Feature Discovery

Deployment

Node Feature Discovery can be deployed on any recent version of Kubernetes (v1.24+).

See Image variants for description of the different NFD container images available.

Using Kustomize provides straightforward deployment with kubectl integration and declarative customization.

Using Helm provides easy management of NFD deployments with nice configuration management and easy upgrades.

Using Operator provides deployment and configuration management via CRDs.


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file + Deployment · Node Feature Discovery

Deployment

Node Feature Discovery can be deployed on any recent version of Kubernetes (v1.24+).

See Image variants for description of the different NFD container images available.

Using Kustomize provides straightforward deployment with kubectl integration and declarative customization.

Using Helm provides easy management of NFD deployments with nice configuration management and easy upgrades.

Using Operator provides deployment and configuration management via CRDs.


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/deployment/kustomize.html b/v0.16/deployment/kustomize.html index 097a732bf4..fe011cfada 100644 --- a/v0.16/deployment/kustomize.html +++ b/v0.16/deployment/kustomize.html @@ -1,19 +1,19 @@ - Kustomize · Node Feature Discovery

Deployment with Kustomize

Table of contents

  1. Overlays
    1. Worker one-shot
    2. Master Worker Topologyupdater
    3. Topologyupdater
    4. Metrics
  2. Uninstallation

Kustomize can be used to deploy NFD. Customization of the deployment is done by maintaining declarative overlays on top of the base overlays in NFD.

To follow the deployment instructions here, kubectl v1.24 or later is required.

The kustomize overlays provided in the repo can be used directly:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3
-

This will required RBAC rules and deploy nfd-master (as a deployment) and nfd-worker (as daemonset) in the node-feature-discovery namespace.

NOTE: nfd-topology-updater is not deployed as part of the default overlay. Refer to the Master Worker Topologyupdater and Topologyupdater below.

Alternatively you can clone the repository and customize the deployment by creating your own overlays. See kustomize for more information about managing deployment configurations.

Overlays

The NFD repository hosts a set of overlays for different usages and deployment scenarios under deployment/overlays

Worker one-shot

Feature discovery can alternatively be configured as a one-shot job. The default-job overlay may be used to achieve this:

NUM_NODES=$(kubectl get no -o jsonpath='{.items[*].metadata.name}' | wc -w)
-kubectl kustomize https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default-job?ref=v0.16.3 | \
+        Kustomize · Node Feature Discovery                      

Deployment with Kustomize

Table of contents

  1. Overlays
    1. Worker one-shot
    2. Master Worker Topologyupdater
    3. Topologyupdater
    4. Metrics
  2. Uninstallation

Kustomize can be used to deploy NFD. Customization of the deployment is done by maintaining declarative overlays on top of the base overlays in NFD.

To follow the deployment instructions here, kubectl v1.24 or later is required.

The kustomize overlays provided in the repo can be used directly:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4
+

This will required RBAC rules and deploy nfd-master (as a deployment) and nfd-worker (as daemonset) in the node-feature-discovery namespace.

NOTE: nfd-topology-updater is not deployed as part of the default overlay. Refer to the Master Worker Topologyupdater and Topologyupdater below.

Alternatively you can clone the repository and customize the deployment by creating your own overlays. See kustomize for more information about managing deployment configurations.

Overlays

The NFD repository hosts a set of overlays for different usages and deployment scenarios under deployment/overlays

Worker one-shot

Feature discovery can alternatively be configured as a one-shot job. The default-job overlay may be used to achieve this:

NUM_NODES=$(kubectl get no -o jsonpath='{.items[*].metadata.name}' | wc -w)
+kubectl kustomize https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default-job?ref=v0.16.4 | \
     sed s"/NUM_NODES/$NUM_NODES/" | \
     kubectl apply -f -
-

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.

Master Worker Topologyupdater

NFD-Master, nfd-worker and nfd-topology-updater can be configured to be deployed as separate pods. The master-worker-topologyupdater overlay may be used to achieve this:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/master-worker-topologyupdater?ref=v0.16.3
+

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.

Master Worker Topologyupdater

NFD-Master, nfd-worker and nfd-topology-updater can be configured to be deployed as separate pods. The master-worker-topologyupdater overlay may be used to achieve this:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/master-worker-topologyupdater?ref=v0.16.4
 
-

Topologyupdater

To deploy just nfd-topology-updater (without nfd-master and nfd-worker) use the topologyupdater overlay:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.3
+

Topologyupdater

To deploy just nfd-topology-updater (without nfd-master and nfd-worker) use the topologyupdater overlay:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.4
 
 

NFD-Topology-Updater can be configured along with the default overlay (which deploys nfd-worker and nfd-master) where all the software components are deployed as separate pods;


-kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3
-kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.3
+kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4
+kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.4
 
-

Metrics

To allow prometheus operator to scrape metrics from node-feature-discovery, run the following command:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3
-kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prometheus?ref=v0.16.3
-

Uninstallation

Simplest way is to invoke kubectl delete 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:

kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3
+

Metrics

To allow prometheus operator to scrape metrics from node-feature-discovery, run the following command:

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4
+kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prometheus?ref=v0.16.4
+

Uninstallation

Simplest way is to invoke kubectl delete 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:

kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4
 

Alternatively you can delete create objects one-by-one, depending on the type of deployment, for example:

NFD_NS=node-feature-discovery
 kubectl -n $NFD_NS delete ds nfd-worker
 kubectl -n $NFD_NS delete deploy nfd-master
@@ -21,4 +21,4 @@
 kubectl -n $NFD_NS delete sa nfd-master
 kubectl delete clusterrole nfd-master
 kubectl delete clusterrolebinding nfd-master
-

Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file +

Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/deployment/metrics.html b/v0.16/deployment/metrics.html index 3a693d4a77..f36aee528a 100644 --- a/v0.16/deployment/metrics.html +++ b/v0.16/deployment/metrics.html @@ -1,2 +1,2 @@ - Metrics · Node Feature Discovery

Metrics

Metrics are configured to be exposed using prometheus operator API's by default. If you want to expose metrics using the prometheus operator API's you need to install the prometheus operator in your cluster. By default NFD Master and Worker expose metrics on port 8081.

The exposed metrics are

Metric Type Description
nfd_master_build_info Gauge Version from which nfd-master was built
nfd_worker_build_info Gauge Version from which nfd-worker was built
nfd_gc_build_info Gauge Version from which nfd-gc was built
nfd_topology_updater_build_info Gauge Version from which nfd-topology-updater was built
nfd_node_update_requests_total Counter Number of node update requests received by the master over gRPC
nfd_node_updates_total Counter Number of nodes updated
nfd_node_update_failures_total Counter Number of nodes update failures
nfd_node_labels_rejected_total Counter Number of nodes labels rejected by nfd-master
nfd_node_extendedresources_rejected_total Counter Number of nodes extended resources rejected by nfd-master
nfd_node_taints_rejected_total Counter Number of nodes taints rejected by nfd-master
nfd_nodefeaturerule_processing_duration_seconds Histogram Time taken to process NodeFeatureRule objects
nfd_nodefeaturerule_processing_errors_total Counter Number or errors encountered while processing NodeFeatureRule objects
nfd_feature_discovery_duration_seconds Histogram Time taken to discover features on a node
nfd_topology_updater_scan_errors_total Counter Number of errors in scanning resource allocation of pods.
nfd_gc_objects_deleted_total Counter Number of NodeFeature and NodeResourceTopology objects garbage collected.
nfd_gc_object_delete_failures_total Counter Number of errors in deleting NodeFeature and NodeResourceTopology objects.

Kustomize

To deploy NFD with metrics enabled using kustomize, you can use the prometheus overlay.

Helm

By default metrics are enabled when deploying NFD via Helm. To enable Prometheus to scrape metrics from NFD, you need to pass the following values to Helm:

--set prometheus.enable=true
-

For more info on Helm deployment, see Helm.

It is recommended to specify --set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false when deploying prometheus-operator via Helm to enable the prometheus-operator to scrape metrics from any PodMonitor.

or setting labels on the PodMonitor via the helm parameter prometheus.labels to control which Prometheus instances will scrape this PodMonitor.

Grafana dashboard

NFD contains an example Grafana dashboard. You can import examples/grafana-dashboard.json to your Grafana instance to visualize the NFD metrics.


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file + Metrics · Node Feature Discovery

Metrics

Metrics are configured to be exposed using prometheus operator API's by default. If you want to expose metrics using the prometheus operator API's you need to install the prometheus operator in your cluster. By default NFD Master and Worker expose metrics on port 8081.

The exposed metrics are

Metric Type Description
nfd_master_build_info Gauge Version from which nfd-master was built
nfd_worker_build_info Gauge Version from which nfd-worker was built
nfd_gc_build_info Gauge Version from which nfd-gc was built
nfd_topology_updater_build_info Gauge Version from which nfd-topology-updater was built
nfd_node_update_requests_total Counter Number of node update requests received by the master over gRPC
nfd_node_updates_total Counter Number of nodes updated
nfd_node_update_failures_total Counter Number of nodes update failures
nfd_node_labels_rejected_total Counter Number of nodes labels rejected by nfd-master
nfd_node_extendedresources_rejected_total Counter Number of nodes extended resources rejected by nfd-master
nfd_node_taints_rejected_total Counter Number of nodes taints rejected by nfd-master
nfd_nodefeaturerule_processing_duration_seconds Histogram Time taken to process NodeFeatureRule objects
nfd_nodefeaturerule_processing_errors_total Counter Number or errors encountered while processing NodeFeatureRule objects
nfd_feature_discovery_duration_seconds Histogram Time taken to discover features on a node
nfd_topology_updater_scan_errors_total Counter Number of errors in scanning resource allocation of pods.
nfd_gc_objects_deleted_total Counter Number of NodeFeature and NodeResourceTopology objects garbage collected.
nfd_gc_object_delete_failures_total Counter Number of errors in deleting NodeFeature and NodeResourceTopology objects.

Kustomize

To deploy NFD with metrics enabled using kustomize, you can use the prometheus overlay.

Helm

By default metrics are enabled when deploying NFD via Helm. To enable Prometheus to scrape metrics from NFD, you need to pass the following values to Helm:

--set prometheus.enable=true
+

For more info on Helm deployment, see Helm.

It is recommended to specify --set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false when deploying prometheus-operator via Helm to enable the prometheus-operator to scrape metrics from any PodMonitor.

or setting labels on the PodMonitor via the helm parameter prometheus.labels to control which Prometheus instances will scrape this PodMonitor.

Grafana dashboard

NFD contains an example Grafana dashboard. You can import examples/grafana-dashboard.json to your Grafana instance to visualize the NFD metrics.


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/deployment/operator.html b/v0.16/deployment/operator.html index 28563d033e..2381dbb638 100644 --- a/v0.16/deployment/operator.html +++ b/v0.16/deployment/operator.html @@ -1,4 +1,4 @@ - NFD Operator · Node Feature Discovery

Deployment with NFD Operator

Table of contents

  1. Deployment
  2. Uninstallation

The Node Feature Discovery Operator automates installation, configuration and updates of NFD using a specific NodeFeatureDiscovery custom resource. This also provides good support for managing NFD as a dependency of other operators.

Deployment

Deployment using the Node Feature Discovery Operator is recommended to be done via operatorhub.io.

  1. You need to have OLM installed. If you don't, take a look at the latest release for detailed instructions.
  2. Install the operator:

    kubectl create -f https://operatorhub.io/install/nfd-operator.yaml
    +        NFD Operator · Node Feature Discovery                      

    Deployment with NFD Operator

    Table of contents

    1. Deployment
    2. Uninstallation

    The Node Feature Discovery Operator automates installation, configuration and updates of NFD using a specific NodeFeatureDiscovery custom resource. This also provides good support for managing NFD as a dependency of other operators.

    Deployment

    Deployment using the Node Feature Discovery Operator is recommended to be done via operatorhub.io.

    1. You need to have OLM installed. If you don't, take a look at the latest release for detailed instructions.
    2. Install the operator:

      kubectl create -f https://operatorhub.io/install/nfd-operator.yaml
       
    3. Create NodeFeatureDiscovery object (in nfd namespace here):

      cat << EOF | kubectl apply -f -
       apiVersion: v1
       kind: Namespace
      @@ -12,9 +12,9 @@
         namespace: nfd
       spec:
         operand:
      -    image: registry.k8s.io/nfd/node-feature-discovery:v0.16.3
      +    image: registry.k8s.io/nfd/node-feature-discovery:v0.16.4
           imagePullPolicy: IfNotPresent
       EOF
       

    Uninstallation

    If you followed the deployment instructions above you can uninstall NFD with:

    kubectl -n nfd delete NodeFeatureDiscovery my-nfd-deployment
     

    Optionally, you can also remove the namespace:

    kubectl delete ns nfd
    -

    See the node-feature-discovery-operator and OLM project documentation for instructions for uninstalling the operator and operator lifecycle manager, respectively.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    See the node-feature-discovery-operator and OLM project documentation for instructions for uninstalling the operator and operator lifecycle manager, respectively.


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/deployment/tls.html b/v0.16/deployment/tls.html index 76b7e88930..1c98279c8f 100644 --- a/v0.16/deployment/tls.html +++ b/v0.16/deployment/tls.html @@ -1,4 +1,4 @@ - TLS authentication · Node Feature Discovery

Communication security with TLS

Table of contents

  1. Automated TLS certificate management using cert-manager
  2. Manual TLS certificate management

DEPRECATED: this section only applies when the gRPC API is used, i.e. when the NodeFeature API is disabled (via the -feature-gates NodeFeatureAPI=false flag) on both nfd-master and nfd-worker. The gRPC API is deprecated and will be removed in a future release.

NFD supports mutual TLS authentication between the nfd-master and nfd-worker instances. That is, nfd-worker and nfd-master both verify that the other end presents a valid certificate.

TLS authentication is enabled by specifying -ca-file, -key-file and -cert-file args, on both the nfd-master and nfd-worker instances. The template specs provided with NFD contain (commented out) example configuration for enabling TLS authentication.

The Common Name (CN) of the nfd-master certificate must match the DNS name of the nfd-master Service of the cluster. By default, nfd-master only check that the nfd-worker has been signed by the specified root certificate (-ca-file).

Additional hardening can be enabled by specifying -verify-node-name in nfd-master args, in which case nfd-master verifies that the NodeName presented by nfd-worker matches the Common Name (CN) or a Subject Alternative Name (SAN) of its certificate.

Automated TLS certificate management using cert-manager

cert-manager can be used to automate certificate management between nfd-master and the nfd-worker pods.

The NFD source code repository contains an example kustomize overlay and helm chart that can be used to deploy NFD with cert-manager supplied certificates enabled.

To install cert-manager itself, you can run:

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml
+        TLS authentication · Node Feature Discovery                      

Communication security with TLS

Table of contents

  1. Automated TLS certificate management using cert-manager
  2. Manual TLS certificate management

DEPRECATED: this section only applies when the gRPC API is used, i.e. when the NodeFeature API is disabled (via the -feature-gates NodeFeatureAPI=false flag) on both nfd-master and nfd-worker. The gRPC API is deprecated and will be removed in a future release.

NFD supports mutual TLS authentication between the nfd-master and nfd-worker instances. That is, nfd-worker and nfd-master both verify that the other end presents a valid certificate.

TLS authentication is enabled by specifying -ca-file, -key-file and -cert-file args, on both the nfd-master and nfd-worker instances. The template specs provided with NFD contain (commented out) example configuration for enabling TLS authentication.

The Common Name (CN) of the nfd-master certificate must match the DNS name of the nfd-master Service of the cluster. By default, nfd-master only check that the nfd-worker has been signed by the specified root certificate (-ca-file).

Additional hardening can be enabled by specifying -verify-node-name in nfd-master args, in which case nfd-master verifies that the NodeName presented by nfd-worker matches the Common Name (CN) or a Subject Alternative Name (SAN) of its certificate.

Automated TLS certificate management using cert-manager

cert-manager can be used to automate certificate management between nfd-master and the nfd-worker pods.

The NFD source code repository contains an example kustomize overlay and helm chart that can be used to deploy NFD with cert-manager supplied certificates enabled.

To install cert-manager itself, you can run:

kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.13.2/cert-manager.yaml
 

Alternatively, you can refer to cert-manager documentation for other installation methods such as the Helm chart they provide.

When using the Helm chart to deploy NFD, override values.yaml to enable both the tls.enabled and tls.certManager options. Note that if you do not enable tls.certManager, helm will successfully install the application, but deployment will wait until certificates are manually created, as demonstrated below.

See the sample installation commands in the Helm Deployment and Configuration sections above for how to either override individual values, or provide a yaml file with which to override default values.

Manual TLS certificate management

If you do not with to make use of cert-manager, the certificates can be manually created and stored as secrets within the NFD namespace.

Create a CA certificate

openssl req -x509 -newkey rsa:4096 -keyout ca.key -nodes \
         -subj "/CN=nfd-ca" -days 10000 -out ca.crt
 

Create a common openssl config file.

cat <<EOF > nfd-common.conf
@@ -77,4 +77,4 @@
 EOF
 
 done
-

Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file +

Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/deployment/uninstallation.html b/v0.16/deployment/uninstallation.html index d10f6b118b..4942a3ac75 100644 --- a/v0.16/deployment/uninstallation.html +++ b/v0.16/deployment/uninstallation.html @@ -1,4 +1,4 @@ - Uninstallation · Node Feature Discovery

Uninstallation


Follow the uninstallation instructions of the deployment method used (kustomize, helm or operator).

Removing feature labels

NOTE: This is unnecessary when using the Helm chart for deployment as it will clean up the nodes when NFD is uninstalled.

NFD-Master has a special -prune command line flag for removing all nfd-related node labels, annotations, extended resources and taints from the cluster.

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.3
+        Uninstallation · Node Feature Discovery                      

Uninstallation


Follow the uninstallation instructions of the deployment method used (kustomize, helm or operator).

Removing feature labels

NOTE: This is unnecessary when using the Helm chart for deployment as it will clean up the nodes when NFD is uninstalled.

NFD-Master has a special -prune command line flag for removing all nfd-related node labels, annotations, extended resources and taints from the cluster.

kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.4
 kubectl -n node-feature-discovery wait job.batch/nfd-master --for=condition=complete && \
-    kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.3
-

NOTE: You must run prune before removing the RBAC rules (serviceaccount, clusterrole and clusterrolebinding).


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file + kubectl delete -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/prune?ref=v0.16.4 +

NOTE: You must run prune before removing the RBAC rules (serviceaccount, clusterrole and clusterrolebinding).


Node Feature Discovery
v0.16
Versions
GitHub
Homepage
Issues
Download

This Software is under the terms of Apache License 2.0.
\ No newline at end of file diff --git a/v0.16/developer-guide/index.html b/v0.16/developer-guide/index.html index 478dd32bc4..b087d782d6 100644 --- a/v0.16/developer-guide/index.html +++ b/v0.16/developer-guide/index.html @@ -1,10 +1,10 @@ - Developer guide · Node Feature Discovery

Developer guide

Table of contents

  1. Building from source
    1. Download the source code
    2. Docker build
    3. Docker multi-arch builds with buildx
    4. Deployment
    5. Building locally
    6. Customizing the build
    7. Testing
  2. Running locally
    1. NFD-Master
    2. NFD-Worker
    3. NFD-Topology-Updater
  3. Running with Tilt
    1. Prerequisites
    2. Environment variables
  4. Documentation

Building from source

Download the source code

git clone https://github.com/kubernetes-sigs/node-feature-discovery
+        Developer guide · Node Feature Discovery                      

Developer guide

Table of contents

  1. Building from source
    1. Download the source code
    2. Docker build
    3. Docker multi-arch builds with buildx
    4. Deployment
    5. Building locally
    6. Customizing the build
    7. Testing
  2. Running locally
    1. NFD-Master
    2. NFD-Worker
    3. NFD-Topology-Updater
  3. Running with Tilt
    1. Prerequisites
    2. Environment variables
  4. Documentation

Building from source

Download the source code

git clone https://github.com/kubernetes-sigs/node-feature-discovery
 cd node-feature-discovery
 

Docker build

Build the container image

See customizing the build below for altering the container image registry, for example.

make
 

Push the container image

Optional, this example with Docker.

docker push <IMAGE_TAG>
 

Docker multi-arch builds with buildx

The default set of architectures enabled for mulit-arch builds are linux/amd64 and linux/arm64. If more architectures are needed one can override the IMAGE_ALL_PLATFORMS variable with a comma separated list of OS/ARCH tuples.

Build the manifest-list with a container image per arch

make image-all
 

Currently docker does not support loading of manifest-lists meaning the images are not shown when executing docker images, see: buildx issue #59.

Push the manifest-list with container image per arch

make push-all
-

The resulting container image can be used in the same way on each arch by pulling e.g. node-feature-discovery:v0.16.3 without specifying the architecture. The manifest-list will take care of providing the right architecture image.

Change the job spec to use your custom image (optional)

To use your published image from the step above instead of the registry.k8s.io/nfd/node-feature-discovery image, edit image attribute in the spec template(s) to the new location (<registry-name>/<image-name>[:<version>]).

Deployment

The yamls makefile generates a kustomization.yaml matching your locally built image and using the deploy/overlays/default deployment. See build customization below for configurability, e.g. changing the deployment namespace.

K8S_NAMESPACE=my-ns make yamls
+

The resulting container image can be used in the same way on each arch by pulling e.g. node-feature-discovery:v0.16.4 without specifying the architecture. The manifest-list will take care of providing the right architecture image.

Change the job spec to use your custom image (optional)

To use your published image from the step above instead of the registry.k8s.io/nfd/node-feature-discovery image, edit image attribute in the spec template(s) to the new location (<registry-name>/<image-name>[:<version>]).

Deployment

The yamls makefile generates a kustomization.yaml matching your locally built image and using the deploy/overlays/default deployment. See build customization below for configurability, e.g. changing the deployment namespace.

K8S_NAMESPACE=my-ns make yamls
 kubectl apply -k .
 

You can use alternative deployment methods by modifying the auto-generated kustomization file.

Building locally

You can also build the binaries locally

make build
 

This will compile binaries under bin/

Customizing the build

There are several Makefile variables that control the build process and the name of the resulting container image. The following are targeted targeted for build customization and they can be specified via environment variables or makefile overrides.

Variable Description Default value
HOSTMOUNT_PREFIX Prefix of system directories for feature discovery (local builds) / (local builds) /host- (container builds)
IMAGE_BUILD_CMD Command to build the image docker build
IMAGE_BUILD_EXTRA_OPTS Extra options to pass to build command empty
IMAGE_BUILDX_CMD Command to build and push multi-arch images with buildx DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build –platform=${IMAGE_ALL_PLATFORMS} –progress=auto –pull
IMAGE_ALL_PLATFORMS Comma separated list of OS/ARCH tuples for mulit-arch builds linux/amd64,linux/arm64
IMAGE_PUSH_CMD Command to push the image to remote registry docker push
IMAGE_REGISTRY Container image registry to use registry.k8s.io/nfd
IMAGE_TAG_NAME Container image tag name <nfd version>
IMAGE_EXTRA_TAG_NAMES Additional container image tag(s) to create when building image empty
K8S_NAMESPACE nfd-master and nfd-worker namespace node-feature-discovery

For example, to use a custom registry:

make IMAGE_REGISTRY=<my custom registry uri>
@@ -12,19 +12,19 @@
 
  • by overriding the variable value

     make  IMAGE_BUILD_CMD="buildah bud"
     
  • Testing

    Unit tests are automatically run as part of the container image build. You can also run them manually in the source code tree by running:

    make test
     

    End-to-end tests are built on top of the e2e test framework of Kubernetes, and, they required a cluster to run them on. For running the tests on your test cluster you need to specify the kubeconfig to be used:

    make e2e-test KUBECONFIG=$HOME/.kube/config
    -

    There are several environment variables that can be used to customize the e2e-tests:

    Variable Description Default value
    KUBECONFIG Kubeconfig for running e2e-tests empty
    E2E_TEST_CONFIG Parameterization file of e2e-tests (see example) empty
    E2E_PULL_IF_NOT_PRESENT True-ish value makes the image pull policy IfNotPresent (to be used only in e2e tests) false
    E2E_TEST_FULL_IMAGE Run e2e-test also against the Full Image tag false
    E2E_GINKGO_LABEL_FILTER Ginkgo label filter to use for running e2e tests empty
    OPENSHIFT Non-empty value enables OpenShift specific support (only affects e2e tests) empty

    Running locally

    **DEPRECATED: Running NFD locally is deprecated and will be removed in a future release. It depends on the gRPC API which is deprecated and will be removed in a future release. To run NFD locally, disable the NodeFeature API with -feature-gates NodeFeatureAPI=false flag.

    You can run NFD locally, either directly on your host OS or in containers for testing and development purposes. This may be useful e.g. for checking features-detection.

    NFD-Master

    When running as a standalone container labeling is expected to fail because Kubernetes API is not available. Thus, it is recommended to use -no-publish Also specify -crd-controller=false and -feature-gates NodeFeatureAPI=false command line flags to disable CRD controller and enable gRPC. E.g.

    $ export NFD_CONTAINER_IMAGE=registry.k8s.io/nfd/node-feature-discovery:v0.16.3
    +

    There are several environment variables that can be used to customize the e2e-tests:

    Variable Description Default value
    KUBECONFIG Kubeconfig for running e2e-tests empty
    E2E_TEST_CONFIG Parameterization file of e2e-tests (see example) empty
    E2E_PULL_IF_NOT_PRESENT True-ish value makes the image pull policy IfNotPresent (to be used only in e2e tests) false
    E2E_TEST_FULL_IMAGE Run e2e-test also against the Full Image tag false
    E2E_GINKGO_LABEL_FILTER Ginkgo label filter to use for running e2e tests empty
    OPENSHIFT Non-empty value enables OpenShift specific support (only affects e2e tests) empty

    Running locally

    **DEPRECATED: Running NFD locally is deprecated and will be removed in a future release. It depends on the gRPC API which is deprecated and will be removed in a future release. To run NFD locally, disable the NodeFeature API with -feature-gates NodeFeatureAPI=false flag.

    You can run NFD locally, either directly on your host OS or in containers for testing and development purposes. This may be useful e.g. for checking features-detection.

    NFD-Master

    When running as a standalone container labeling is expected to fail because Kubernetes API is not available. Thus, it is recommended to use -no-publish Also specify -crd-controller=false and -feature-gates NodeFeatureAPI=false command line flags to disable CRD controller and enable gRPC. E.g.

    $ export NFD_CONTAINER_IMAGE=registry.k8s.io/nfd/node-feature-discovery:v0.16.4
     $ docker run --rm --name=nfd-test ${NFD_CONTAINER_IMAGE} nfd-master -no-publish -crd-controller=false -feature-gates NodeFeatureAPI=false
     2019/02/01 14:48:21 Node Feature Discovery Master <NFD_VERSION>
     2019/02/01 14:48:21 gRPC server serving on port: 8080
     

    NFD-Worker

    To run nfd-worker as a "stand-alone" container you need to run it in the same network namespace as the nfd-master container:

    $ docker run --rm --network=container:nfd-test ${NFD_CONTAINER_IMAGE} nfd-worker -feature-gates NodeFeatureAPI=false
     2019/02/01 14:48:56 Node Feature Discovery Worker <NFD_VERSION>
     ...
    -

    If you just want to try out feature discovery without connecting to nfd-master, pass the -no-publish flag to nfd-worker.

    NOTE: Some feature sources need certain directories and/or files from the host mounted inside the NFD container. Thus, you need to provide Docker with the correct --volume options for them to work correctly when run stand-alone directly with docker run. See the default deployment for up-to-date information about the required volume mounts.

    NFD-Topology-Updater

    To run nfd-topology-updater as a "stand-alone" container you need to run it in with the -no-publish flag to disable communication to the Kubernetes apiserver.

    $ docker run --rm ${NFD_CONTAINER_IMAGE} nfd-topology-updater -no-publish
    +

    If you just want to try out feature discovery without connecting to nfd-master, pass the -no-publish flag to nfd-worker.

    NOTE: Some feature sources need certain directories and/or files from the host mounted inside the NFD container. Thus, you need to provide Docker with the correct --volume options for them to work correctly when run stand-alone directly with docker run. See the default deployment for up-to-date information about the required volume mounts.

    NFD-Topology-Updater

    To run nfd-topology-updater as a "stand-alone" container you need to run it in with the -no-publish flag to disable communication to the Kubernetes apiserver.

    $ docker run --rm ${NFD_CONTAINER_IMAGE} nfd-topology-updater -no-publish
     2019/02/01 14:48:56 Node Feature Discovery Topology Updater <NFD_VERSION>
     ...
    -

    If you just want to try out resource topology discovery without connecting to the Kubernetes API, pass the -no-publish flag to nfd-topology-updater.

    NOTE: NFD topology updater needs certain directories and/or files from the host mounted inside the NFD container. Thus, you need to provide Docker with the correct --volume options for them to work correctly when run stand-alone directly with docker run. See the template spec for up-to-date information about the required volume mounts.

    Running with Tilt

    Another option for building NFD locally is via Tilt tool, which can build container images, push them to a local registry and reload your Kubernetes pods automatically. When using Tilt, you don't have to build container images and re-deploy your pods manually but instead let the Tilt take care of it. Tiltfile is a configuration file for the Tilt and is located at the root directory. To develop NFD with Tilt, follow the steps below.

    Prerequisites

    1. Install Docker
    2. Setup Docker as a non-root user.
    3. Install kubectl
    4. Install kustomize
    5. Install tilt
    6. Create a local Kubernetes cluster

    To start up your Tilt development environment, run

    tilt up
    +

    If you just want to try out resource topology discovery without connecting to the Kubernetes API, pass the -no-publish flag to nfd-topology-updater.

    NOTE: NFD topology updater needs certain directories and/or files from the host mounted inside the NFD container. Thus, you need to provide Docker with the correct --volume options for them to work correctly when run stand-alone directly with docker run. See the template spec for up-to-date information about the required volume mounts.

    Running with Tilt

    Another option for building NFD locally is via Tilt tool, which can build container images, push them to a local registry and reload your Kubernetes pods automatically. When using Tilt, you don't have to build container images and re-deploy your pods manually but instead let the Tilt take care of it. Tiltfile is a configuration file for the Tilt and is located at the root directory. To develop NFD with Tilt, follow the steps below.

    Prerequisites

    1. Install Docker
    2. Setup Docker as a non-root user.
    3. Install kubectl
    4. Install kustomize
    5. Install tilt
    6. Create a local Kubernetes cluster

    To start up your Tilt development environment, run

    tilt up
     

    at the root of your local NFD codebase. Tilt will start a web interface in the localhost and port 10350. From the web interface, you are able to see how NFD worker and master are progressing, watch their build and runtime logs. Once your code changes are saved locally, Tilt will notice it and re-build the container image from the current code, push the image to the registry and re-deploy NFD pods with the latest container image.

    Environment variables

    To override environment variables used in the Tiltfile during image build, export them in your current terminal before starting Tilt.

    export IMAGE_TAG_NAME="v1"
     tilt up
    -

    This will override the default value(master) of IMAGE_TAG_NAME variable defined in the Tiltfile.

    Documentation

    All documentation resides under the docs directory in the source tree. It is designed to be served as a html site by GitHub Pages.

    Building the documentation is containerized to fix the build environment. The recommended way for developing documentation is to run:

    make site-serve
    +

    This will override the default value(master) of IMAGE_TAG_NAME variable defined in the Tiltfile.

    Documentation

    All documentation resides under the docs directory in the source tree. It is designed to be served as a html site by GitHub Pages.

    Building the documentation is containerized to fix the build environment. The recommended way for developing documentation is to run:

    make site-serve
     

    This will build the documentation in a container and serve it under localhost:4000/ making it easy to verify the results. Any changes made to the docs/ will automatically re-trigger a rebuild and are reflected in the served content and can be inspected with a browser refresh.

    To just build the html documentation run:

    make site-build
    -

    This will generate html documentation under docs/_site/.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    This will generate html documentation under docs/_site/.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/get-started/index.html b/v0.16/get-started/index.html index ae50e053d2..4009b44a3a 100644 --- a/v0.16/get-started/index.html +++ b/v0.16/get-started/index.html @@ -1,4 +1,4 @@ - Get started · Node Feature Discovery

    Node Feature Discovery

    Welcome to Node Feature Discovery – a Kubernetes add-on for detecting hardware features and system configuration!

    Continue to:

    • Introduction for more details on the project.

    • Quick start for quick step-by-step instructions on how to get NFD running on your cluster.

    Quick-start – the short-short version

    $ kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3
    +        Get started · Node Feature Discovery                      

    Node Feature Discovery

    Welcome to Node Feature Discovery – a Kubernetes add-on for detecting hardware features and system configuration!

    Continue to:

    • Introduction for more details on the project.

    • Quick start for quick step-by-step instructions on how to get NFD running on your cluster.

    Quick-start – the short-short version

    $ kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4
       namespace/node-feature-discovery created
       serviceaccount/nfd-master created
       clusterrole.rbac.authorization.k8s.io/nfd-master created
    @@ -22,4 +22,4 @@
         "feature.node.kubernetes.io/cpu-cpuid.AESNI": "true",
     ...
     
    -

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/get-started/introduction.html b/v0.16/get-started/introduction.html index f44a455a98..e240f41b23 100644 --- a/v0.16/get-started/introduction.html +++ b/v0.16/get-started/introduction.html @@ -1,4 +1,4 @@ - Introduction · Node Feature Discovery

    Introduction

    Table of contents

    1. NFD-Master
    2. NFD-Worker
    3. NFD-Topology-Updater
    4. NFD-GC
    5. Feature Discovery
    6. Node annotations
    7. Custom resources

    This software enables node feature discovery for Kubernetes. It detects hardware features available on each node in a Kubernetes cluster, and advertises those features using node labels and optionally node extended resources, annotations and node taints. Node Feature Discovery is compatible with any recent version of Kubernetes (v1.24+).

    NFD consists of four software components:

    1. nfd-master
    2. nfd-worker
    3. nfd-topology-updater
    4. nfd-gc

    NFD-Master

    NFD-Master is the daemon responsible for communication towards the Kubernetes API. That is, it receives labeling requests from the worker and modifies node objects accordingly.

    NFD-Worker

    NFD-Worker is a daemon responsible for feature detection. It then communicates the information to nfd-master which does the actual node labeling. One instance of nfd-worker is supposed to be running on each node of the cluster,

    NFD-Topology-Updater

    NFD-Topology-Updater is a daemon responsible for examining allocated resources on a worker node to account for resources available to be allocated to new pod on a per-zone basis (where a zone can be a NUMA node). It then creates or updates a NodeResourceTopology custom resource object specific to this node. One instance of nfd-topology-updater is supposed to be running on each node of the cluster.

    NFD-GC

    NFD-GC is a daemon responsible for cleaning obsolete NodeFeature and NodeResourceTopology objects.

    One instance of nfd-gc is supposed to be running in the cluster.

    Feature Discovery

    Feature discovery is divided into domain-specific feature sources:

    • CPU
    • Kernel
    • Memory
    • Network
    • PCI
    • Storage
    • System
    • USB
    • Custom (rule-based custom features)
    • Local (hooks for user-specific features)

    Each feature source is responsible for detecting a set of features which. in turn, are turned into node feature labels. Feature labels are prefixed with feature.node.kubernetes.io/ and also contain the name of the feature source. Non-standard user-specific feature labels can be created with the local and custom feature sources.

    An overview of the default feature labels:

    {
    +        Introduction · Node Feature Discovery                      

    Introduction

    Table of contents

    1. NFD-Master
    2. NFD-Worker
    3. NFD-Topology-Updater
    4. NFD-GC
    5. Feature Discovery
    6. Node annotations
    7. Custom resources

    This software enables node feature discovery for Kubernetes. It detects hardware features available on each node in a Kubernetes cluster, and advertises those features using node labels and optionally node extended resources, annotations and node taints. Node Feature Discovery is compatible with any recent version of Kubernetes (v1.24+).

    NFD consists of four software components:

    1. nfd-master
    2. nfd-worker
    3. nfd-topology-updater
    4. nfd-gc

    NFD-Master

    NFD-Master is the daemon responsible for communication towards the Kubernetes API. That is, it receives labeling requests from the worker and modifies node objects accordingly.

    NFD-Worker

    NFD-Worker is a daemon responsible for feature detection. It then communicates the information to nfd-master which does the actual node labeling. One instance of nfd-worker is supposed to be running on each node of the cluster,

    NFD-Topology-Updater

    NFD-Topology-Updater is a daemon responsible for examining allocated resources on a worker node to account for resources available to be allocated to new pod on a per-zone basis (where a zone can be a NUMA node). It then creates or updates a NodeResourceTopology custom resource object specific to this node. One instance of nfd-topology-updater is supposed to be running on each node of the cluster.

    NFD-GC

    NFD-GC is a daemon responsible for cleaning obsolete NodeFeature and NodeResourceTopology objects.

    One instance of nfd-gc is supposed to be running in the cluster.

    Feature Discovery

    Feature discovery is divided into domain-specific feature sources:

    • CPU
    • Kernel
    • Memory
    • Network
    • PCI
    • Storage
    • System
    • USB
    • Custom (rule-based custom features)
    • Local (hooks for user-specific features)

    Each feature source is responsible for detecting a set of features which. in turn, are turned into node feature labels. Feature labels are prefixed with feature.node.kubernetes.io/ and also contain the name of the feature source. Non-standard user-specific feature labels can be created with the local and custom feature sources.

    An overview of the default feature labels:

    {
       "feature.node.kubernetes.io/cpu-<feature-name>": "true",
       "feature.node.kubernetes.io/custom-<feature-name>": "true",
       "feature.node.kubernetes.io/kernel-<feature name>": "<feature value>",
    @@ -10,4 +10,4 @@
       "feature.node.kubernetes.io/usb-<device label>.present": "<feature value>",
       "feature.node.kubernetes.io/<file name>-<feature name>": "<feature value>"
     }
    -

    Node annotations

    NFD also annotates nodes it is running on:

    Annotation Description
    [<instance>.]nfd.node.kubernetes.io/feature-labels Comma-separated list of node labels managed by NFD. NFD uses this internally so must not be edited by users.
    [<instance>.]nfd.node.kubernetes.io/feature-annotations Comma-separated list of node annotations managed by NFD. NFD uses this internally so must not be edited by users.
    [<instance>.]nfd.node.kubernetes.io/extended-resources Comma-separated list of node extended resources managed by NFD. NFD uses this internally so must not be edited by users.
    [<instance>.]nfd.node.kubernetes.io/taints Comma-separated list of node taints managed by NFD. NFD uses this internally so must not be edited by users.

    NOTE: the -instance command line flag affects the annotation names

    Unapplicable annotations are not created, i.e. for example nfd.node.kubernetes.io/extended-resources is only placed if some extended resources were created by NFD.

    Custom resources

    NFD takes use of some Kubernetes Custom Resources.

    NodeFeatures is be used for representing node features and requesting node labels to be generated.

    NFD-Master uses NodeFeatureRules for custom labeling of nodes.

    NFD-Topology-Updater creates NodeResourceTopology objects that describe the hardware topology of node resources.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node annotations

    NFD also annotates nodes it is running on:

    Annotation Description
    [<instance>.]nfd.node.kubernetes.io/feature-labels Comma-separated list of node labels managed by NFD. NFD uses this internally so must not be edited by users.
    [<instance>.]nfd.node.kubernetes.io/feature-annotations Comma-separated list of node annotations managed by NFD. NFD uses this internally so must not be edited by users.
    [<instance>.]nfd.node.kubernetes.io/extended-resources Comma-separated list of node extended resources managed by NFD. NFD uses this internally so must not be edited by users.
    [<instance>.]nfd.node.kubernetes.io/taints Comma-separated list of node taints managed by NFD. NFD uses this internally so must not be edited by users.

    NOTE: the -instance command line flag affects the annotation names

    Unapplicable annotations are not created, i.e. for example nfd.node.kubernetes.io/extended-resources is only placed if some extended resources were created by NFD.

    Custom resources

    NFD takes use of some Kubernetes Custom Resources.

    NodeFeatures is be used for representing node features and requesting node labels to be generated.

    NFD-Master uses NodeFeatureRules for custom labeling of nodes.

    NFD-Topology-Updater creates NodeResourceTopology objects that describe the hardware topology of node resources.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/get-started/quick-start.html b/v0.16/get-started/quick-start.html index 6384d1739e..1b0fd9a6d1 100644 --- a/v0.16/get-started/quick-start.html +++ b/v0.16/get-started/quick-start.html @@ -1,4 +1,4 @@ - Quick start · Node Feature Discovery

    Quick start

    Minimal steps to deploy latest released version of NFD in your cluster.

    Installation

    Deploy with kustomize – creates a new namespace, service and required RBAC rules and deploys nfd-master and nfd-worker daemons.

    kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.3
    +        Quick start · Node Feature Discovery                      

    Quick start

    Minimal steps to deploy latest released version of NFD in your cluster.

    Installation

    Deploy with kustomize – creates a new namespace, service and required RBAC rules and deploys nfd-master and nfd-worker daemons.

    kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.4
     

    Verify

    Wait until NFD master and NFD worker are running.

    $ kubectl -n node-feature-discovery get ds,deploy
     NAME                         DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
     daemonset.apps/nfd-worker    2         2         2       2            2           <none>          10s
    @@ -31,7 +31,7 @@
     

    See that the pod is running on a desired node

    $ kubectl get po feature-dependent-pod -o wide
     NAME                    READY   STATUS    RESTARTS   AGE   IP          NODE     NOMINATED NODE   READINESS GATES
     feature-dependent-pod   1/1     Running   0          23s   10.36.0.4   node-2   <none>           <none>
    -

    Additional Optional Installation Steps

    Deploy nfd-topology-updater

    To deploy nfd-topology-updater use the topologyupdater kustomize overlay.

    kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.3
    +

    Additional Optional Installation Steps

    Deploy nfd-topology-updater

    To deploy nfd-topology-updater use the topologyupdater kustomize overlay.

    kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/topologyupdater?ref=v0.16.4
     

    Verify nfd-topology-updater

    Wait until nfd-topology-updater is running.

    $ kubectl -n node-feature-discovery get ds
     NAME                                  DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
     daemonset.apps/nfd-topology-updater   2         2         2       2            2           <none>          5s
    @@ -40,4 +40,4 @@
     NAME                 AGE
     kind-control-plane   23s
     kind-worker          23s
    -

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/feature-gates.html b/v0.16/reference/feature-gates.html index d365bf056c..5bb6c470b2 100644 --- a/v0.16/reference/feature-gates.html +++ b/v0.16/reference/feature-gates.html @@ -1,3 +1,3 @@ - Feature Gates · Node Feature Discovery

    Feature Gates


    Feature gates are a set of key-value pairs that control the behavior of NFD. They are used to enable or disable certain features of NFD. The feature gates are set using the -feature-gates command line flag or featureGates value in the Helm chart. The following feature gates are available:

    Name Default Stage Since Until
    NodeFeatureAPI true Beta V0.14  
    DisableAutoPrefix false Alpha V0.16  
    NodeFeatureGroupAPI false Alpha V0.16  

    NodeFeatureAPI

    The NodeFeatureAPI feature gate enables the Node Feature API. When enabled, NFD will register the Node Feature API with the Kubernetes API server. The Node Feature API is used to expose node-specific hardware and software features to the Kubernetes scheduler. The Node Feature API is a beta feature and is enabled by default.

    NodeFeatureGroupAPI

    The NodeFeatureGroupAPI feature gate enables the Node Feature Group API. When enabled, NFD will register the Node Feature Group API with the Kubernetes API server. The Node Feature Group API is used to create node groups based on hardware and software features. The Node Feature Group API is an alpha feature and is disabled by default.

    DisableAutoPrefix

    The DisableAutoPrefix feature gate controls the automatic prefixing of names. When enabled nfd-master does not automatically add the default feature.node.kubernetes.io/ prefix to unprefixed labels, annotations and extended resources. Automatic prefixing is the default behavior in NFD v0.16 and earlier.

    Note that enabling the feature gate effectively causes unprefixed names to be filtered out as NFD does not allow unprefixed names of labels, annotations or extended resources. For example, with the DisableAutoPrefix feature gate set to false, a NodeFeatureRule with

      labels:
    +        Feature Gates · Node Feature Discovery                      

    Feature Gates


    Feature gates are a set of key-value pairs that control the behavior of NFD. They are used to enable or disable certain features of NFD. The feature gates are set using the -feature-gates command line flag or featureGates value in the Helm chart. The following feature gates are available:

    Name Default Stage Since Until
    NodeFeatureAPI true Beta V0.14  
    DisableAutoPrefix false Alpha V0.16  
    NodeFeatureGroupAPI false Alpha V0.16  

    NodeFeatureAPI

    The NodeFeatureAPI feature gate enables the Node Feature API. When enabled, NFD will register the Node Feature API with the Kubernetes API server. The Node Feature API is used to expose node-specific hardware and software features to the Kubernetes scheduler. The Node Feature API is a beta feature and is enabled by default.

    NodeFeatureGroupAPI

    The NodeFeatureGroupAPI feature gate enables the Node Feature Group API. When enabled, NFD will register the Node Feature Group API with the Kubernetes API server. The Node Feature Group API is used to create node groups based on hardware and software features. The Node Feature Group API is an alpha feature and is disabled by default.

    DisableAutoPrefix

    The DisableAutoPrefix feature gate controls the automatic prefixing of names. When enabled nfd-master does not automatically add the default feature.node.kubernetes.io/ prefix to unprefixed labels, annotations and extended resources. Automatic prefixing is the default behavior in NFD v0.16 and earlier.

    Note that enabling the feature gate effectively causes unprefixed names to be filtered out as NFD does not allow unprefixed names of labels, annotations or extended resources. For example, with the DisableAutoPrefix feature gate set to false, a NodeFeatureRule with

      labels:
         foo: bar
    -

    will turn into feature.node.kubernetes.io/foo=bar node label. With DisableAutoPrefix set to true, no prefix is added and the label will be filtered out.

    Note that taint keys are not affected by this feature gate.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    will turn into feature.node.kubernetes.io/foo=bar node label. With DisableAutoPrefix set to true, no prefix is added and the label will be filtered out.

    Note that taint keys are not affected by this feature gate.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/gc-commandline-reference.html b/v0.16/reference/gc-commandline-reference.html index 437d10276e..523ba89315 100644 --- a/v0.16/reference/gc-commandline-reference.html +++ b/v0.16/reference/gc-commandline-reference.html @@ -1,4 +1,4 @@ - Garbage Collector Cmdline Reference · Node Feature Discovery

    NFD-GC Commandline Flags

    Table of Contents

    1. -h, -help
    2. -version
    3. -gc-interval

    To quickly view available command line flags execute nfd-gc -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 \
    +        Garbage Collector Cmdline Reference · Node Feature Discovery                      

    NFD-GC Commandline Flags

    Table of Contents

    1. -h, -help
    2. -version
    3. -gc-interval

    To quickly view available command line flags execute nfd-gc -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 \
     nfd-gc -help
     

    -h, -help

    Print usage and exit.

    -version

    Print version and exit.

    -gc-interval

    The -gc-interval specifies the interval between periodic garbage collector runs.

    Default: 1h

    Example:

    nfd-gc -gc-interval=1h
    -

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/index.html b/v0.16/reference/index.html index 925b099c38..2f80fc194f 100644 --- a/v0.16/reference/index.html +++ b/v0.16/reference/index.html @@ -1 +1 @@ - Reference · Node Feature Discovery

    Reference

    Command line and configuration reference.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file + Reference · Node Feature Discovery

    Reference

    Command line and configuration reference.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/master-commandline-reference.html b/v0.16/reference/master-commandline-reference.html index 9d02067e5a..e008459266 100644 --- a/v0.16/reference/master-commandline-reference.html +++ b/v0.16/reference/master-commandline-reference.html @@ -1,4 +1,4 @@ - Master cmdline reference · Node Feature Discovery

    Commandline flags of nfd-master

    Table of contents

    1. -h, -help
    2. -version
    3. -feature-gates
    4. -prune
    5. -port
    6. -metrics
    7. -instance
    8. -ca-file
    9. -cert-file
    10. -key-file
    11. -verify-node-name
    12. -enable-nodefeature-api
    13. -enable-leader-election
    14. -enable-taints
    15. -no-publish
    16. -crd-controller
    17. -featurerules-controller
    18. -label-whitelist
    19. -extra-label-ns
    20. -deny-label-ns
    21. -resource-labels
    22. -config
    23. -options
    24. -nfd-api-parallelism
    25. Logging
    26. -resync-period

    To quickly view available command line flags execute nfd-master -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 nfd-master -help
    +        Master cmdline reference · Node Feature Discovery                      

    Commandline flags of nfd-master

    Table of contents

    1. -h, -help
    2. -version
    3. -feature-gates
    4. -prune
    5. -port
    6. -metrics
    7. -instance
    8. -ca-file
    9. -cert-file
    10. -key-file
    11. -verify-node-name
    12. -enable-nodefeature-api
    13. -enable-leader-election
    14. -enable-taints
    15. -no-publish
    16. -crd-controller
    17. -featurerules-controller
    18. -label-whitelist
    19. -extra-label-ns
    20. -deny-label-ns
    21. -resource-labels
    22. -config
    23. -options
    24. -nfd-api-parallelism
    25. Logging
    26. -resync-period

    To quickly view available command line flags execute nfd-master -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 nfd-master -help
     

    -h, -help

    Print usage and exit.

    -version

    Print version and exit.

    -feature-gates

    The -feature-gates flag is used to enable or disable non GA features. The list of available feature gates can be found in the feature gates documentation.

    Example:

    nfd-master -feature-gates NodeFeatureAPI=false
     

    -prune

    The -prune 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.

    -port

    The -port flag specifies the TCP port that nfd-master listens for incoming requests.

    Default: 8080

    Example:

    nfd-master -port=443
     

    -metrics

    The -metrics flag specifies the port on which to expose Prometheus metrics. Setting this to 0 disables the metrics server on nfd-master.

    Default: 8081

    Example:

    nfd-master -metrics=12345
    @@ -21,4 +21,4 @@
     

    -options

    The -options 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:

    Default: empty

    Example:

    nfd-master -options='{"noPublish": true}'
     

    -nfd-api-parallelism

    The -nfd-api-parallelism flag can be used to specify the maximum number of concurrent node updates.

    Does not have effect if the NodeFeatureAPI feature gate is disabled.

    Default: 10

    Example:

    nfd-master -nfd-api-parallelism=1
     

    Logging

    The following logging-related flags are inherited from the klog package.

    -add_dir_header

    If true, adds the file directory to the header of the log messages.

    Default: false

    -alsologtostderr

    Log to standard error as well as files.

    Default: false

    -log_backtrace_at

    When logging hits line file:N, emit a stack trace.

    Default: empty

    -log_dir

    If non-empty, write log files in this directory.

    Default: empty

    -log_file

    If non-empty, use this log file.

    Default: empty

    -log_file_max_size

    Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited.

    Default: 1800

    -logtostderr

    Log to standard error instead of files

    Default: true

    -skip_headers

    If true, avoid header prefixes in the log messages.

    Default: false

    -skip_log_headers

    If true, avoid headers when opening log files.

    Default: false

    -stderrthreshold

    Logs at or above this threshold go to stderr.

    Default: 2

    -v

    Number for the log level verbosity.

    Default: 0

    -vmodule

    Comma-separated list of pattern=N settings for file-filtered logging.

    Default: empty

    -resync-period

    The -resync-period 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).

    Does not have effect if the NodeFeatureAPI feature gate is disabled.

    Default: 1 hour.

    Example:

    nfd-master -resync-period=2h
    -

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/master-configuration-reference.html b/v0.16/reference/master-configuration-reference.html index 4a6f2a2f65..0c8925329d 100644 --- a/v0.16/reference/master-configuration-reference.html +++ b/v0.16/reference/master-configuration-reference.html @@ -1,4 +1,4 @@ - Master config reference · Node Feature Discovery

    Configuration file reference of nfd-master

    Table of contents

    1. noPublish
    2. extraLabelNs
    3. denyLabelNs
    4. autoDefaultNs
    5. resourceLabels
    6. enableTaints
    7. labelWhiteList
    8. resyncPeriod
    9. leaderElection
      1. leaderElection.leaseDuration
      2. leaderElection.renewDeadline
      3. leaderElection.retryPeriod
    10. nfdApiParallelism
    11. klog
      1. klog.addDirHeader
      2. klog.alsologtostderr
      3. klog.logBacktraceAt
      4. klog.logDir
      5. klog.logFile
      6. klog.logFileMaxSize
      7. klog.logtostderr
      8. klog.skipHeaders
      9. klog.skipLogHeaders
      10. klog.stderrthreshold
      11. klog.v
      12. klog.vmodule

    See the sample configuration file for a full example configuration.

    noPublish

    noPublish option disables updates to the Node objects in the Kubernetes API server, making a "dry-run" flag for nfd-master. No Labels, Annotations, Taints or ExtendedResources of nodes are updated.

    Default: false

    Example:

    noPublish: true
    +        Master config reference · Node Feature Discovery                      

    Configuration file reference of nfd-master

    Table of contents

    1. noPublish
    2. extraLabelNs
    3. denyLabelNs
    4. autoDefaultNs
    5. resourceLabels
    6. enableTaints
    7. labelWhiteList
    8. resyncPeriod
    9. leaderElection
      1. leaderElection.leaseDuration
      2. leaderElection.renewDeadline
      3. leaderElection.retryPeriod
    10. nfdApiParallelism
    11. klog
      1. klog.addDirHeader
      2. klog.alsologtostderr
      3. klog.logBacktraceAt
      4. klog.logDir
      5. klog.logFile
      6. klog.logFileMaxSize
      7. klog.logtostderr
      8. klog.skipHeaders
      9. klog.skipLogHeaders
      10. klog.stderrthreshold
      11. klog.v
      12. klog.vmodule

    See the sample configuration file for a full example configuration.

    noPublish

    noPublish option disables updates to the Node objects in the Kubernetes API server, making a "dry-run" flag for nfd-master. No Labels, Annotations, Taints or ExtendedResources of nodes are updated.

    Default: false

    Example:

    noPublish: true
     

    extraLabelNs

    extraLabelNs specifies a 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 denyLabelNs parameter.

    The same namespace control and this option applies to Extended Resources (created with resourceLabels), too.

    Default: empty

    Example:

    extraLabelNs: ["added.ns.io","added.kubernets.io"]
     

    denyLabelNs

    denyLabelNs specifies a list of excluded label namespaces. By default, nfd-master allows creating labels in all namespaces, excluding kubernetes.io namespace and its sub-namespaces (i.e. *.kubernetes.io). However, you should note that kubernetes.io and its sub-namespaces are always denied. This option can be used to exclude some vendors or application specific namespaces.

    Default: empty

    Example:

    denyLabelNs: ["denied.ns.io","denied.kubernetes.io"]
     

    autoDefaultNs

    DEPRECATED: Will be removed in NFD v0.17. Use the DisableAutoPrefix feature gate instead.

    The autoDefaultNs option controls the automatic prefixing of names. When set to true (the default in NFD version v0.16) nfd-master automatically adds the default feature.node.kubernetes.io/ prefix to unprefixed labels, annotations and extended resources - this is also the default behavior in NFD v0.15 and earlier. When the option is set to false, no prefix will be prepended to unprefixed names, effectively causing them to be filtered out (as NFD does not allow unprefixed names of labels, annotations or extended resources). The default will be changed to false in a future release.

    For example, with the autoDefaultNs set to true, a NodeFeatureRule with

      labels:
    @@ -15,4 +15,4 @@
     

    leaderElection.retryPeriod

    leaderElection.retryPeriod is the duration the LeaderElector clients should wait between tries of actions.

    It has to be greater than 0.

    Default: 2 seconds.

    Example:

    leaderElection:
       retryPeriod: 2s
     

    nfdApiParallelism

    The nfdApiParallelism option can be used to specify the maximum number of concurrent node updates.

    Does not have effect if the NodeFeatureAPI feature gate is disabled.

    Default: 10

    Example:

    nfdApiParallelism: 1
    -

    klog

    The following options specify the logger configuration. Most of which can be dynamically adjusted at run-time.

    NOTE: The logger options can also be specified via command line flags which take precedence over any corresponding config file options.

    klog.addDirHeader

    If true, adds the file directory to the header of the log messages.

    Default: false

    Run-time configurable: yes

    klog.alsologtostderr

    Log to standard error as well as files.

    Default: false

    Run-time configurable: yes

    klog.logBacktraceAt

    When logging hits line file:N, emit a stack trace.

    Default: empty

    Run-time configurable: yes

    klog.logDir

    If non-empty, write log files in this directory.

    Default: empty

    Run-time configurable: no

    klog.logFile

    If non-empty, use this log file.

    Default: empty

    Run-time configurable: no

    klog.logFileMaxSize

    Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited.

    Default: 1800

    Run-time configurable: no

    klog.logtostderr

    Log to standard error instead of files

    Default: true

    Run-time configurable: yes

    klog.skipHeaders

    If true, avoid header prefixes in the log messages.

    Default: false

    Run-time configurable: yes

    klog.skipLogHeaders

    If true, avoid headers when opening log files.

    Default: false

    Run-time configurable: no

    klog.stderrthreshold

    Logs at or above this threshold go to stderr (default 2)

    Run-time configurable: yes

    klog.v

    Number for the log level verbosity.

    Default: 0

    Run-time configurable: yes

    klog.vmodule

    Comma-separated list of pattern=N settings for file-filtered logging.

    Default: empty

    Run-time configurable: yes


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    klog

    The following options specify the logger configuration. Most of which can be dynamically adjusted at run-time.

    NOTE: The logger options can also be specified via command line flags which take precedence over any corresponding config file options.

    klog.addDirHeader

    If true, adds the file directory to the header of the log messages.

    Default: false

    Run-time configurable: yes

    klog.alsologtostderr

    Log to standard error as well as files.

    Default: false

    Run-time configurable: yes

    klog.logBacktraceAt

    When logging hits line file:N, emit a stack trace.

    Default: empty

    Run-time configurable: yes

    klog.logDir

    If non-empty, write log files in this directory.

    Default: empty

    Run-time configurable: no

    klog.logFile

    If non-empty, use this log file.

    Default: empty

    Run-time configurable: no

    klog.logFileMaxSize

    Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited.

    Default: 1800

    Run-time configurable: no

    klog.logtostderr

    Log to standard error instead of files

    Default: true

    Run-time configurable: yes

    klog.skipHeaders

    If true, avoid header prefixes in the log messages.

    Default: false

    Run-time configurable: yes

    klog.skipLogHeaders

    If true, avoid headers when opening log files.

    Default: false

    Run-time configurable: no

    klog.stderrthreshold

    Logs at or above this threshold go to stderr (default 2)

    Run-time configurable: yes

    klog.v

    Number for the log level verbosity.

    Default: 0

    Run-time configurable: yes

    klog.vmodule

    Comma-separated list of pattern=N settings for file-filtered logging.

    Default: empty

    Run-time configurable: yes


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/plugin-commandline-reference.html b/v0.16/reference/plugin-commandline-reference.html index 43b2c84d67..a592a5e75e 100644 --- a/v0.16/reference/plugin-commandline-reference.html +++ b/v0.16/reference/plugin-commandline-reference.html @@ -1 +1 @@ - Kubectl plugin cmdline reference · Node Feature Discovery

    Commandline flags of kubectl-nfd (plugin)

    Table of contents

    1. -h, -help
    2. Validate
      1. -f / –nodefeature-file
    3. Test
      1. -k, –kubeconfig
      2. -s, –namespace
      3. -n, –nodename
      4. -f, –nodefeaturerule-file
    4. DryRun
      1. -f, –nodefeaturerule-file
      2. -n, –nodefeature-file

    To quickly view available command line flags execute kubectl nfd -help.

    -h, -help

    Print usage and exit.

    Validate

    Validate a NodeFeatureRule file.

    -f / –nodefeature-file

    The --nodefeature-file flag specifies the path to the NodeFeatureRule file to validate.

    Test

    Test a NodeFeatureRule file against a node without applying it.

    -k, –kubeconfig

    The --kubeconfig flag specifies the path to the kubeconfig file to use for CLI requests.

    -s, –namespace

    The --namespace flag specifies the namespace to use for CLI requests. Default: default.

    -n, –nodename

    The --nodename flag specifies the name of the node to test the NodeFeatureRule against.

    -f, –nodefeaturerule-file

    The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file to test.

    DryRun

    Process a NodeFeatureRule file against a NodeFeature file.

    -f, –nodefeaturerule-file

    The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file to test.

    -n, –nodefeature-file

    The --nodefeature-file flag specifies the path to the NodeFeature file to test.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file + Kubectl plugin cmdline reference · Node Feature Discovery

    Commandline flags of kubectl-nfd (plugin)

    Table of contents

    1. -h, -help
    2. Validate
      1. -f / –nodefeature-file
    3. Test
      1. -k, –kubeconfig
      2. -s, –namespace
      3. -n, –nodename
      4. -f, –nodefeaturerule-file
    4. DryRun
      1. -f, –nodefeaturerule-file
      2. -n, –nodefeature-file

    To quickly view available command line flags execute kubectl nfd -help.

    -h, -help

    Print usage and exit.

    Validate

    Validate a NodeFeatureRule file.

    -f / –nodefeature-file

    The --nodefeature-file flag specifies the path to the NodeFeatureRule file to validate.

    Test

    Test a NodeFeatureRule file against a node without applying it.

    -k, –kubeconfig

    The --kubeconfig flag specifies the path to the kubeconfig file to use for CLI requests.

    -s, –namespace

    The --namespace flag specifies the namespace to use for CLI requests. Default: default.

    -n, –nodename

    The --nodename flag specifies the name of the node to test the NodeFeatureRule against.

    -f, –nodefeaturerule-file

    The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file to test.

    DryRun

    Process a NodeFeatureRule file against a NodeFeature file.

    -f, –nodefeaturerule-file

    The --nodefeaturerule-file flag specifies the path to the NodeFeatureRule file to test.

    -n, –nodefeature-file

    The --nodefeature-file flag specifies the path to the NodeFeature file to test.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/topology-updater-commandline-reference.html b/v0.16/reference/topology-updater-commandline-reference.html index ed952fa7ff..e34bf70f18 100644 --- a/v0.16/reference/topology-updater-commandline-reference.html +++ b/v0.16/reference/topology-updater-commandline-reference.html @@ -1,4 +1,4 @@ - Topology Updater Cmdline Reference · Node Feature Discovery

    NFD-Topology-Updater Commandline Flags

    Table of Contents

    1. -h, -help
    2. -version
    3. -config
    4. -no-publish
    5. -oneshot
    6. -metrics
    7. -sleep-interval
    8. -watch-namespace
    9. -kubelet-config-uri
    10. -api-auth-token-file
    11. -podresources-socket
    12. -pods-fingerprint
    13. -kubelet-state-dir

    To quickly view available command line flags execute nfd-topology-updater -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 \
    +        Topology Updater Cmdline Reference · Node Feature Discovery                      

    NFD-Topology-Updater Commandline Flags

    Table of Contents

    1. -h, -help
    2. -version
    3. -config
    4. -no-publish
    5. -oneshot
    6. -metrics
    7. -sleep-interval
    8. -watch-namespace
    9. -kubelet-config-uri
    10. -api-auth-token-file
    11. -podresources-socket
    12. -pods-fingerprint
    13. -kubelet-state-dir

    To quickly view available command line flags execute nfd-topology-updater -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 \
     nfd-topology-updater -help
     

    -h, -help

    Print usage and exit.

    -version

    Print version and exit.

    -config

    The -config flag specifies the path of the nfd-topology-updater configuration file to use.

    Default: /etc/kubernetes/node-feature-discovery/nfd-topology-updater.conf

    Example:

    nfd-topology-updater -config=/opt/nfd/nfd-topology-updater.conf
     

    -no-publish

    The -no-publish flag makes for a "dry-run" flag for nfd-topology-updater. NFD-Topology-Updater runs resource hardware topology detection normally, but NodeResourceTopology objects are not created or updated.

    Default: false

    Example:

    nfd-topology-updater -no-publish
    @@ -11,4 +11,4 @@
     

    -podresources-socket

    The -podresources-socket specifies the path to the Unix socket where kubelet exports a gRPC service to enable discovery of in-use CPUs and devices, and to provide metadata for them.

    Default: /host-var/lib/kubelet/pod-resources/kubelet.sock

    Example:

    nfd-topology-updater -podresources-socket=/var/lib/kubelet/pod-resources/kubelet.sock
     

    -pods-fingerprint

    Enables compute and report the pod set fingerprint in the NRT. A pod fingerprint is a compact representation of the "node state" regarding resources.

    Default: true

    Example:

    nfd-topology-updater -pods-fingerprint=false
     

    -kubelet-state-dir

    The -kubelet-state-dir specifies the path to the Kubelet state directory, where state and checkpoint files are stored. The files are mount as read-only and cannot be change by the updater. Enabled by default. Passing an empty string will disable the watching.

    Default: /host-var/lib/kubelet

    Example:

    nfd-topology-updater -kubelet-state-dir=/var/lib/kubelet
    -

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/topology-updater-configuration-reference.html b/v0.16/reference/topology-updater-configuration-reference.html index 4028bc66c3..3f98c77bbb 100644 --- a/v0.16/reference/topology-updater-configuration-reference.html +++ b/v0.16/reference/topology-updater-configuration-reference.html @@ -1,7 +1,7 @@ - Topology-Updater config reference · Node Feature Discovery

    Configuration file reference of nfd-topology-updater

    Table of contents

    1. excludeList
      1. excludeList.*

    See the sample configuration file for a full example configuration.

    excludeList

    The excludeList specifies a key-value map of allocated resources that should not be examined by the topology-updater agent per node. Each key is a node name with a value as a list of resources that should not be examined by the agent for that specific node.

    Default: empty

    Example:

    excludeList:
    +        Topology-Updater config reference · Node Feature Discovery                      

    Configuration file reference of nfd-topology-updater

    Table of contents

    1. excludeList
      1. excludeList.*

    See the sample configuration file for a full example configuration.

    excludeList

    The excludeList specifies a key-value map of allocated resources that should not be examined by the topology-updater agent per node. Each key is a node name with a value as a list of resources that should not be examined by the agent for that specific node.

    Default: empty

    Example:

    excludeList:
       nodeA: [hugepages-2Mi]
       nodeB: [memory]
       nodeC: [cpu, hugepages-2Mi]
     

    excludeList.*

    excludeList.* is a special value that use to specify all nodes. A resource that would be listed under this key, would be excluded from all nodes.

    Default: empty

    Example:

    excludeList:
       '*': [hugepages-2Mi]
    -

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/versions.html b/v0.16/reference/versions.html index 2f01d0acb7..ac90e27a4a 100644 --- a/v0.16/reference/versions.html +++ b/v0.16/reference/versions.html @@ -1 +1 @@ - Versions · Node Feature Discovery

    Versions and deprecation


    Supported versions

    Node Feature Discovery follows semantic versioning where the version number consists of three components, i.e. MAJOR.MINOR.PATCH.

    The most recent two minor releases (or release branches) of Node Feature Discovery are supported. That is, with X being the latest release, X and X-1 are supported and X-1 reaches end-of-life when X+1 is released.

    Deprecation policy

    Feature labels

    Built-in feature labels and features are supported for 2 releases after being deprecated, at minimum. That is, if a feature label is deprecated in version X, it will be supported in X+1 and X+2 and may be dropped in X+3.

    Configuration options

    Command-line flags and configuration file options are supported for 1 more release after being deprecated, at minimum. That is, if option/flag is deprecated in version X, it will be supported in X+1 and may be removed in X+2.

    The same policy (support for 1 release after deprecation) also applies to Helm chart parameters.

    Kubernetes compatibility

    Node Feature Discovery is compatible with Kubernetes v1.24 and later.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file + Versions · Node Feature Discovery

    Versions and deprecation


    Supported versions

    Node Feature Discovery follows semantic versioning where the version number consists of three components, i.e. MAJOR.MINOR.PATCH.

    The most recent two minor releases (or release branches) of Node Feature Discovery are supported. That is, with X being the latest release, X and X-1 are supported and X-1 reaches end-of-life when X+1 is released.

    Deprecation policy

    Feature labels

    Built-in feature labels and features are supported for 2 releases after being deprecated, at minimum. That is, if a feature label is deprecated in version X, it will be supported in X+1 and X+2 and may be dropped in X+3.

    Configuration options

    Command-line flags and configuration file options are supported for 1 more release after being deprecated, at minimum. That is, if option/flag is deprecated in version X, it will be supported in X+1 and may be removed in X+2.

    The same policy (support for 1 release after deprecation) also applies to Helm chart parameters.

    Kubernetes compatibility

    Node Feature Discovery is compatible with Kubernetes v1.24 and later.


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/worker-commandline-reference.html b/v0.16/reference/worker-commandline-reference.html index e7bea13e60..784723cfc7 100644 --- a/v0.16/reference/worker-commandline-reference.html +++ b/v0.16/reference/worker-commandline-reference.html @@ -1,4 +1,4 @@ - Worker cmdline reference · Node Feature Discovery

    Commandline flags of nfd-worker

    Table of contents

    1. -h, -help
    2. -version
    3. -feature-gates
    4. -config
    5. -options
    6. -server
    7. -ca-file
    8. -cert-file
    9. -key-file
    10. -kubeconfig
    11. -server-name-override
    12. -feature-sources
    13. -label-sources
    14. -metrics
    15. -no-publish
    16. -oneshot
    17. Logging

    To quickly view available command line flags execute nfd-worker -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.3 nfd-worker -help
    +        Worker cmdline reference · Node Feature Discovery                      

    Commandline flags of nfd-worker

    Table of contents

    1. -h, -help
    2. -version
    3. -feature-gates
    4. -config
    5. -options
    6. -server
    7. -ca-file
    8. -cert-file
    9. -key-file
    10. -kubeconfig
    11. -server-name-override
    12. -feature-sources
    13. -label-sources
    14. -metrics
    15. -no-publish
    16. -oneshot
    17. Logging

    To quickly view available command line flags execute nfd-worker -help. In a docker container:

    docker run registry.k8s.io/nfd/node-feature-discovery:v0.16.4 nfd-worker -help
     

    -h, -help

    Print usage and exit.

    -version

    Print version and exit.

    -feature-gates

    The -feature-gates flag is used to enable or disable non GA features. The list of available feature gates can be found in the feature gates documentation.

    Example:

    nfd-master -feature-gates NodeFeatureAPI=false
     

    -config

    The -config flag specifies the path of the nfd-worker configuration file to use.

    Default: /etc/kubernetes/node-feature-discovery/nfd-worker.conf

    Example:

    nfd-worker -config=/opt/nfd/worker.conf
     

    -options

    The -options 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:

    Default: empty

    Example:

    nfd-worker -options='{"sources":{"cpu":{"cpuid":{"attributeWhitelist":["AVX","AVX2"]}}}}'
    @@ -13,4 +13,4 @@
     

    -metrics

    The -metrics flag specifies the port on which to expose Prometheus metrics. Setting this to 0 disables the metrics server on nfd-worker.

    Default: 8081

    Example:

    nfd-worker -metrics=12345
     

    -no-publish

    The -no-publish flag disables all communication with the nfd-master and the Kubernetes API server. It is effectively a "dry-run" flag for nfd-worker. NFD-Worker runs feature detection normally, but no labeling requests are sent to nfd-master and no NodeFeature objects are created or updated in the API server.

    NOTE: This flag takes precedence over the core.noPublish configuration file option.

    Default: false

    Example:

    nfd-worker -no-publish
     

    -oneshot

    The -oneshot flag causes nfd-worker to exit after one pass of feature detection.

    Default: false

    Example:

    nfd-worker -oneshot -no-publish
    -

    Logging

    The following logging-related flags are inherited from the klog package.

    NOTE: The logger setup can also be specified via the core.klog configuration file options. However, the command line flags take precedence over any corresponding config file options specified.

    -add_dir_header

    If true, adds the file directory to the header of the log messages.

    Default: false

    -alsologtostderr

    Log to standard error as well as files.

    Default: false

    -log_backtrace_at

    When logging hits line file:N, emit a stack trace.

    Default: empty

    -log_dir

    If non-empty, write log files in this directory.

    Default: empty

    -log_file

    If non-empty, use this log file.

    Default: empty

    -log_file_max_size

    Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited.

    Default: 1800

    -logtostderr

    Log to standard error instead of files

    Default: true

    -skip_headers

    If true, avoid header prefixes in the log messages.

    Default: false

    -skip_log_headers

    If true, avoid headers when opening log files.

    Default: false

    -stderrthreshold

    Logs at or above this threshold go to stderr.

    Default: 2

    -v

    Number for the log level verbosity.

    Default: 0

    -vmodule

    Comma-separated list of pattern=N settings for file-filtered logging.

    Default: empty


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Logging

    The following logging-related flags are inherited from the klog package.

    NOTE: The logger setup can also be specified via the core.klog configuration file options. However, the command line flags take precedence over any corresponding config file options specified.

    -add_dir_header

    If true, adds the file directory to the header of the log messages.

    Default: false

    -alsologtostderr

    Log to standard error as well as files.

    Default: false

    -log_backtrace_at

    When logging hits line file:N, emit a stack trace.

    Default: empty

    -log_dir

    If non-empty, write log files in this directory.

    Default: empty

    -log_file

    If non-empty, use this log file.

    Default: empty

    -log_file_max_size

    Defines the maximum size a log file can grow to. Unit is megabytes. If the value is 0, the maximum file size is unlimited.

    Default: 1800

    -logtostderr

    Log to standard error instead of files

    Default: true

    -skip_headers

    If true, avoid header prefixes in the log messages.

    Default: false

    -skip_log_headers

    If true, avoid headers when opening log files.

    Default: false

    -stderrthreshold

    Logs at or above this threshold go to stderr.

    Default: 2

    -v

    Number for the log level verbosity.

    Default: 0

    -vmodule

    Comma-separated list of pattern=N settings for file-filtered logging.

    Default: empty


    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/reference/worker-configuration-reference.html b/v0.16/reference/worker-configuration-reference.html index ec49ba05dc..9d5ece31d4 100644 --- a/v0.16/reference/worker-configuration-reference.html +++ b/v0.16/reference/worker-configuration-reference.html @@ -1,4 +1,4 @@ - Worker config reference · Node Feature Discovery

    Configuration file reference of nfd-worker

    Table of contents

    1. core
      1. core.sleepInterval
      2. core.featureSources
      3. core.labelSources
      4. core.sources
      5. core.labelWhiteList
      6. core.noPublish
      7. core.klog
    2. sources
      1. sources.cpu
      2. sources.kernel
      3. sources.local
      4. sources.local.hooksEnabled
      5. sources.pci
      6. sources.usb
      7. sources.custom

    See the sample configuration file for a full example configuration.

    core

    The core section contains common configuration settings that are not specific to any particular feature source.

    core.sleepInterval

    core.sleepInterval specifies the interval between consecutive passes of feature (re-)detection, and thus also the interval between node re-labeling. A non-positive value implies infinite sleep interval, i.e. no re-detection or re-labeling is done.

    Default: 60s

    Example:

    core:
    +        Worker config reference · Node Feature Discovery                      

    Configuration file reference of nfd-worker

    Table of contents

    1. core
      1. core.sleepInterval
      2. core.featureSources
      3. core.labelSources
      4. core.sources
      5. core.labelWhiteList
      6. core.noPublish
      7. core.klog
    2. sources
      1. sources.cpu
      2. sources.kernel
      3. sources.local
      4. sources.local.hooksEnabled
      5. sources.pci
      6. sources.usb
      7. sources.custom

    See the sample configuration file for a full example configuration.

    core

    The core section contains common configuration settings that are not specific to any particular feature source.

    core.sleepInterval

    core.sleepInterval specifies the interval between consecutive passes of feature (re-)detection, and thus also the interval between node re-labeling. A non-positive value implies infinite sleep interval, i.e. no re-detection or re-labeling is done.

    Default: 60s

    Example:

    core:
       sleepInterval: 60s
     

    core.featureSources

    core.featureSources specifies the list of enabled feature sources. A special value all enables all sources. Prefixing a source name with - indicates that the source will be disabled instead - this is only meaningful when used in conjunction with all. This option allows completely disabling the feature detection so that neither standard feature labels are generated nor the raw feature data is available for custom rule processing.

    Default: [all]

    Example:

    core:
       # Enable all but cpu and local sources
    @@ -68,4 +68,4 @@
               matchExpressions:
                 class: {op: In, value: ["0200"]}
                 vendor: {op: In, value: ["8086"]}
    -

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file +

    Node Feature Discovery
    v0.16
    Versions
    GitHub
    Homepage
    Issues
    Download

    This Software is under the terms of Apache License 2.0.
    \ No newline at end of file diff --git a/v0.16/search.html b/v0.16/search.html index ede5b2eabd..fd1d01a475 100644 --- a/v0.16/search.html +++ b/v0.16/search.html @@ -1 +1 @@ - Search · Node Feature Discovery

    Searching


      Node Feature Discovery
      v0.16
      Versions
      GitHub
      Homepage
      Issues
      Download

      This Software is under the terms of Apache License 2.0.
      \ No newline at end of file + Search · Node Feature Discovery

      Searching


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/sitemap.xml b/v0.16/sitemap.xml index da1e738a94..3da2e5d885 100644 --- a/v0.16/sitemap.xml +++ b/v0.16/sitemap.xml @@ -1 +1 @@ - https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/image-variants.html 0.6 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/get-started/ 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/get-started/introduction.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/master-commandline-reference.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/features.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/ 0.5 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/kustomize.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/get-started/quick-start.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/worker-commandline-reference.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/using-labels.html 0.8 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/helm.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/master-configuration-reference.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/ 0.1 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-master.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/operator.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/ 0.1 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/worker-configuration-reference.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-worker.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/tls.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/developer-guide/ 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/topology-updater-commandline-reference.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-topology-updater.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/contributing/ 0.5 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/uninstallation.html 0.9 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/topology-updater-configuration-reference.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-gc.html 0.7 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/metrics.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/gc-commandline-reference.html 0.7 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/custom-resources.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/plugin-commandline-reference.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/customization-guide.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/versions.html 0.9 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/examples-and-demos.html 0.5 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/feature-gates.html 1.0 2024-08-09T04:27:24+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/kubectl-plugin.html 1.0 2024-08-09T04:27:24+00:00 \ No newline at end of file + https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/image-variants.html 0.6 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/get-started/ 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/get-started/introduction.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/master-commandline-reference.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/features.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/ 0.5 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/kustomize.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/get-started/quick-start.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/worker-commandline-reference.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/using-labels.html 0.8 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/helm.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/master-configuration-reference.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/ 0.1 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-master.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/operator.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/ 0.1 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/worker-configuration-reference.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-worker.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/tls.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/developer-guide/ 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/topology-updater-commandline-reference.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-topology-updater.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/contributing/ 0.5 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/uninstallation.html 0.9 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/topology-updater-configuration-reference.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/nfd-gc.html 0.7 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/deployment/metrics.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/gc-commandline-reference.html 0.7 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/custom-resources.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/plugin-commandline-reference.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/customization-guide.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/versions.html 0.9 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/examples-and-demos.html 0.5 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/reference/feature-gates.html 1.0 2024-08-09T08:22:40+00:00 https://kubernetes-sigs.github.com/node-feature-discovery/v0.16/usage/kubectl-plugin.html 1.0 2024-08-09T08:22:40+00:00 \ No newline at end of file diff --git a/v0.16/usage/custom-resources.html b/v0.16/usage/custom-resources.html index 1065a83f47..79114d275c 100644 --- a/v0.16/usage/custom-resources.html +++ b/v0.16/usage/custom-resources.html @@ -1,4 +1,4 @@ - CRDs · Node Feature Discovery

        Custom Resources

        Table of contents

        1. NodeFeature
        2. NodeFeatureGroup
        3. NodeFeatureRule
        4. NodeResourceTopology

        NFD uses some Kubernetes custom resources.

        NodeFeature

        NodeFeature is an NFD-specific custom resource for communicating node features and node labeling requests. The nfd-master pod watches for NodeFeature objects, labels nodes as specified and uses the listed features as input when evaluating NodeFeatureRules. NodeFeature objects can be used for implementing 3rd party extensions (see customization guide for more details).

        apiVersion: nfd.k8s-sigs.io/v1alpha1
        +        CRDs · Node Feature Discovery                      

        Custom Resources

        Table of contents

        1. NodeFeature
        2. NodeFeatureGroup
        3. NodeFeatureRule
        4. NodeResourceTopology

        NFD uses some Kubernetes custom resources.

        NodeFeature

        NodeFeature is an NFD-specific custom resource for communicating node features and node labeling requests. The nfd-master pod watches for NodeFeature objects, labels nodes as specified and uses the listed features as input when evaluating NodeFeatureRules. NodeFeature objects can be used for implementing 3rd party extensions (see customization guide for more details).

        apiVersion: nfd.k8s-sigs.io/v1alpha1
         kind: NodeFeature
         metadata:
           labels:
        @@ -49,7 +49,7 @@
                 - feature: pci.device
                   matchExpressions:
                     vendor: {op: In, value: ["8086"]}
        -

        See the Customization guide for full documentation of the NodeFeatureRule resource and its usage.

        The deployment/nodefeaturerule/samples/ directory contains sample NodeFeatureRule objects that replicate the built-in default feature labels generated by NFD. The sample rules can be used as a base to customize NFD feature labels. To use them in place of the the NFD built-in labels, the corresponding feature source(s) of nfd-worker should be disabled with the core.labelSources configuration option.

        NodeResourceTopology

        When run with NFD-Topology-Updater, NFD creates NodeResourceTopology objects corresponding to node resource hardware topology such as:

        apiVersion: topology.node.k8s.io/v1alpha1
        +

        See the Customization guide for full documentation of the NodeFeatureRule resource and its usage.

        The deployment/nodefeaturerule/samples/ directory contains sample NodeFeatureRule objects that replicate the built-in default feature labels generated by NFD. The sample rules can be used as a base to customize NFD feature labels. To use them in place of the the NFD built-in labels, the corresponding feature source(s) of nfd-worker should be disabled with the core.labelSources configuration option.

        NodeResourceTopology

        When run with NFD-Topology-Updater, NFD creates NodeResourceTopology objects corresponding to node resource hardware topology such as:

        apiVersion: topology.node.k8s.io/v1alpha1
         kind: NodeResourceTopology
         metadata:
           name: node1
        @@ -88,4 +88,4 @@
                 capacity: 3
                 allocatable: 3
                 available: 3
        -

        The NodeResourceTopology objects created by NFD 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.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file +

        The NodeResourceTopology objects created by NFD 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.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/customization-guide.html b/v0.16/usage/customization-guide.html index 3aa8d72523..a60638ba00 100644 --- a/v0.16/usage/customization-guide.html +++ b/v0.16/usage/customization-guide.html @@ -1,4 +1,4 @@ - Customization guide · Node Feature Discovery

        Customization guide

        Table of contents

        1. Overview
        2. NodeFeature custom resource
          1. A NodeFeature example
          2. Feature types
        3. NodeFeatureRule custom resource
          1. A NodeFeatureRule example
          2. Node tainting
        4. NodeFeatureGroup custom resource
          1. A NodeFeatureGroup example
        5. Local feature source
          1. An example
          2. Feature files
          3. Hooks
          4. Input format
          5. Mounts
        6. Custom feature source
          1. An example custom feature source configuration
          2. Additional configuration directory
        7. Node labels
        8. Feature rule format
          1. Fields
          2. Available features
          3. Templating
          4. Backreferences
          5. Examples

        Overview

        NFD provides multiple extension points for vendor and application specific labeling:

        • NodeFeature objects can be used to communicate "raw" node features and node labeling requests to nfd-master.
        • NodeFeatureRule objects provide a way to deploy custom labeling rules via the Kubernetes API.
        • local feature source of nfd-worker creates labels by reading text files and executing hooks.
        • custom feature source of nfd-worker creates labels based on user-specified rules.

        NodeFeature custom resource

        NodeFeature objects provide a way for 3rd party extensions to advertise custom features, both as "raw" features that serve as input to NodeFeatureRule objects and as feature labels directly.

        Note that RBAC rules must be created for each extension for them to be able to create and manipulate NodeFeature objects in their namespace.

        The NodeFeature CRD API can be disabled with the NodeFeatureAPI feature gate (-feature-gates NodeFeatureAPI=false on command line). The -feature-gates command line flag must be specified for both nfd-master and nfd-worker as it will enable the gRPC communication between them. Note that the gRPC API is DEPRECATED and will be removed in a future release, at which point the NodeFeature API cannot be disabled.

        A NodeFeature example

        Consider the following referential example:

        apiVersion: nfd.k8s-sigs.io/v1alpha1
        +        Customization guide · Node Feature Discovery                      

        Customization guide

        Table of contents

        1. Overview
        2. NodeFeature custom resource
          1. A NodeFeature example
          2. Feature types
        3. NodeFeatureRule custom resource
          1. A NodeFeatureRule example
          2. Node tainting
        4. NodeFeatureGroup custom resource
          1. A NodeFeatureGroup example
        5. Local feature source
          1. An example
          2. Feature files
          3. Hooks
          4. Input format
          5. Mounts
        6. Custom feature source
          1. An example custom feature source configuration
          2. Additional configuration directory
        7. Node labels
        8. Feature rule format
          1. Fields
          2. Available features
          3. Templating
          4. Backreferences
          5. Examples

        Overview

        NFD provides multiple extension points for vendor and application specific labeling:

        • NodeFeature objects can be used to communicate "raw" node features and node labeling requests to nfd-master.
        • NodeFeatureRule objects provide a way to deploy custom labeling rules via the Kubernetes API.
        • local feature source of nfd-worker creates labels by reading text files and executing hooks.
        • custom feature source of nfd-worker creates labels based on user-specified rules.

        NodeFeature custom resource

        NodeFeature objects provide a way for 3rd party extensions to advertise custom features, both as "raw" features that serve as input to NodeFeatureRule objects and as feature labels directly.

        Note that RBAC rules must be created for each extension for them to be able to create and manipulate NodeFeature objects in their namespace.

        The NodeFeature CRD API can be disabled with the NodeFeatureAPI feature gate (-feature-gates NodeFeatureAPI=false on command line). The -feature-gates command line flag must be specified for both nfd-master and nfd-worker as it will enable the gRPC communication between them. Note that the gRPC API is DEPRECATED and will be removed in a future release, at which point the NodeFeature API cannot be disabled.

        A NodeFeature example

        Consider the following referential example:

        apiVersion: nfd.k8s-sigs.io/v1alpha1
         kind: NodeFeature
         metadata:
           labels:
        @@ -45,7 +45,7 @@
                 - feature: kernel.config
                   matchExpressions:
                     X86: {op: In, value: ["y"]}
        -

        It specifies one rule which creates node label feature.node.kubernetes.io/my-sample-feature=true if both of the following conditions are true (matchFeatures implements a logical AND over the matchers):

        • The dummy network driver module has been loaded
        • X86 option in kernel config is set to =y

        Create a NodeFeatureRule with a yaml file:

        kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.3/examples/nodefeaturerule.yaml
        +

        It specifies one rule which creates node label feature.node.kubernetes.io/my-sample-feature=true if both of the following conditions are true (matchFeatures implements a logical AND over the matchers):

        • The dummy network driver module has been loaded
        • X86 option in kernel config is set to =y

        Create a NodeFeatureRule with a yaml file:

        kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.4/examples/nodefeaturerule.yaml
         

        Now, on X86 platforms the feature label appears after doing modprobe dummy on a system and correspondingly the label is removed after rmmod dummy. Note a re-labeling delay up to the sleep-interval of nfd-worker (1 minute by default).

        See Feature rule format for detailed description of available fields and how to write labeling rules.

        Node tainting

        This feature is experimental.

        In some circumstances, it is desirable to keep nodes with specialized hardware away from running general workload and instead leave them for workloads that need the specialized hardware. One way to achieve it is to taint the nodes with the specialized hardware and add corresponding toleration to pods that require the special hardware. NFD offers node tainting functionality which is disabled by default. User can define one or more custom taints via the taints field of the NodeFeatureRule CR. The same rule-based mechanism is applied here and the NFD taints only rule matching nodes.

        To enable the tainting feature, --enable-taints flag needs to be set to true. If the flag --enable-taints is set to false (i.e. disabled), taints defined in the NodeFeatureRule CR have no effect and will be ignored by the NFD master.

        See documentation of the taints field for detailed description how to specify taints in the NodeFeatureRule object.

        NOTE: Before enabling any taints, make sure to edit nfd-worker daemonset to tolerate the taints to be created. Otherwise, already running pods that do not tolerate the taint are evicted immediately from the node including the nfd-worker pod.

        NodeFeatureGroup custom resource

        NodeFeatureGroup API is an alpha feature and disabled by default in NFD version v0.16. Use the NodeFeatureAPI feature gate to enable it.

        NodeFeatureGroup objects provide a way to create node groups that share the same set of features. The NodeFeatureGroup object spec consists of a list of NodeFeatureRule that follow the same format as the NodeFeatureRule, but the difference in this case is that nodes that match any of the rules in the NodeFeatureGroup will be listed in the NodeFeatureGroup status.

        A NodeFeatureGroup example

        Consider the following referential example:

        apiVersion: nfd.k8s-sigs.io/v1alpha1
         kind: NodeFeatureGroup
         metadata:
        @@ -62,7 +62,7 @@
             - name: node-1
             - name: node-2
             - name: node-3
        -

        The object specifies a group of nodes that share the same kernel.version.major (Linux kernel v6.x).

        Create a NodeFeatureGroup with a yaml file:

        kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.3/examples/nodefeaturegroup.yaml
        +

        The object specifies a group of nodes that share the same kernel.version.major (Linux kernel v6.x).

        Create a NodeFeatureGroup with a yaml file:

        kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/v0.16.4/examples/nodefeaturegroup.yaml
         

        See Feature rule format for detailed description of available fields and how to write group filtering rules.

        Local feature source

        NFD-Worker has a special feature source named local which is an integration point for external feature detectors. It provides a mechanism for pluggable extensions, allowing the creation of new user-specific features and even overriding built-in labels.

        The local feature source has two methods for detecting features, feature files and hooks (hooks are deprecated and slated for removal in NFD v0.17). The features discovered by the local source can further be used in label rules specified in NodeFeatureRule objects and the custom feature source.

        NOTE: Be careful when creating and/or updating hook or feature files while NFD is running. To avoid race conditions you should write into a temporary file, and atomically create/update the original file by doing a file rename operation. NFD ignores dot files, so temporary file can be written to the same directory and renamed (.my.feature -> my.feature) once file is complete. Both file names should (obviously) be unique for the given application.

        An example

        Consider a plaintext file /etc/kubernetes/node-feature-discovery/features.d/my-features having the following contents (or alternatively a shell script /etc/kubernetes/node-feature-discovery/source.d/my-hook.sh having the following stdout output):

        feature.node.kubernetes.io/my-feature.1
         feature.node.kubernetes.io/my-feature.2=myvalue
         vendor.io/my-feature.3=456
        @@ -124,7 +124,7 @@
             - feature: kernel.loadedmodule
               matchExpressions:
                 e1000: {op: Exists}
        -

        This simple rule will create feature.node.kubenernetes.io/e1000.present=true label if the e1000 kernel module has been loaded.

        The samples/custom-rules kustomize overlay sample contains an example for deploying a custom rule from a ConfigMap.

        Node labels

        Feature labels have the following format:

        <namespace>/<name> = <value>
        +

        This simple rule will create feature.node.kubenernetes.io/e1000.present=true label if the e1000 kernel module has been loaded.

        The samples/custom-rules kustomize overlay sample contains an example for deploying a custom rule from a ConfigMap.

        Node labels

        Feature labels have the following format:

        <namespace>/<name> = <value>
         

        The namespace part (i.e. prefix) of the labels is controlled by nfd:

        • All built-in labels use feature.node.kubernetes.io.
        • Namespaces may be excluded with the -deny-label-ns command line flag of nfd-master
          • To allow specific namespaces that were denied, you can use -extra-label-ns command line flag of nfd-master. e.g: nfd-master -deny-label-ns="*" -extra-label-ns=example.com

        Feature rule format

        This section describes the rule format used in NodeFeatureRule objects and in the configuration of the custom feature source.

        It is based on a generic feature matcher that covers all features discovered by nfd-worker. The rules rely on a unified data model of the available features and a generic expression-based format. Features that can be used in the rules are described in detail in available features below.

        Take this rule as a referential example:

            - name: "my feature rule"
               labels:
                 "feature.node.kubernetes.io/my-special-feature": "my-value"
        @@ -366,4 +366,4 @@
               - pci.device:
                   vendor: "0fff"
                   device: "abcd"
        -

        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file +

        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/examples-and-demos.html b/v0.16/usage/examples-and-demos.html index 5c59deb322..66e2ab7d05 100644 --- a/v0.16/usage/examples-and-demos.html +++ b/v0.16/usage/examples-and-demos.html @@ -1 +1 @@ - Examples and demos · Node Feature Discovery

        Examples and demos

        Table of contents

        1. Demos
          1. Usage demo
          2. Demo use case

        This page contains usage examples and demos.

        Demos

        Usage demo

        asciicast

        Demo use case

        A demo on the benefits of using node feature discovery can be found in the source code repository under demo/.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file + Examples and demos · Node Feature Discovery

        Examples and demos

        Table of contents

        1. Demos
          1. Usage demo
          2. Demo use case

        This page contains usage examples and demos.

        Demos

        Usage demo

        asciicast

        Demo use case

        A demo on the benefits of using node feature discovery can be found in the source code repository under demo/.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/features.html b/v0.16/usage/features.html index 08031ef4e3..8f8239b42c 100644 --- a/v0.16/usage/features.html +++ b/v0.16/usage/features.html @@ -1,2 +1,2 @@ - Feature labels · Node Feature Discovery

        Feature labels

        Table of contents

        1. Built-in labels
          1. CPU
          2. Kernel
          3. Memory
          4. Network
          5. PCI
          6. USB
          7. Storage
          8. System
          9. Custom
        2. User defined labels
        3. Extended resources

        Features are advertised as labels in the Kubernetes Node object.

        Built-in labels

        Label creation in nfd-worker is performed by a set of separate modules called label sources. The core.labelSources configuration option (or -label-sources flag) of nfd-worker controls which sources to enable for label generation.

        All built-in labels use the feature.node.kubernetes.io label namespace and have the following format.

        feature.node.kubernetes.io/<feature> = <value>
        -

        NOTE: Consecutive runs of nfd-worker will update the labels on a given node. If features are not discovered on a consecutive run, the corresponding label will be removed. This includes any restrictions placed on the consecutive run, such as restricting discovered features with the -label-whitelist flag of nfd-master or core.labelWhiteList option of nfd-worker.

        CPU

        Feature name Value Description
        cpu-cpuid.<cpuid-flag> true CPU capability is supported. NOTE: the capability might be supported but not enabled.
        cpu-cpuid.<cpuid-attribute> string CPU attribute value
        cpu-hardware_multithreading true Hardware multithreading, such as Intel HTT, enabled (number of logical CPUs is greater than physical CPUs)
        cpu-coprocessor.nx_gzip true Nest Accelerator for GZIP is supported(Power).
        cpu-power.sst_bf.enabled true Intel SST-BF (Intel Speed Select Technology - Base frequency) enabled
        cpu-pstate.status string The status of the Intel pstate driver when in use and enabled, either ‘active' or ‘passive'.
        cpu-pstate.turbo bool Set to ‘true' if turbo frequencies are enabled in Intel pstate driver, set to ‘false' if they have been disabled.
        cpu-pstate.scaling_governor string The value of the Intel pstate scaling_governor when in use, either ‘powersave' or ‘performance'.
        cpu-cstate.enabled bool Set to ‘true' if cstates are set in the intel_idle driver, otherwise set to ‘false'. Unset if intel_idle cpuidle driver is not active.
        cpu-security.sgx.enabled true Set to ‘true' if Intel SGX is enabled in BIOS (based on a non-zero sum value of SGX EPC section sizes).
        cpu-security.se.enabled true Set to ‘true' if IBM Secure Execution for Linux (IBM Z & LinuxONE) is available and enabled (requires /sys/firmware/uv/prot_virt_host facility)
        cpu-security.tdx.enabled true Set to ‘true' if Intel TDX is available on the host and has been enabled (requires /sys/module/kvm_intel/parameters/tdx).
        cpu-security.tdx.protected true Set to ‘true' if Intel TDX was used to start the guest node, based on the existence of the "TDX_GUEST" information as part of cpuid features.
        cpu-security.sev.enabled true Set to ‘true' if ADM SEV is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev).
        cpu-security.sev.es.enabled true Set to ‘true' if ADM SEV-ES is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_es).
        cpu-security.sev.snp.enabled true Set to ‘true' if ADM SEV-SNP is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_snp).
        cpu-model.vendor_id string Comparable CPU vendor ID.
        cpu-model.family int CPU family.
        cpu-model.id int CPU model number.

        The CPU label source is configurable, see worker configuration and sources.cpu configuration options for details.

        X86 CPUID flags (partial list)

        Flag Description
        ADX Multi-Precision Add-Carry Instruction Extensions (ADX)
        AESNI Advanced Encryption Standard (AES) New Instructions (AES-NI)
        APX_F Intel Advanced Performance Extensions (APX)
        AVX10 Intel Advanced Vector Extensions 10 (AVX10)
        AVX10_256, AVX10_512 Intel AVX10 256-bit and 512-bit vector support
        AVX Advanced Vector Extensions (AVX)
        AVX2 Advanced Vector Extensions 2 (AVX2)
        AVXIFMA AVX-IFMA instructions
        AVXVNNI AVX (VEX encoded) VNNI neural network instructions
        AMXBF16 Advanced Matrix Extension, tile multiplication operations on BFLOAT16 numbers
        AMXINT8 Advanced Matrix Extension, tile multiplication operations on 8-bit integers
        AMXFP16 Advanced Matrix Extension, tile multiplication operations on FP16 numbers
        AMXTILE Advanced Matrix Extension, base tile architecture support
        AVX512BF16 AVX-512 BFLOAT16 instructions
        AVX512BITALG AVX-512 bit Algorithms
        AVX512BW AVX-512 byte and word Instructions
        AVX512CD AVX-512 conflict detection instructions
        AVX512DQ AVX-512 doubleword and quadword instructions
        AVX512ER AVX-512 exponential and reciprocal instructions
        AVX512F AVX-512 foundation
        AVX512FP16 AVX-512 FP16 instructions
        AVX512IFMA AVX-512 integer fused multiply-add instructions
        AVX512PF AVX-512 prefetch instructions
        AVX512VBMI AVX-512 vector bit manipulation instructions
        AVX512VBMI2 AVX-512 vector bit manipulation instructions, version 2
        AVX512VL AVX-512 vector length extensions
        AVX512VNNI AVX-512 vector neural network instructions
        AVX512VP2INTERSECT AVX-512 intersect for D/Q
        AVX512VPOPCNTDQ AVX-512 vector population count doubleword and quadword
        AVXNECONVERT AVX-NE-CONVERT instructions
        AVXVNNIINT8 AVX-VNNI-INT8 instructions
        CMPCCXADD CMPCCXADD instructions
        ENQCMD Enqueue Command
        GFNI Galois Field New Instructions
        HYPERVISOR Running under hypervisor
        MSRLIST Read/Write List of Model Specific Registers
        PREFETCHI PREFETCHIT0/1 instructions
        VAES AVX-512 vector AES instructions
        VPCLMULQDQ Carry-less multiplication quadword
        WRMSRNS Non-Serializing Write to Model Specific Register

        By default, the following CPUID flags have been blacklisted: AVX10 (use AVX10_VERSION instead), BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SSE, SSE2, SSE3, SSE4, SSE42, SSSE3 and TDX_GUEST. See sources.cpu configuration options to change the behavior.

        See the full list in github.com/klauspost/cpuid.

        X86 CPUID attributes

        Attribute Description
        AVX10_VERSION AVX10 vector ISA version (if supported)

        Arm CPUID flags (partial list)

        Flag Description
        IDIVA Integer divide instructions available in ARM mode
        IDIVT Integer divide instructions available in Thumb mode
        THUMB Thumb instructions
        FASTMUL Fast multiplication
        VFP Vector floating point instruction extension (VFP)
        VFPv3 Vector floating point extension v3
        VFPv4 Vector floating point extension v4
        VFPD32 VFP with 32 D-registers
        HALF Half-word loads and stores
        EDSP DSP extensions
        NEON NEON SIMD instructions
        LPAE Large Physical Address Extensions

        Arm64 CPUID flags (partial list)

        Flag Description
        AES Announcing the Advanced Encryption Standard
        EVSTRM Event Stream Frequency Features
        FPHP Half Precision(16bit) Floating Point Data Processing Instructions
        ASIMDHP Half Precision(16bit) Asimd Data Processing Instructions
        ATOMICS Atomic Instructions to the A64
        ASIMRDM Support for Rounding Double Multiply Add/Subtract
        PMULL Optional Cryptographic and CRC32 Instructions
        JSCVT Perform Conversion to Match Javascript
        DCPOP Persistent Memory Support

        Kernel

        Feature Value Description
        kernel-config.<option> true Kernel config option is enabled (set ‘y' or ‘m'). Default options are NO_HZ, NO_HZ_IDLE, NO_HZ_FULL and PREEMPT
        kernel-selinux.enabled true Selinux is enabled on the node
        kernel-version.full string Full kernel version as reported by /proc/sys/kernel/osrelease (e.g. ‘4.5.6-7-g123abcde')
        kernel-version.major string First component of the kernel version (e.g. ‘4')
        kernel-version.minor string Second component of the kernel version (e.g. ‘5')
        kernel-version.revision string Third component of the kernel version (e.g. ‘6')

        The kernel label source is configurable, see worker configuration and sources.kernel configuration options for details.

        Memory

        Feature Value Description
        memory-numa true Multiple memory nodes i.e. NUMA architecture detected
        memory-nv.present true NVDIMM device(s) are present
        memory-nv.dax true NVDIMM region(s) configured in DAX mode are present
        memory-swap.enabled true Swap is enabled on the node

        Network

        Feature Value Description
        network-sriov.capable true Single Root Input/Output Virtualization (SR-IOV) enabled Network Interface Card(s) present
        network-sriov.configured true SR-IOV virtual functions have been configured

        PCI

        Feature Value Description
        pci-<device label>.present true PCI device is detected
        pci-<device label>.sriov.capable true Single Root Input/Output Virtualization (SR-IOV) enabled PCI device present
             

        <device label> is format is configurable and set to <class>_<vendor> by default. For more more details about configuration of the pci labels, see sources.pci options and worker configuration instructions.

        USB

        Feature Value Description
        usb-<device label>.present true USB device is detected

        <device label> is format is configurable and set to <class>_<vendor>_<device> by default. For more more details about configuration of the usb labels, see sources.usb options and worker configuration instructions.

        Storage

        Feature Value Description
        storage-nonrotationaldisk true Non-rotational disk, like SSD, is present in the node

        System

        Feature Value Description
        system-os_release.ID string Operating system identifier
        system-os_release.VERSION_ID string Operating system version identifier (e.g. ‘6.7')
        system-os_release.VERSION_ID.major string First component of the OS version id (e.g. ‘6')
        system-os_release.VERSION_ID.minor string Second component of the OS version id (e.g. ‘7')

        Custom

        The custom label source is designed for creating user defined labels. However, it has a few statically defined built-in labels:

        Feature Value Description
        custom-rdma.capable true The node has an RDMA capable Network adapter
        custom-rdma.enabled true The node has the needed RDMA modules loaded to run RDMA traffic
             

        User defined labels

        NFD has many extension points for creating vendor and application specific labels. See the customization guide for detailed documentation.

        Extended resources

        NFD is able to create extended resources, see the NodeFeatureRule CRD and its extendedResources field for more details.

        Note that NFD is not a replacement for the usage of device plugins.

        An example use-case for extended resources could be based on custom feature (created e.g. with feature files that exposes the node SGX EPC memory section size. This value will then be turned into an extended resource of the node, allowing PODs to request that resource and the Kubernetes scheduler to schedule such PODs to only those nodes which have a sufficient capacity of said resource left.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file + Feature labels · Node Feature Discovery

        Feature labels

        Table of contents

        1. Built-in labels
          1. CPU
          2. Kernel
          3. Memory
          4. Network
          5. PCI
          6. USB
          7. Storage
          8. System
          9. Custom
        2. User defined labels
        3. Extended resources

        Features are advertised as labels in the Kubernetes Node object.

        Built-in labels

        Label creation in nfd-worker is performed by a set of separate modules called label sources. The core.labelSources configuration option (or -label-sources flag) of nfd-worker controls which sources to enable for label generation.

        All built-in labels use the feature.node.kubernetes.io label namespace and have the following format.

        feature.node.kubernetes.io/<feature> = <value>
        +

        NOTE: Consecutive runs of nfd-worker will update the labels on a given node. If features are not discovered on a consecutive run, the corresponding label will be removed. This includes any restrictions placed on the consecutive run, such as restricting discovered features with the -label-whitelist flag of nfd-master or core.labelWhiteList option of nfd-worker.

        CPU

        Feature name Value Description
        cpu-cpuid.<cpuid-flag> true CPU capability is supported. NOTE: the capability might be supported but not enabled.
        cpu-cpuid.<cpuid-attribute> string CPU attribute value
        cpu-hardware_multithreading true Hardware multithreading, such as Intel HTT, enabled (number of logical CPUs is greater than physical CPUs)
        cpu-coprocessor.nx_gzip true Nest Accelerator for GZIP is supported(Power).
        cpu-power.sst_bf.enabled true Intel SST-BF (Intel Speed Select Technology - Base frequency) enabled
        cpu-pstate.status string The status of the Intel pstate driver when in use and enabled, either ‘active' or ‘passive'.
        cpu-pstate.turbo bool Set to ‘true' if turbo frequencies are enabled in Intel pstate driver, set to ‘false' if they have been disabled.
        cpu-pstate.scaling_governor string The value of the Intel pstate scaling_governor when in use, either ‘powersave' or ‘performance'.
        cpu-cstate.enabled bool Set to ‘true' if cstates are set in the intel_idle driver, otherwise set to ‘false'. Unset if intel_idle cpuidle driver is not active.
        cpu-security.sgx.enabled true Set to ‘true' if Intel SGX is enabled in BIOS (based on a non-zero sum value of SGX EPC section sizes).
        cpu-security.se.enabled true Set to ‘true' if IBM Secure Execution for Linux (IBM Z & LinuxONE) is available and enabled (requires /sys/firmware/uv/prot_virt_host facility)
        cpu-security.tdx.enabled true Set to ‘true' if Intel TDX is available on the host and has been enabled (requires /sys/module/kvm_intel/parameters/tdx).
        cpu-security.tdx.protected true Set to ‘true' if Intel TDX was used to start the guest node, based on the existence of the "TDX_GUEST" information as part of cpuid features.
        cpu-security.sev.enabled true Set to ‘true' if ADM SEV is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev).
        cpu-security.sev.es.enabled true Set to ‘true' if ADM SEV-ES is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_es).
        cpu-security.sev.snp.enabled true Set to ‘true' if ADM SEV-SNP is available on the host and has been enabled (requires /sys/module/kvm_amd/parameters/sev_snp).
        cpu-model.vendor_id string Comparable CPU vendor ID.
        cpu-model.family int CPU family.
        cpu-model.id int CPU model number.

        The CPU label source is configurable, see worker configuration and sources.cpu configuration options for details.

        X86 CPUID flags (partial list)

        Flag Description
        ADX Multi-Precision Add-Carry Instruction Extensions (ADX)
        AESNI Advanced Encryption Standard (AES) New Instructions (AES-NI)
        APX_F Intel Advanced Performance Extensions (APX)
        AVX10 Intel Advanced Vector Extensions 10 (AVX10)
        AVX10_256, AVX10_512 Intel AVX10 256-bit and 512-bit vector support
        AVX Advanced Vector Extensions (AVX)
        AVX2 Advanced Vector Extensions 2 (AVX2)
        AVXIFMA AVX-IFMA instructions
        AVXVNNI AVX (VEX encoded) VNNI neural network instructions
        AMXBF16 Advanced Matrix Extension, tile multiplication operations on BFLOAT16 numbers
        AMXINT8 Advanced Matrix Extension, tile multiplication operations on 8-bit integers
        AMXFP16 Advanced Matrix Extension, tile multiplication operations on FP16 numbers
        AMXTILE Advanced Matrix Extension, base tile architecture support
        AVX512BF16 AVX-512 BFLOAT16 instructions
        AVX512BITALG AVX-512 bit Algorithms
        AVX512BW AVX-512 byte and word Instructions
        AVX512CD AVX-512 conflict detection instructions
        AVX512DQ AVX-512 doubleword and quadword instructions
        AVX512ER AVX-512 exponential and reciprocal instructions
        AVX512F AVX-512 foundation
        AVX512FP16 AVX-512 FP16 instructions
        AVX512IFMA AVX-512 integer fused multiply-add instructions
        AVX512PF AVX-512 prefetch instructions
        AVX512VBMI AVX-512 vector bit manipulation instructions
        AVX512VBMI2 AVX-512 vector bit manipulation instructions, version 2
        AVX512VL AVX-512 vector length extensions
        AVX512VNNI AVX-512 vector neural network instructions
        AVX512VP2INTERSECT AVX-512 intersect for D/Q
        AVX512VPOPCNTDQ AVX-512 vector population count doubleword and quadword
        AVXNECONVERT AVX-NE-CONVERT instructions
        AVXVNNIINT8 AVX-VNNI-INT8 instructions
        CMPCCXADD CMPCCXADD instructions
        ENQCMD Enqueue Command
        GFNI Galois Field New Instructions
        HYPERVISOR Running under hypervisor
        MSRLIST Read/Write List of Model Specific Registers
        PREFETCHI PREFETCHIT0/1 instructions
        VAES AVX-512 vector AES instructions
        VPCLMULQDQ Carry-less multiplication quadword
        WRMSRNS Non-Serializing Write to Model Specific Register

        By default, the following CPUID flags have been blacklisted: AVX10 (use AVX10_VERSION instead), BMI1, BMI2, CLMUL, CMOV, CX16, ERMS, F16C, HTT, LZCNT, MMX, MMXEXT, NX, POPCNT, RDRAND, RDSEED, RDTSCP, SGX, SSE, SSE2, SSE3, SSE4, SSE42, SSSE3 and TDX_GUEST. See sources.cpu configuration options to change the behavior.

        See the full list in github.com/klauspost/cpuid.

        X86 CPUID attributes

        Attribute Description
        AVX10_VERSION AVX10 vector ISA version (if supported)

        Arm CPUID flags (partial list)

        Flag Description
        IDIVA Integer divide instructions available in ARM mode
        IDIVT Integer divide instructions available in Thumb mode
        THUMB Thumb instructions
        FASTMUL Fast multiplication
        VFP Vector floating point instruction extension (VFP)
        VFPv3 Vector floating point extension v3
        VFPv4 Vector floating point extension v4
        VFPD32 VFP with 32 D-registers
        HALF Half-word loads and stores
        EDSP DSP extensions
        NEON NEON SIMD instructions
        LPAE Large Physical Address Extensions

        Arm64 CPUID flags (partial list)

        Flag Description
        AES Announcing the Advanced Encryption Standard
        EVSTRM Event Stream Frequency Features
        FPHP Half Precision(16bit) Floating Point Data Processing Instructions
        ASIMDHP Half Precision(16bit) Asimd Data Processing Instructions
        ATOMICS Atomic Instructions to the A64
        ASIMRDM Support for Rounding Double Multiply Add/Subtract
        PMULL Optional Cryptographic and CRC32 Instructions
        JSCVT Perform Conversion to Match Javascript
        DCPOP Persistent Memory Support

        Kernel

        Feature Value Description
        kernel-config.<option> true Kernel config option is enabled (set ‘y' or ‘m'). Default options are NO_HZ, NO_HZ_IDLE, NO_HZ_FULL and PREEMPT
        kernel-selinux.enabled true Selinux is enabled on the node
        kernel-version.full string Full kernel version as reported by /proc/sys/kernel/osrelease (e.g. ‘4.5.6-7-g123abcde')
        kernel-version.major string First component of the kernel version (e.g. ‘4')
        kernel-version.minor string Second component of the kernel version (e.g. ‘5')
        kernel-version.revision string Third component of the kernel version (e.g. ‘6')

        The kernel label source is configurable, see worker configuration and sources.kernel configuration options for details.

        Memory

        Feature Value Description
        memory-numa true Multiple memory nodes i.e. NUMA architecture detected
        memory-nv.present true NVDIMM device(s) are present
        memory-nv.dax true NVDIMM region(s) configured in DAX mode are present
        memory-swap.enabled true Swap is enabled on the node

        Network

        Feature Value Description
        network-sriov.capable true Single Root Input/Output Virtualization (SR-IOV) enabled Network Interface Card(s) present
        network-sriov.configured true SR-IOV virtual functions have been configured

        PCI

        Feature Value Description
        pci-<device label>.present true PCI device is detected
        pci-<device label>.sriov.capable true Single Root Input/Output Virtualization (SR-IOV) enabled PCI device present
             

        <device label> is format is configurable and set to <class>_<vendor> by default. For more more details about configuration of the pci labels, see sources.pci options and worker configuration instructions.

        USB

        Feature Value Description
        usb-<device label>.present true USB device is detected

        <device label> is format is configurable and set to <class>_<vendor>_<device> by default. For more more details about configuration of the usb labels, see sources.usb options and worker configuration instructions.

        Storage

        Feature Value Description
        storage-nonrotationaldisk true Non-rotational disk, like SSD, is present in the node

        System

        Feature Value Description
        system-os_release.ID string Operating system identifier
        system-os_release.VERSION_ID string Operating system version identifier (e.g. ‘6.7')
        system-os_release.VERSION_ID.major string First component of the OS version id (e.g. ‘6')
        system-os_release.VERSION_ID.minor string Second component of the OS version id (e.g. ‘7')

        Custom

        The custom label source is designed for creating user defined labels. However, it has a few statically defined built-in labels:

        Feature Value Description
        custom-rdma.capable true The node has an RDMA capable Network adapter
        custom-rdma.enabled true The node has the needed RDMA modules loaded to run RDMA traffic
             

        User defined labels

        NFD has many extension points for creating vendor and application specific labels. See the customization guide for detailed documentation.

        Extended resources

        NFD is able to create extended resources, see the NodeFeatureRule CRD and its extendedResources field for more details.

        Note that NFD is not a replacement for the usage of device plugins.

        An example use-case for extended resources could be based on custom feature (created e.g. with feature files that exposes the node SGX EPC memory section size. This value will then be turned into an extended resource of the node, allowing PODs to request that resource and the Kubernetes scheduler to schedule such PODs to only those nodes which have a sufficient capacity of said resource left.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/index.html b/v0.16/usage/index.html index f1a45e79db..7bbf7c4a34 100644 --- a/v0.16/usage/index.html +++ b/v0.16/usage/index.html @@ -1 +1 @@ - Usage · Node Feature Discovery

        Usage

        Usage instructions.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file + Usage · Node Feature Discovery

        Usage

        Usage instructions.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/kubectl-plugin.html b/v0.16/usage/kubectl-plugin.html index ba7c8ee5d9..ed57aef28f 100644 --- a/v0.16/usage/kubectl-plugin.html +++ b/v0.16/usage/kubectl-plugin.html @@ -1,4 +1,4 @@ - Kubectl plugin · Node Feature Discovery

        Kubectl plugin

        Table of contents

        1. Overview
          1. Validate
          2. Test
          3. DryRun

        Developer Preview This feature is currently in developer preview and subject to change. It is not recommended to use it in production environments.

        Overview

        The kubectl plugin kubectl nfd can be used to validate/dryrun and test NodeFeatureRule objects. It can be installed with the following command:

        git clone https://github.com/kubernetes-sigs/node-feature-discovery
        +        Kubectl plugin · Node Feature Discovery                      

        Kubectl plugin

        Table of contents

        1. Overview
          1. Validate
          2. Test
          3. DryRun

        Developer Preview This feature is currently in developer preview and subject to change. It is not recommended to use it in production environments.

        Overview

        The kubectl plugin kubectl nfd can be used to validate/dryrun and test NodeFeatureRule objects. It can be installed with the following command:

        git clone https://github.com/kubernetes-sigs/node-feature-discovery
         cd node-feature-discovery
         make build-kubectl-nfd
         KUBECTL_PATH=/usr/local/bin/
        @@ -13,4 +13,4 @@
         *** Labels ***
         vendor.io/my-sample-feature=true
         NodeFeatureRule "examples/nodefeaturerule.yaml" is valid for NodeFeature "examples/nodefeature.yaml"
        -

        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file +

        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/nfd-gc.html b/v0.16/usage/nfd-gc.html index 1979e1da7e..15571fa81a 100644 --- a/v0.16/usage/nfd-gc.html +++ b/v0.16/usage/nfd-gc.html @@ -1 +1 @@ - NFD-Garbage-Collector · Node Feature Discovery

        NFD-GC


        NFD-GC (NFD Garbage-Collector) is preferably run as a Kubernetes deployment with one replica. It makes sure that all NodeFeature and NodeResourceTopology objects have corresponding nodes and removes stale objects for non-existent nodes.

        The daemon watches for Node deletion events and removes NodeFeature and NodeResourceTopology objects upon them. It also runs periodically to make sure no node delete event was missed and to remove any NodeFeature or NodeResourceTopology objects that were created without corresponding node. The default garbage collector interval is set to 1h which is the value when no -gc-interval is specified.

        Configuration

        In Helm deployments (see garbage collector parameters) NFD-GC will only be deployed when featureGates.NodeFeatureAPI or topologyUpdater.enable is set to true.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file + NFD-Garbage-Collector · Node Feature Discovery

        NFD-GC


        NFD-GC (NFD Garbage-Collector) is preferably run as a Kubernetes deployment with one replica. It makes sure that all NodeFeature and NodeResourceTopology objects have corresponding nodes and removes stale objects for non-existent nodes.

        The daemon watches for Node deletion events and removes NodeFeature and NodeResourceTopology objects upon them. It also runs periodically to make sure no node delete event was missed and to remove any NodeFeature or NodeResourceTopology objects that were created without corresponding node. The default garbage collector interval is set to 1h which is the value when no -gc-interval is specified.

        Configuration

        In Helm deployments (see garbage collector parameters) NFD-GC will only be deployed when featureGates.NodeFeatureAPI or topologyUpdater.enable is set to true.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/nfd-master.html b/v0.16/usage/nfd-master.html index 4d26ace5b4..bf47907c2e 100644 --- a/v0.16/usage/nfd-master.html +++ b/v0.16/usage/nfd-master.html @@ -1,2 +1,2 @@ - NFD-Master · Node Feature Discovery

        NFD-Master


        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.

        NodeFeature controller

        The NodeFeature Controller uses NodeFeature objects as the input for the NodeFeatureRule processing pipeline. In addition, any labels listed in the NodeFeature object are created on the node (note the allowed label namespaces are controlled).

        NodeFeatureRule controller

        NFD-Master acts as the controller for NodeFeatureRule 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 NodeFeature objects.

        NOTE: when gRPC (DEPRECATED) is used for communicating the features (by setting the flag -feature-gates NodeFeatureAPI=false 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 core.sleepInterval 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 NodeFeature API is used.

        Master configuration

        NFD-Master supports dynamic configuration through a configuration file. The default location is /etc/kubernetes/node-feature-discovery/nfd-master.conf, but, this can be changed by specifying the-config command line flag. Configuration file is re-read whenever it is modified which makes run-time re-configuration of nfd-master straightforward.

        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.

        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:

        kubectl -n ${NFD_NS} edit configmap nfd-master-conf
        -

        In Helm deployments, Master pod parameter master.config can be used to edit the respective configuration.

        See nfd-master configuration file reference for more details. The (empty-by-default) example config contains all available configuration options and can be used as a reference for creating a configuration.

        Deployment notes

        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.

        For High Availability, you should increase the replica count of the deployment object. You should also look into adding inter-pod 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.

        Note: When NFD-Master is intended to run with more than one replica, it is advised to use -enable-leader-election flag. This flag turns on leader election for NFD-Master and let only one replica to act on changes in NodeFeature and NodeFeatureRule objects.

        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.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file + NFD-Master · Node Feature Discovery

        NFD-Master


        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.

        NodeFeature controller

        The NodeFeature Controller uses NodeFeature objects as the input for the NodeFeatureRule processing pipeline. In addition, any labels listed in the NodeFeature object are created on the node (note the allowed label namespaces are controlled).

        NodeFeatureRule controller

        NFD-Master acts as the controller for NodeFeatureRule 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 NodeFeature objects.

        NOTE: when gRPC (DEPRECATED) is used for communicating the features (by setting the flag -feature-gates NodeFeatureAPI=false 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 core.sleepInterval 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 NodeFeature API is used.

        Master configuration

        NFD-Master supports dynamic configuration through a configuration file. The default location is /etc/kubernetes/node-feature-discovery/nfd-master.conf, but, this can be changed by specifying the-config command line flag. Configuration file is re-read whenever it is modified which makes run-time re-configuration of nfd-master straightforward.

        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.

        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:

        kubectl -n ${NFD_NS} edit configmap nfd-master-conf
        +

        In Helm deployments, Master pod parameter master.config can be used to edit the respective configuration.

        See nfd-master configuration file reference for more details. The (empty-by-default) example config contains all available configuration options and can be used as a reference for creating a configuration.

        Deployment notes

        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.

        For High Availability, you should increase the replica count of the deployment object. You should also look into adding inter-pod 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.

        Note: When NFD-Master is intended to run with more than one replica, it is advised to use -enable-leader-election flag. This flag turns on leader election for NFD-Master and let only one replica to act on changes in NodeFeature and NodeFeatureRule objects.

        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.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/nfd-topology-updater.html b/v0.16/usage/nfd-topology-updater.html index 23e535a86c..f8c7e42273 100644 --- a/v0.16/usage/nfd-topology-updater.html +++ b/v0.16/usage/nfd-topology-updater.html @@ -1,2 +1,2 @@ - NFD-Topology-Updater · Node Feature Discovery

        NFD-Topology-Updater


        NFD-Topology-Updater is preferably run as a Kubernetes DaemonSet. This assures re-examination on regular intervals and/or per pod life-cycle events, capturing changes in the allocated resources and hence the allocatable resources on a per-zone basis by updating NodeResourceTopology custom resources. It makes sure that new NodeResourceTopology instances are created for each new nodes that get added to the cluster.

        Because of the design and implementation of Kubernetes, only resources exclusively allocated to Guaranteed Quality of Service pods will be accounted. This includes CPU cores, memory and devices.

        When run as a daemonset, nodes are re-examined for the allocated resources (to determine the information of the allocatable resources on a per-zone basis where a zone can be a NUMA node) at an interval specified using the -sleep-interval option. The default sleep interval is set to 60s which is the value when no -sleep-interval is specified. The re-examination can be disabled by setting the sleep-interval to 0.

        Another option is to configure the updater to update the allocated resources per pod life-cycle events. The updater will monitor the checkpoint file stated in -kubelet-state-dir and triggers an update for every change occurs in the files.

        In addition, it can avoid examining specific allocated resources given a configuration of resources to exclude via -excludeList

        Deployment Notes

        Kubelet PodResource API with the GetAllocatableResources functionality enabled is a prerequisite for nfd-topology-updater to be able to run (i.e. Kubernetes v1.21 or later is required).

        Preceding Kubernetes v1.23, the kubelet must be started with --feature-gates=KubeletPodResourcesGetAllocatable=true.

        Starting from Kubernetes v1.23, the KubeletPodResourcesGetAllocatable feature gate. is enabled by default

        Topology-Updater Configuration

        NFD-Topology-Updater supports configuration through a configuration file. The default location is /etc/kubernetes/node-feature-discovery/topology-updater.conf, but, this can be changed by specifying the-config command line flag.

        NOTE: unlike nfd-worker, dynamic configuration updates are not supported.

        Topology-Updater 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.

        The provided nfd-topology-updater deployment templates create an empty configmap and mount it inside the nfd-topology-updater containers. In kustomize deployments, configuration can be edited with:

        kubectl -n ${NFD_NS} edit configmap nfd-topology-updater-conf
        -

        In Helm deployments, Topology Updater parameters toplogyUpdater.config can be used to edit the respective configuration.

        See nfd-topology-updater configuration file reference for more details. The (empty-by-default) example config contains all available configuration options and can be used as a reference for creating a configuration.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file + NFD-Topology-Updater · Node Feature Discovery

        NFD-Topology-Updater


        NFD-Topology-Updater is preferably run as a Kubernetes DaemonSet. This assures re-examination on regular intervals and/or per pod life-cycle events, capturing changes in the allocated resources and hence the allocatable resources on a per-zone basis by updating NodeResourceTopology custom resources. It makes sure that new NodeResourceTopology instances are created for each new nodes that get added to the cluster.

        Because of the design and implementation of Kubernetes, only resources exclusively allocated to Guaranteed Quality of Service pods will be accounted. This includes CPU cores, memory and devices.

        When run as a daemonset, nodes are re-examined for the allocated resources (to determine the information of the allocatable resources on a per-zone basis where a zone can be a NUMA node) at an interval specified using the -sleep-interval option. The default sleep interval is set to 60s which is the value when no -sleep-interval is specified. The re-examination can be disabled by setting the sleep-interval to 0.

        Another option is to configure the updater to update the allocated resources per pod life-cycle events. The updater will monitor the checkpoint file stated in -kubelet-state-dir and triggers an update for every change occurs in the files.

        In addition, it can avoid examining specific allocated resources given a configuration of resources to exclude via -excludeList

        Deployment Notes

        Kubelet PodResource API with the GetAllocatableResources functionality enabled is a prerequisite for nfd-topology-updater to be able to run (i.e. Kubernetes v1.21 or later is required).

        Preceding Kubernetes v1.23, the kubelet must be started with --feature-gates=KubeletPodResourcesGetAllocatable=true.

        Starting from Kubernetes v1.23, the KubeletPodResourcesGetAllocatable feature gate. is enabled by default

        Topology-Updater Configuration

        NFD-Topology-Updater supports configuration through a configuration file. The default location is /etc/kubernetes/node-feature-discovery/topology-updater.conf, but, this can be changed by specifying the-config command line flag.

        NOTE: unlike nfd-worker, dynamic configuration updates are not supported.

        Topology-Updater 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.

        The provided nfd-topology-updater deployment templates create an empty configmap and mount it inside the nfd-topology-updater containers. In kustomize deployments, configuration can be edited with:

        kubectl -n ${NFD_NS} edit configmap nfd-topology-updater-conf
        +

        In Helm deployments, Topology Updater parameters toplogyUpdater.config can be used to edit the respective configuration.

        See nfd-topology-updater configuration file reference for more details. The (empty-by-default) example config contains all available configuration options and can be used as a reference for creating a configuration.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/nfd-worker.html b/v0.16/usage/nfd-worker.html index 912c8f291f..cb1bd9ac87 100644 --- a/v0.16/usage/nfd-worker.html +++ b/v0.16/usage/nfd-worker.html @@ -1,3 +1,3 @@ - NFD-Worker · Node Feature Discovery

        NFD-Worker


        NFD-Worker is preferably run as a Kubernetes DaemonSet. This assures re-labeling on regular intervals capturing changes in the system configuration and makes sure that new nodes are labeled as they are added to the cluster. Worker connects to the nfd-master service to advertise hardware features.

        When run as a daemonset, nodes are re-labeled at an default interval of 60s. This can be changed by using the core.sleepInterval config option.

        The worker configuration file is watched and re-read on every change which provides a mechanism of dynamic run-time reconfiguration. See worker configuration for more details.

        Worker configuration

        NFD-Worker supports dynamic configuration through a configuration file. The default location is /etc/kubernetes/node-feature-discovery/nfd-worker.conf, but, this can be changed by specifying the-config command line flag. Configuration file is re-read whenever it is modified which makes run-time re-configuration of nfd-worker straightforward.

        Worker 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.

        The provided nfd-worker deployment templates create an empty configmap and mount it inside the nfd-worker containers. In kustomize deployments, configuration can be edited with:

        kubectl -n ${NFD_NS} edit configmap nfd-worker-conf
        -

        In Helm deployments, Worker pod parameter worker.config can be used to edit the respective configuration.

        See nfd-worker configuration file reference for more details. The (empty-by-default) example config contains all available configuration options and can be used as a reference for creating a configuration.

        Configuration options can also be specified via the -options command line flag, in which case no mounts need to be used. The same format as in the config file must be used, i.e. JSON (or YAML). For example:

        -options='{"sources": { "pci": { "deviceClassWhitelist": ["12"] } } }'
        -

        Configuration options specified from the command line will override those read from the config file.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file + NFD-Worker · Node Feature Discovery

        NFD-Worker


        NFD-Worker is preferably run as a Kubernetes DaemonSet. This assures re-labeling on regular intervals capturing changes in the system configuration and makes sure that new nodes are labeled as they are added to the cluster. Worker connects to the nfd-master service to advertise hardware features.

        When run as a daemonset, nodes are re-labeled at an default interval of 60s. This can be changed by using the core.sleepInterval config option.

        The worker configuration file is watched and re-read on every change which provides a mechanism of dynamic run-time reconfiguration. See worker configuration for more details.

        Worker configuration

        NFD-Worker supports dynamic configuration through a configuration file. The default location is /etc/kubernetes/node-feature-discovery/nfd-worker.conf, but, this can be changed by specifying the-config command line flag. Configuration file is re-read whenever it is modified which makes run-time re-configuration of nfd-worker straightforward.

        Worker 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.

        The provided nfd-worker deployment templates create an empty configmap and mount it inside the nfd-worker containers. In kustomize deployments, configuration can be edited with:

        kubectl -n ${NFD_NS} edit configmap nfd-worker-conf
        +

        In Helm deployments, Worker pod parameter worker.config can be used to edit the respective configuration.

        See nfd-worker configuration file reference for more details. The (empty-by-default) example config contains all available configuration options and can be used as a reference for creating a configuration.

        Configuration options can also be specified via the -options command line flag, in which case no mounts need to be used. The same format as in the config file must be used, i.e. JSON (or YAML). For example:

        -options='{"sources": { "pci": { "deviceClassWhitelist": ["12"] } } }'
        +

        Configuration options specified from the command line will override those read from the config file.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file diff --git a/v0.16/usage/using-labels.html b/v0.16/usage/using-labels.html index 6f6ed7fd18..c24fd1dc68 100644 --- a/v0.16/usage/using-labels.html +++ b/v0.16/usage/using-labels.html @@ -1,4 +1,4 @@ - Using node labels · Node Feature Discovery

        Using node labels


        Nodes with specific features can be targeted using the nodeSelector field. The following example shows how to target nodes with Intel TurboBoost enabled.

        apiVersion: v1
        +        Using node labels · Node Feature Discovery                      

        Using node labels


        Nodes with specific features can be targeted using the nodeSelector field. The following example shows how to target nodes with Intel TurboBoost enabled.

        apiVersion: v1
         kind: Pod
         metadata:
           labels:
        @@ -10,4 +10,4 @@
               name: go1
           nodeSelector:
             feature.node.kubernetes.io/cpu-pstate.turbo: 'true'
        -

        For more details on targeting nodes, see node selection.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file +

        For more details on targeting nodes, see node selection.


        Node Feature Discovery
        v0.16
        Versions
        GitHub
        Homepage
        Issues
        Download

        This Software is under the terms of Apache License 2.0.
        \ No newline at end of file