Node Feature Discovery

Node Feature Discovery (NFD) detects hardware features and system configuration
on each node in a Kubernetes cluster and advertises them as node labels,
annotations, and extended resources. Schedulers, operators, and controllers can
then use those labels to place workloads on nodes with the right CPU
instructions, GPUs, network adapters, or kernel features.
For full documentation see the Documentation site.
Using a release? Read the docs for your version, not this branch.
The master branch reflects work in progress and may not match your deployment.
The documentation site has a list of versions.
How it works
NFD runs three components:
| Component |
Runs as |
What it does |
nfd-worker |
DaemonSet (every node) |
Discovers hardware and OS features; publishes them as NodeFeature objects |
nfd-master |
Deployment |
Reads NodeFeature objects, evaluates rules, writes labels and annotations to Node objects, and maintains NodeFeatureGroup status |
nfd-gc |
Deployment |
Removes stale NodeFeature and NodeResourceTopology objects when nodes are deleted |
Quick start
Requires Kubernetes v1.24 or later.
Helm
helm install -n node-feature-discovery --create-namespace nfd \
oci://registry.k8s.io/nfd/charts/node-feature-discovery --version 0.20.1
Kustomize
kubectl apply -k "https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.20.1"
Verify
$ kubectl -n node-feature-discovery get all
NAME READY STATUS RESTARTS AGE
pod/nfd-gc-565fc85d9b-94jpj 1/1 Running 0 18s
pod/nfd-master-6796d89d7b-qccrq 1/1 Running 0 18s
pod/nfd-worker-nwdp6 1/1 Running 0 18s
...
$ kubectl get no -o json | jq ".items[].metadata.labels"
{
"kubernetes.io/arch": "amd64",
"kubernetes.io/os": "linux",
"feature.node.kubernetes.io/cpu-cpuid.ADX": "true",
"feature.node.kubernetes.io/cpu-cpuid.AESNI": "true",
...
}
NFD has labeled every node with the features it detected. You can now use those
labels in a Pod’s nodeSelector:
nodeSelector:
feature.node.kubernetes.io/cpu-cpuid.AESNI: "true"
Compatibility
NFD is compatible with Kubernetes v1.24 and later. The two most recent NFD
minor releases are supported. See the versions reference for the
full deprecation policy.
NFD is a SIG-Node
subproject under the Kubernetes SIGs organization.
评论