kubernetes-nmstate

by nmstate

Helm chartv0.87.3App v0.87.3Apache-2.0Verified publisher

Kubernetes operator for declarative node network configuration using nmstate and NetworkManager

About this chart

kubernetes-nmstate

kubernetes-nmstate is a Kubernetes operator for declarative node network configuration using nmstate and NetworkManager. It reports the current network state of cluster nodes and applies desired configuration through Kubernetes custom resources.

Prerequisites

Install Helm (>= 3.8) and ensure NetworkManager is running on the cluster nodes. See the arbitrary cluster guide for node requirements.

kubernetes-nmstate is a cluster singleton: only one release of this chart per cluster is supported. The chart creates cluster-scoped resources with fixed names (such as the nmstate-operator ClusterRole and ClusterRoleBinding), so installing a second release would conflict with the first one.

Install

Choose a chart version from Artifact Hub. Use that version without a leading v for <version> in the commands below.

helm install nmstate oci://quay.io/nmstate/kubernetes-nmstate \
  --version <version> \
  --namespace nmstate \
  --create-namespace

This deploys the operator and, by default (nmstate.enabled=true), an NMState custom resource that makes the operator deploy the kubernetes-nmstate handler on all nodes.

If your cluster enforces Pod Security admission and the handler namespace equals the release namespace, the operator labels the namespace for privileged workloads automatically.

Values

Helm validates chart values against the packaged values.schema.json schema. Use --set-string when a string value looks like a number or boolean, such as a numeric namespace name. Fields inside nmstate.spec are validated by the NMState CRD.

KeyDefaultDescription
operator.image""Operator image; empty means quay.io/nmstate/kubernetes-nmstate-operator:<appVersion>
operator.pullPolicyIfNotPresentOperator image pull policy
handler.image""Handler image; empty means quay.io/nmstate/kubernetes-nmstate-handler:<appVersion>
handler.pullPolicyIfNotPresentHandler image pull policy
handler.namespacenmstateNamespace the operator deploys the handler into
handler.prefix""Optional name prefix for the handler resources deployed by the operator; when empty no HANDLER_PREFIX env is rendered
handler.imageEnvVarRELATED_IMAGE_HANDLER_IMAGEName of the operator env var carrying the handler image
plugin.image""Console plugin image for downstream distributions; when empty no PLUGIN_IMAGE env is rendered
monitoring.namespacemonitoringCluster monitoring namespace
createNamespacefalseEmit a Namespace object for the release namespace (use helm install --create-namespace instead)
nmstate.enabledtrueCreate the NMState custom resource (named nmstate) at install time
nmstate.spec{}Passthrough for NMState spec fields (nodeSelector, tolerations, ...)

Upgrade

Helm does not modify custom resource definitions shipped in the chart's crds/ directory on upgrade. Apply the NMState CRD manually first. GitHub release tags use a leading v, unlike Helm chart versions:

kubectl apply -f https://github.com/nmstate/kubernetes-nmstate/releases/download/v<version>/nmstate.io_nmstates.yaml
helm upgrade nmstate oci://quay.io/nmstate/kubernetes-nmstate \
  --version <version> \
  --namespace nmstate

Uninstall

helm uninstall nmstate --namespace nmstate --wait

Usage and support

Deploy kubernetes-nmstate with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has kubernetes-nmstate on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkubernetes-nmstate is pinned at v0.87.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply