multus

by Startechnica

Helm chartv0.1.2App v3.8Apache-2.0Verified publisher

Multus CNI is a container network interface (CNI) plugin for Kubernetes that enables attaching multiple network interfaces to pods.

About this chart

Multus CNI Helm chart

Multus CNI is a container network interface (CNI) plugin for Kubernetes that enables attaching multiple network interfaces to pods. Typically, in Kubernetes each pod only has one network interface (apart from a loopback) -- with Multus CNI you can create a multi-homed pod that has multiple interfaces. This is accomplished by Multus CNI acting as a "meta-plugin", a CNI plugin that can call multiple other CNI plugins.

Overview of Multus CNI

This chart is not maintained by the upstream project and any issues with the chart should be raised here

TL;DR

$ helm repo add startechnica https://startechnica.github.io/apps
$ helm install my-release startechnica/multus

Prerequisites

  • Kubernetes 1.16+
  • Helm 3.2.0+

Installing the Chart

To install the chart with the release name my-release on my-release namespace:

$ helm repo add startechnica https://startechnica.github.io/apps
$ helm install my-release startechnica/multus --namespace my-release --create-namespace

These commands deploy Multus CNI on the Kubernetes cluster in the default configuration.

Tip: List all releases using helm list -A

Uninstalling the Chart

To uninstall/delete the my-release deployment:

$ helm delete my-release --namespace my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

Global parameters

NameDescriptionValue
global.imageRegistryGlobal Docker image registry""
global.imagePullSecretsGlobal Docker registry secret names as an array[]

Common parameters

NameDescriptionValue
nameOverrideString to partially override multus.fullname template (will maintain the release name)""
fullnameOverrideString to fully override multus.fullname template""
kubeVersionForce target Kubernetes version (using Helm capabilities if not set)""
clusterDomainKubernetes Cluster Domaincluster.local
extraDeployExtra objects to deploy (value evaluated as a template)[]
commonLabelsAdd labels to all the deployed resources{}
commonAnnotationsAdd annotations to all the deployed resources{}

Multus CNI parameters

NameDescriptionValue
image.registryMultus CNI image registrydocker.io
image.repositoryMultus CNI image repositorystartechnica/multus
image.tagMultus CNI image tag (immutable tags are recommended)1.21.5-debian-10-r3
image.pullPolicyMultus CNI image pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an array[]
image.debugSet to true if you would like to see extra information on logsfalse
hostAliasesDeployment pod host aliases[]
commandOverride default container command (useful when using custom images)[]
argsOverride default container args (useful when using custom images)[]
extraEnvVarsExtra environment variables to be set on Multus CNI containers[]
extraEnvVarsCMConfigMap with extra environment variables""
extraEnvVarsSecretSecret with extra environment variables""

Multus CNI deployment parameters

NameDescriptionValue
podLabelsAdditional labels for Multus CNI pods{}
podAnnotationsAnnotations for Multus CNI pods{}
podAffinityPresetPod affinity preset. Ignored if affinity is set. Allowed values: soft or hard""
podAntiAffinityPresetPod anti-affinity preset. Ignored if affinity is set. Allowed values: soft or hardsoft
nodeAffinityPreset.typeNode affinity preset type. Ignored if affinity is set. Allowed values: soft or hard""
nodeAffinityPreset.keyNode label key to match Ignored if affinity is set.""
nodeAffinityPreset.valuesNode label values to match. Ignored if affinity is set.[]
affinityAffinity for pod assignment{}
nodeSelectorNode labels for pod assignment. Evaluated as a template.{}
tolerationsTolerations for pod assignment. Evaluated as a template.{}
priorityClassNamePriority class name""
podSecurityContext.enabledEnabled Multus CNI pods' Security Contextfalse
podSecurityContext.fsGroupSet Multus CNI pod's Security Context fsGroup1001
podSecurityContext.sysctlssysctl settings of the Multus CNI pods[]
containerSecurityContext.enabledEnabled Multus CNI containers' Security Contextfalse
containerSecurityContext.runAsUserSet Multus CNI container's Security Context runAsUser1001
containerSecurityContext.runAsNonRootSet Multus CNI container's Security Context runAsNonRoottrue
containerPorts.httpSets http port inside Multus CNI container8080
containerPorts.httpsSets https port inside Multus CNI container""
resources.limitsThe resources limits for the Multus CNI container{}
resources.requestsThe requested resources for the Multus CNI container{}
livenessProbe.enabledEnable livenessProbetrue
livenessProbe.initialDelaySecondsInitial delay seconds for livenessProbe30
livenessProbe.periodSecondsPeriod seconds for livenessProbe10
livenessProbe.timeoutSecondsTimeout seconds for livenessProbe5
livenessProbe.failureThresholdFailure threshold for livenessProbe6
livenessProbe.successThresholdSuccess threshold for livenessProbe1
readinessProbe.enabledEnable readinessProbetrue
readinessProbe.initialDelaySecondsInitial delay seconds for readinessProbe5
readinessProbe.periodSecondsPeriod seconds for readinessProbe5
readinessProbe.timeoutSecondsTimeout seconds for readinessProbe3
readinessProbe.failureThresholdFailure threshold for readinessProbe3
readinessProbe.successThresholdSuccess threshold for readinessProbe1
customLivenessProbeOverride default liveness probe{}
customReadinessProbeOverride default readiness probe{}
autoscaling.enabledEnable autoscaling for Multus CNI deploymentfalse
autoscaling.minReplicasMinimum number of replicas to scale back""
autoscaling.maxReplicasMaximum number of replicas to scale out""
autoscaling.targetCPUTarget CPU utilization percentage""
autoscaling.targetMemoryTarget Memory utilization percentage""
extraVolumesArray to add extra volumes[]
extraVolumeMountsArray to add extra mount[]
serviceAccount.createEnable creation of ServiceAccount for multus podfalse
serviceAccount.nameThe name of the ServiceAccount to use.""
serviceAccount.annotationsAnnotations for service account. Evaluated as a template.{}
serviceAccount.autoMountAuto-mount the service account token in the podfalse
sidecarsSidecar parameters[]
sidecarSingleProcessNamespaceEnable sharing the process namespace with sidecarsfalse
initContainersExtra init containers[]
pdb.createCreated a PodDisruptionBudgetfalse
pdb.minAvailableMin number of pods that must still be available after the eviction1
pdb.maxUnavailableMax number of pods that can be unavailable after the eviction0

Custom Multus CNI application parameters

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

$ helm install my-release --set imagePullPolicy=Always startechnica/multus

The above command sets the imagePullPolicy to Always.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

$ helm install my-release startechnica/multus -f values.yaml

Tip: You can use the default values.yaml

Configuration and installation details

Adding extra environment variables

In case you want to add extra environment variables (useful for advanced operations like custom init scripts), you can use the extraEnvVars property.

extraEnvVars:
  - name: LOG_LEVEL
    value: error

Alternatively, you can use a ConfigMap or a Secret with the environment variables. To do so, use the extraEnvVarsCM or the extraEnvVarsSecret values.

Setting Pod's affinity

This chart allows you to set your custom affinity using the affinity param

Deploy multus with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has multus 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 chartmultus is pinned at v0.1.2 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