1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2024-12-14 11:57:51 +00:00

docs: add landing page and quick-start guide

This commit is contained in:
Markus Lehtonen 2020-09-09 14:38:00 +03:00
parent a08fb66fa7
commit 2215cfa7c6
4 changed files with 123 additions and 5 deletions

44
docs/get-started/index.md Normal file
View file

@ -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",
...
```

View file

@ -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 <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
```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 <none> <none>
```

1
docs/index.html Normal file
View file

@ -0,0 +1 @@
<meta http-equiv="refresh" content="0; URL='get-started/index.html'" />

View file

@ -1,5 +0,0 @@
---
title: Node Feature Discovery Documentation
layout: default
---
***UNDER CONSTRUCTION...***