node-access

by christianhuth

Helm chartv1.4.1App 1.38.0Verified publisher

A Helm chart to deploy workload to gain direct access to the host of the Kubernetes cluster

About this chart

node-access

A Helm chart to deploy workload to gain direct access to the host of the Kubernetes cluster

TL;DR;

helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/node-access

Or install it from the OCI registry:

helm install my-release oci://ghcr.io/christianhuth/helm-charts/node-access

Introduction

This chart bootstraps one or multiple Pods to access the host system of a Kubernetes cluster using the Helm package manager.

Prerequisites

  • Kubernetes 1.19+

Installing the Chart

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

helm repo add christianhuth https://charts.christianhuth.de
helm repo update
helm install my-release christianhuth/node-access

The chart is also published as an OCI artifact which can be installed like this:

helm install my-release oci://ghcr.io/christianhuth/helm-charts/node-access

These commands deploys one or multiple Pods to access the host system of the Kubernetes cluster in the default configuration. The Values section lists the values that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall the my-release deployment:

helm uninstall my-release

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

Values

KeyTypeDefaultDescription
deploymentStrategyobject{}Update strategy for the deployment, used if nodeAccess.accessMode is deployment
fullnameOverridestring""String to fully override "node-access.fullname"
image.pullPolicystring"Always"image pull policy
image.registrystring"docker.io"image registory
image.repositorystring"busybox"image repository
image.tagstring"1.38.0"Overrides the image tag
imagePullSecretslist[]If defined, uses a Secret to pull an image from a private Docker registry or repository.
nameOverridestring""Provide a name in place of node-access
nodeAccess.accessModestring"deployment"How to deploy the Pods to access the host system: daemonset or deployment
nodeAccess.hostPathslist[]List of additional paths on the host that should be mounted into the container
nodeAccess.nodePlacement.affinityobject{}Affinity settings for pod assignment
nodeAccess.nodePlacement.nodeNamestring""Request to schedule this pod onto a specific node
nodeAccess.nodePlacement.nodeSelectorobject{}Node labels for pod assignment
nodeAccess.nodePlacement.tolerationslist[]Toleration labels for pod assignment
nodeAccess.nodePlacement.topologySpreadConstraintslist[]how a group of pods ought to spread across topology domains
podAnnotationsobject{}Annotations to be added to the pods
podSecurityContextobjectsee values.yamlpod-level security context
replicaCountint1Number of replicas. Only used if accessNode.accessMode equals deployment
resourcesobjectsee values.yamlResource limits and requests for the controller pods.
revisionHistoryLimitint10The number of old ReplicaSets to retain
securityContextobjectsee values.yamlcontainer-level security context
serviceAccount.annotationsobject{}Annotations to add to the service account
serviceAccount.createbooltrueSpecifies whether a service account should be created
serviceAccount.namestring""The name of the service account to use. If not set and create is true, a name is generated using the fullname template
updateStrategyobject{}Update strategy for the DaemonSet, used if nodeAccess.accessMode is daemonset

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

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

helm install my-release -f values.yaml christianhuth/node-access

Deploying to a specific Node

If you want to deploy only to one specific Node you can simply define the nodeName using --set nodeAccess.nodePlacement.nodeName=<NODE_NAME> or through the values file:

nodeAccess:
  accessMode: deployment
  nodePlacement:
    nodeName: <NODE_NAME>

Deploying to all Nodes

If you want to deploy Pods to access all Nodes, the easiest way is to use a DaemonSet instead of a Deployment using --set nodeAccess.accessMode="daemonset" or through the values file:

nodeAccess:
  accessMode: daemonset

Deploying to a subset of Nodes

If you want to deploy Pods to a subset of Nodes you can use a DaemonSet and a NodeSelector:

nodeAccess:
  accessMode: daemonset
  nodePlacement:
    nodeSelector:
      key: value

Deploy node-access with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has node-access 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 chartnode-access is pinned at v1.4.1 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