From 2215cfa7c6b4abb7ea2f3166ec206cbdf06c1191 Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Wed, 9 Sep 2020 14:38:00 +0300 Subject: [PATCH] docs: add landing page and quick-start guide --- docs/get-started/index.md | 44 +++++++++++++++++++ docs/get-started/quick-start.md | 78 +++++++++++++++++++++++++++++++++ docs/index.html | 1 + docs/index.md | 5 --- 4 files changed, 123 insertions(+), 5 deletions(-) create mode 100644 docs/get-started/index.md create mode 100644 docs/get-started/quick-start.md create mode 100644 docs/index.html delete mode 100644 docs/index.md diff --git a/docs/get-started/index.md b/docs/get-started/index.md new file mode 100644 index 000000000..79a480018 --- /dev/null +++ b/docs/get-started/index.md @@ -0,0 +1,44 @@ +--- +title: "Get started" +layout: default +sort: 1 +--- + +# Node Feature Discovery + +Welcome to Node Feature Discovery -- a Kubernetes add-on for detecting hardware +features and system configuration! + +Continue to: + +- **[Introduction](get-started/introduction.md)** for more details on the + project. + +- **[Quick start](get-started/quick-start.md)** for quick step-by-step + instructions on how to get NFD running on your cluster. + +## Quick-start -- the short-short version + +```bash +$ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/master/nfd-master.yaml.template + namespace/node-feature-discovery created +... + +$ kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/master/nfd-worker-daemonset.yaml.template + daemonset.apps/nfd-worker created + +$ kubectl -n node-feature-discovery get all + NAME READY STATUS RESTARTS AGE + pod/nfd-master-555458dbbc-sxg6w 1/1 Running 0 56s + pod/nfd-worker-mjg9f 1/1 Running 0 17s +... + +$ kubectl get no -o json | jq .items[].metadata.labels + { + "beta.kubernetes.io/arch": "amd64", + "beta.kubernetes.io/os": "linux", + "feature.node.kubernetes.io/cpu-cpuid.ADX": "true", + "feature.node.kubernetes.io/cpu-cpuid.AESNI": "true", +... + +``` diff --git a/docs/get-started/quick-start.md b/docs/get-started/quick-start.md new file mode 100644 index 000000000..67411560b --- /dev/null +++ b/docs/get-started/quick-start.md @@ -0,0 +1,78 @@ +--- +title: "Quick Start" +layout: default +sort: 2 +--- + +# Quick Start + +Minimal steps to deploy latest released version of NFD in your cluster. + +## Installation + +Deploy nfd-master -- creates a new namespace, service and required RBAC rules + +```bash +kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/master/nfd-master.yaml.template +``` + +Deploy nfd-worker as a daemonset + +```bash +kubectl apply -f https://raw.githubusercontent.com/kubernetes-sigs/node-feature-discovery/master/nfd-worker-daemonset.yaml.template +``` + +## Verify + +Wait until NFD master and worker are running. + +```bash +$ kubectl -n node-feature-discovery get ds,deploy +NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE +daemonset.apps/nfd-worker 3 3 3 3 3 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 + +```bash +$ kubectl get no -o json | jq .items[].metadata.labels +{ + "beta.kubernetes.io/arch": "amd64", + "beta.kubernetes.io/os": "linux", + "feature.node.kubernetes.io/cpu-cpuid.ADX": "true", + "feature.node.kubernetes.io/cpu-cpuid.AESNI": "true", + "feature.node.kubernetes.io/cpu-cpuid.AVX": "true", +... +``` + +## Use Node Labels + +Create a pod targeting a distinguishing feature (select a valid feature from +the list printed on the previous step) + +```bash +$ cat << EOF | kubectl apply -f - +apiVersion: v1 +kind: Pod +metadata: + name: feature-dependent-pod +spec: + containers: + - image: k8s.gcr.io/pause + name: pause + nodeSelector: + # Select a valid feature + feature.node.kubernetes.io/cpu-cpuid.AESNI: 'true' +EOF +pod/feature-dependent-pod created +``` + +See that the pod is running on a desired node + +```bash +$ 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 +``` diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..c6ae8aa73 --- /dev/null +++ b/docs/index.html @@ -0,0 +1 @@ + diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 40598cbb1..000000000 --- a/docs/index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Node Feature Discovery Documentation -layout: default ---- -***UNDER CONSTRUCTION...***