node-bootstrap
by janip81
Declares external/physical nodes in values.yaml and serves a per-node kubeadm join script over HTTP, so joining a node to the cluster needs no CAPI infrastructure provider and minimal pre-install on the target machine
About this chart
node-bootstrap
Declares external/physical nodes in values.yaml and serves a per-node kubeadm join script over HTTP, so joining a node to the cluster needs no CAPI infrastructure provider and minimal pre-install on the target machine
Homepage: https://github.com/janip81/helm-charts/tree/main/charts/node-bootstrap
Maintainers
| Name | Url | |
|---|---|---|
| janip81 | [email protected] | https://github.com/janip81 |
Source Code
Overview
Deploys a small Go service that mints short-lived kubeadm bootstrap tokens
and serves a per-node curl | bash join script -- so adding a physical or
external machine (no BMC, no CAPI infrastructure provider available) to the
cluster is as simple as declaring it in nodes: below and running one
command on the target box.
Every request to GET /bootstrap/{name} requires Authorization: Bearer <fetchToken> and a name that's actually declared in nodes: -- anything
else gets 401/404. The RBAC this chart creates is scoped to
create/get/delete on Secrets in kube-system only (the same
permission kubeadm token create itself needs), nothing broader.
Only osFamily: ubuntu is implemented today.
Adding this helm repository
To add the helm repository, run the following commands:
helm repo add janip81 https://janip81.github.io/helm-charts/
helm search repo node-bootstrap
values.yaml files for the charts can be found in the charts/[chartname] directories.
TL;DR
helm repo add janip81 https://janip81.github.io/helm-charts/
helm install my-app-name janip81/node-bootstrap -f YOUR-OWN-VALUES.yaml
Helm must be installed to use the charts. Please refer to Helm's documentation to get started.
If you had already added this repo earlier, run helm repo update to retrieve
the latest versions of the packages. You can then run helm search repo <alias> to see the charts.
To install the chart:
helm install my-<chart-name> <alias>/<chart-name>
To uninstall the chart:
helm delete my-<chart-name>
Prerequisites
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| apiEndpoint | string | "192.168.101.11:6443" | kube-apiserver endpoint embedded in every generated join script (the cluster's VIP, not an individual control-plane node). |
| fetchToken | object | {"createSecret":false,"existingSecret":"","existingSecretKey":"fetch-token","value":""} | Bearer token required on every GET /bootstrap/{name} request. Exactly one of existingSecret or createSecret should be used -- existingSecret takes precedence. In this repo's own deployment this is Vault-backed via AVP (kubernetes/prod-k8s/node-bootstrap#fetch-token), same pattern as every other app's secrets -- see cluster-config/node-bootstrap/ in k8s-gitops. |
| ghcrSecret | object | {"create":false,"dockerconfigjson":""} | Alternative to imagePullSecrets above: have the chart render its own pull secret from an already-base64-encoded dockerconfigjson, for when the node-bootstrap image repo is private and no externally-managed pull secret already exists in this release's namespace. If both this and imagePullSecrets are set, both are applied. |
| image.pullPolicy | string | "IfNotPresent" | |
| image.repository | string | "ghcr.io/janip81/node-bootstrap" | |
| image.tag | string | "latest" | |
| imagePullSecrets | list | [] | |
| nodeSelector | object | {} | |
| nodes | list | [] | Declared nodes. Each entry becomes fetchable at GET /bootstrap/{name} once this release syncs. osFamily: ubuntu is the only implemented script path today. Add gpu: to make it a GPU node: the script then installs the NVIDIA driver (ubuntu-drivers' pick, or gpu.driverPackage) + container toolkit, sets nvidia as containerd's default runtime, and labels the node nvidia.com/gpu.present=true. nodeIP is optional: by default the node keeps the address it already uses to reach the API, so it can live in any VLAN (the firewall must allow API, kubelet and CNI traffic to/from it). |
| podAnnotations | object | {} | |
| podSecurityContext | object | {"seccompProfile":{"type":"RuntimeDefault"}} | Pod security context. RuntimeDefault seccomp blocks syscalls no normal app needs. Add runAsNonRoot: true (and runAsUser) here if the image runs as a non-root user. |
| rbac.create | bool | true | |
| replicaCount | int | 1 | |
| resources.limits.memory | string | "64Mi" | |
| resources.requests.cpu | string | "25m" | |
| resources.requests.memory | string | "32Mi" | |
| securityContext | object | {"allowPrivilegeEscalation":false} | Container security context, applied to every container (incl. init and migrate containers). |
| service.enabled | bool | true | |
| service.port | int | 8080 | |
| tolerations | list | [] |
Autogenerated from chart metadata using helm-docs v1.14.2
Deploy node-bootstrap with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has node-bootstrap 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartnode-bootstrap is pinned at v0.2.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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