Skip to content

About

Node feature discovery for Kubernetes

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.1k stars

Watchers

24 watching

Forks

Node Feature Discovery

Go Report Card Prow Build Prow E2E-Test

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.19.0

Kustomize

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

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.

Community

NFD is a SIG-Node subproject under the Kubernetes SIGs organization.

About

Node feature discovery for Kubernetes

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1.1k stars

Watchers

24 watching

Forks

Releases

Packages

Used by

Contributors

Languages