Manual deployment

Table of contents

  1. Manual deployment
  2. Requirements
  3. Manual deployment
    1. Verify
  4. Uninstallation

Requirements

  1. Linux (x86_64/Arm64/Arm)
  2. kubectl (properly set up and configured to work with your Kubernetes cluster)

Manual deployment

Get the source code

git clone -b master https://github.com/kubernetes-sigs/node-feature-discovery-operator

Deploy the operator

You can use the IMAGE_TAG environment variable to specify the container image to use.

IMAGE_TAG=gcr.io/k8s-staging-nfd/node-feature-discovery-operator:master
make deploy

By default the operator will watch NodeFeatureDiscovery objects only in the namespace where the operator is deployed in. This is specified by the WATCH_NAMESPACE env variable in the operator deployment manifest. If unset the operator will watch ALL namespaces.

Create a NodeFeatureDiscovery instance

kubectl apply -f config/samples/nfd.kubernetes.io_v1_nodefeaturediscovery.yaml

Verify

The Operator will deploy NFD based on the information on the NodeFeatureDiscovery CR instance, after a moment you should be able to see

$ kubectl -n node-feature-discovery-operator get ds,deploy
NAME                        DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/nfd-worker   3         3         3       3            3           <none>          5s
NAME                         READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/nfd-master   1/1     1            1           17s

Check that NFD feature labels have been created

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

Uninstallation

If you followed the deployment instructions from the above you can simply do:

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

Optionally, you can also remove the namespace:

kubectl delete ns nfd-operator

See the node-feature-discovery-operator and OLM project documentation for instructions for uninstalling the operator and operator lifecycle manager, respectively.