2020-09-08 07:17:40 +00:00
|
|
|
---
|
|
|
|
title: "Master Cmdline Reference"
|
|
|
|
layout: default
|
|
|
|
sort: 2
|
|
|
|
---
|
|
|
|
|
|
|
|
# NFD-Master Commandline Flags
|
|
|
|
{: .no_toc }
|
|
|
|
|
|
|
|
## Table of Contents
|
|
|
|
{: .no_toc .text-delta }
|
|
|
|
|
|
|
|
1. TOC
|
|
|
|
{:toc}
|
|
|
|
|
|
|
|
---
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
To quickly view available command line flags execute `nfd-master -help`.
|
2020-09-08 07:17:40 +00:00
|
|
|
In a docker container:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
docker run {{ site.container_image }} nfd-master -help
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -h, -help
|
2020-09-08 07:17:40 +00:00
|
|
|
|
|
|
|
Print usage and exit.
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -version
|
2020-09-08 07:17:40 +00:00
|
|
|
|
|
|
|
Print version and exit.
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -prune
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-prune` flag is a sub-command like option for cleaning up the cluster. It
|
2020-09-08 07:17:40 +00:00
|
|
|
causes nfd-master to remove all NFD related labels, annotations and extended
|
|
|
|
resources from all Node objects of the cluster and exit.
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -port
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-port` flag specifies the TCP port that nfd-master listens for incoming requests.
|
2020-09-08 07:17:40 +00:00
|
|
|
|
|
|
|
Default: 8080
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -port=443
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -instance
|
2021-02-03 17:49:02 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-instance` flag makes it possible to run multiple NFD deployments in
|
2021-02-03 17:49:02 +00:00
|
|
|
parallel. In practice, it separates the node annotations between deployments so
|
|
|
|
that each of them can store metadata independently. The instance name must
|
|
|
|
start and end with an alphanumeric character and may only contain alphanumeric
|
|
|
|
characters, `-`, `_` or `.`.
|
|
|
|
|
|
|
|
Default: *empty*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -instance=network
|
2021-02-03 17:49:02 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -ca-file
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-ca-file` is one of the three flags (together with `-cert-file` and
|
|
|
|
`-key-file`) controlling master-worker mutual TLS authentication on the
|
2020-09-08 07:17:40 +00:00
|
|
|
nfd-master side. This flag specifies the TLS root certificate that is used for
|
|
|
|
authenticating incoming connections. NFD-Worker side needs to have matching key
|
|
|
|
and cert files configured in order for the incoming requests to be accepted.
|
|
|
|
|
|
|
|
Default: *empty*
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
Note: Must be specified together with `-cert-file` and `-key-file`
|
2020-09-08 07:17:40 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -ca-file=/opt/nfd/ca.crt -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -cert-file
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-cert-file` is one of the three flags (together with `-ca-file` and
|
|
|
|
`-key-file`) controlling master-worker mutual TLS authentication on the
|
2020-09-08 07:17:40 +00:00
|
|
|
nfd-master side. This flag specifies the TLS certificate presented for
|
|
|
|
authenticating outgoing traffic towards nfd-worker.
|
|
|
|
|
|
|
|
Default: *empty*
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
Note: Must be specified together with `-ca-file` and `-key-file`
|
2020-09-08 07:17:40 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key -ca-file=/opt/nfd/ca.crt
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -key-file
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-key-file` is one of the three flags (together with `-ca-file` and
|
|
|
|
`-cert-file`) controlling master-worker mutual TLS authentication on the
|
2020-09-08 07:17:40 +00:00
|
|
|
nfd-master side. This flag specifies the private key corresponding the given
|
2021-02-24 12:29:07 +00:00
|
|
|
certificate file (`-cert-file`) that is used for authenticating outgoing
|
2020-09-08 07:17:40 +00:00
|
|
|
traffic.
|
|
|
|
|
|
|
|
Default: *empty*
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
Note: Must be specified together with `-cert-file` and `-ca-file`
|
2020-09-08 07:17:40 +00:00
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -key-file=/opt/nfd/master.key -cert-file=/opt/nfd/master.crt -ca-file=/opt/nfd/ca.crt
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -verify-node-name
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-verify-node-name` flag controls the NodeName based authorization of
|
2020-09-08 07:17:40 +00:00
|
|
|
incoming requests and only has effect when mTLS authentication has been enabled
|
2021-02-24 12:29:07 +00:00
|
|
|
(with `-ca-file`, `-cert-file` and `-key-file`). If enabled, the worker node
|
2020-09-08 07:17:40 +00:00
|
|
|
name of the incoming must match with the CN in its TLS certificate. Thus,
|
|
|
|
workers are only able to label the node they are running on (or the node whose
|
|
|
|
certificate they present), and, each worker must have an individual
|
|
|
|
certificate.
|
|
|
|
|
|
|
|
Node Name based authorization is disabled by default and thus it is possible
|
|
|
|
for all nfd-worker pods in the cluster to use one shared certificate, making
|
|
|
|
NFD deployment much easier.
|
|
|
|
|
|
|
|
Default: *false*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -verify-node-name -ca-file=/opt/nfd/ca.crt \
|
|
|
|
-cert-file=/opt/nfd/master.crt -key-file=/opt/nfd/master.key
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -no-publish
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-no-publish` flag disables all communication with the Kubernetes API
|
2020-09-08 07:17:40 +00:00
|
|
|
server, making a "dry-run" flag for nfd-master. No Labels, Annotations or
|
|
|
|
ExtendedResources (or any other properties of any Kubernetes API objects) are
|
|
|
|
modified.
|
|
|
|
|
|
|
|
Default: *false*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -no-publish
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -label-whitelist
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-label-whitelist` specifies a regular expression for filtering feature
|
2020-09-08 07:17:40 +00:00
|
|
|
labels based on their name. Each label must match against the given reqular
|
|
|
|
expression in order to be published.
|
|
|
|
|
|
|
|
Note: The regular expression is only matches against the "basename" part of the
|
|
|
|
label, i.e. to the part of the name after '/'. The label namespace is omitted.
|
|
|
|
|
|
|
|
Default: *empty*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -label-whitelist='.*cpuid\.'
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -extra-label-ns
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-extra-label-ns` flag specifies a comma-separated list of allowed feature
|
2020-09-08 07:17:40 +00:00
|
|
|
label namespaces. By default, nfd-master only allows creating labels in the
|
|
|
|
default `feature.node.kubernetes.io` label namespace. This option can be used
|
|
|
|
to allow vendor-specific namespaces for custom labels from the local and custom
|
|
|
|
feature sources.
|
|
|
|
|
|
|
|
The same namespace control and this flag applies Extended Resources (created
|
2021-02-24 12:29:07 +00:00
|
|
|
with `-resource-labels`), too.
|
2020-09-08 07:17:40 +00:00
|
|
|
|
|
|
|
Default: *empty*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -extra-label-ns=vendor-1.com,vendor-2.io
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
### -resource-labels
|
2020-09-08 07:17:40 +00:00
|
|
|
|
2021-02-24 12:29:07 +00:00
|
|
|
The `-resource-labels` flag specifies a comma-separated list of features to be
|
2020-09-08 07:17:40 +00:00
|
|
|
advertised as extended resources instead of labels. Features that have integer
|
|
|
|
values can be published as Extended Resources by listing them in this flag.
|
|
|
|
|
|
|
|
Default: *empty*
|
|
|
|
|
|
|
|
Example:
|
|
|
|
|
|
|
|
```bash
|
2021-02-24 12:29:07 +00:00
|
|
|
nfd-master -resource-labels=vendor-1.com/feature-1,vendor-2.io/feature-2
|
2020-09-08 07:17:40 +00:00
|
|
|
```
|