pangolin-node
by Fossorial
Pangolin remote node (Pangolin Node, Gerbil and Traefik) connected to a managed Pangolin control plane
About this chart
Pangolin Node Helm Chart
Pangolin remote node (Pangolin Node, Gerbil and Traefik) connected to a managed Pangolin control plane
A remote node is a Pangolin exit node that you host while the control plane stays on
Pangolin Cloud (or another managed Pangolin). It has no controller and no database. It is
the same three containers as the docker-compose install, run in one Pod:
| Container | Role |
|---|---|
pangolin-node | Connects to the control plane with the node ID and secret, writes the Traefik router config to /var/dynamic and TLS certificates to /var/certificates, and answers Badger and Gerbil on 127.0.0.1:3001. |
gerbil | WireGuard for sites (51820/udp) and clients (21820/udp), plus the SNI proxy on 8443 that receives public 443 and hands local hostnames to Traefik with PROXY protocol. |
traefik | Reads /var/dynamic and /var/certificates read-only and routes requests over Gerbil's WireGuard interface, with the Badger plugin for authentication. |
Why one Pod
pangolin-nodeandtraefikshare/var/dynamicand/var/certificates. In one Pod these are emptyDirs, so the chart needs no ReadWriteMany storage.pangolin-noderefills both on startup.- Traefik must sit in Gerbil's network namespace to reach tunnel backends (the compose
network_mode: service:gerbil). pangolin-noderuns as a native sidecar (an init container withrestartPolicy: Always). Gerbil and Traefik start only after its startup probe passes, which replaces the composedepends_on: condition: service_healthy.
Differences from the full Pangolin chart
- No database, controller, dashboard or integration API.
config.ymlholds onlyapp,server,managed,traefikandgerbil(seeserver/lib/readConfigFile.tsin pangolin-node). The chart setsserver.internal_hostnameandgerbil.reachable_atto127.0.0.1for the single-Pod layout.- Traefik uses the file provider on
/var/dynamicinstead of Pangolin's HTTP provider, and certificates come from the control plane instead of ACME.
Prerequisites
-
Kubernetes >= 1.30.14 (native sidecars)
-
Helm 3.x
-
A remote node ID and secret from the Pangolin dashboard
-
A namespace that allows
NET_ADMIN:kubectl label ns pangolin pod-security.kubernetes.io/enforce=privileged --overwrite -
Public reachability for 80/tcp, 443/tcp, 51820/udp and 21820/udp, through a LoadBalancer that supports mixed TCP/UDP Services or through
hostPorts -
Egress to the control plane endpoint and to github.com (Traefik downloads Badger on startup)
Install
helm repo add fossorial https://charts.fossorial.io
helm repo update fossorial
helm install pangolin-node fossorial/pangolin-node \
--namespace pangolin --create-namespace \
--set config.managed.id=<node id> \
--set config.managed.secret=<node secret> \
--set config.gerbil.base_endpoint=node.example.com
To keep the credentials out of Helm values, create a Secret and point
config.managed.existingSecret at it; an init container merges it into config.yml:
kubectl -n pangolin create secret generic pangolin-node-credentials \
--from-literal=id=<node id> --from-literal=secret=<node secret>
helm install pangolin-node fossorial/pangolin-node -n pangolin \
--set config.managed.existingSecret=pangolin-node-credentials \
--set config.gerbil.base_endpoint=node.example.com
Then point base_endpoint and your resource domains at the Service's external address
(or the node IP with hostPorts.enabled=true).
Examples
| File | Use |
|---|---|
| values-loadbalancer.yaml | Cloud LoadBalancer with mixed TCP/UDP |
| values-aws-nlb.yaml | EKS with the AWS Load Balancer Controller (NLB) |
| values-hostports.yaml | Single machine or bare metal, ports bound on the node |
| values-existing-secret.yaml | Node ID and secret from an existing Secret |
| values-full-config-secret.yaml | Bring your own config.yml |
Notes
- The Deployment always runs one replica with the
Recreatestrategy. Run another release for another node. - The Gerbil WireGuard key lives on a small PVC (
gerbil.persistence) that is kept on uninstall. Without it Gerbil generates a new key on every restart. config.gerbil.start_port,gerbil.ports.wg1and the public WireGuard port (service.ports.wg1orhostPorts.wg1) must match. The chart refuses to render otherwise.- Changing
config.managed.existingSecretcontents does not restart the Pod; runkubectl rollout restartafterwards. - Load balancers that health check UDP target groups over TCP on the traffic port (AWS NLB does by default) mark the WireGuard targets unhealthy, since nothing listens on TCP 51820 or 21820. Point the health check at a TCP port in the Pod, such as Gerbil's API on 3003. See values-aws-nlb.yaml.
Maintainers
| Name | Url | |
|---|---|---|
| Fossorial Inc | [email protected] |
Source Code
- https://github.com/fosrl/helm-charts
- https://github.com/fosrl/pangolin-node
- https://github.com/fosrl/gerbil
Requirements
Kubernetes: >=1.30.14-0
Values
| Key | Type | Default | Description |
|---|---|---|---|
| commonAnnotations | object | {} | Annotations added to every resource. |
| commonLabels | object | {} | Labels added to every resource. |
| config.app.audit_logging_enabled | bool | true | Send request audit logs to the control plane. |
| config.app.log_failed_attempts | bool | false | Log failed authentication attempts. |
| config.app.log_level | string | "info" | Log level: debug, info, warn or error. |
| config.existingSecret | string | "" | Use an existing Secret holding a complete config.yml instead of rendering one from the values below. The Secret must contain the key set in existingSecretKey. When set, everything under config.app, config.managed, config.gerbil and config.extra is ignored. |
| config.existingSecretKey | string | "config.yml" | Key inside existingSecret holding config.yml. |
| config.extra | object | {} | Extra keys deep-merged into the rendered config.yml, for settings this chart does not model. server.internal_hostname, server.internal_port and gerbil.reachable_at are set by the chart for the single-Pod layout. |
| config.gerbil.base_endpoint | string | "" | Public hostname or IP that sites and clients use to reach this node's WireGuard listener (the address of the Service / node). Required. |
| config.gerbil.start_port | int | 51820 | WireGuard listen port announced to the control plane. Keep it equal to gerbil.ports.wg1 and the Service port. |
| config.managed.endpoint | string | "https://app.pangolin.net" | Control plane URL. |
| config.managed.existingSecret | string | "" | Read id and secret from an existing Secret instead. An init container merges them into config.yml at startup, so they never appear in Helm values. |
| config.managed.existingSecretIdKey | string | "id" | Key in managed.existingSecret holding the node ID. |
| config.managed.existingSecretSecretKey | string | "secret" | Key in managed.existingSecret holding the node secret. |
| config.managed.id | string | "" | Remote node ID from the Pangolin dashboard. Required unless managed.existingSecret or config.existingSecret is set. |
| config.managed.name | string | "" | Optional display name for the node. |
| config.managed.redirect_endpoint | string | "" | Optional redirect endpoint. |
| config.managed.secret | string | "" | Remote node secret from the Pangolin dashboard. Required unless managed.existingSecret or config.existingSecret is set. |
| extraVolumes | list | [] | Extra Pod volumes, referenced from the extraVolumeMounts lists above. |
| fullnameOverride | string | "" | Override the full resource name. |
| gerbil.args | list | [] | Replace the default args entirely. |
| gerbil.extraEnv | object | {} | Extra environment variables (see gerbil's main.go for the full list). |
| gerbil.extraVolumeMounts | list | [] | |
| gerbil.logLevel | string | "INFO" | Gerbil log level. |
| gerbil.persistence.accessModes[0] | string | "ReadWriteOnce" | |
| gerbil.persistence.annotations | object | {} | |
| gerbil.persistence.enabled | bool | true | Persist the WireGuard private key (/var/config/key). Without it Gerbil generates a new key on every restart and re-registers with the control plane. |
| gerbil.persistence.existingClaim | string | "" | |
| gerbil.persistence.size | string | "64Mi" | |
| gerbil.persistence.storageClass | string | "" | |
| gerbil.ports.internalApi | int | 3003 | Gerbil HTTP API (gerbil.reachable_at). Only reached from inside the Pod. |
| gerbil.ports.sni | int | 8443 | SNI proxy port. Public 443 lands here; Gerbil forwards local SNI matches to Traefik's websecure entrypoint with PROXY protocol. |
| gerbil.ports.wg1 | int | 51820 | WireGuard port for sites. |
| gerbil.ports.wg2 | int | 21820 | WireGuard port for clients. |
| gerbil.resources.limits.memory | string | "512Mi" | |
| gerbil.resources.requests.cpu | string | "50m" | |
| gerbil.resources.requests.memory | string | "64Mi" | |
| gerbil.securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"add":["NET_ADMIN"],"drop":["ALL"]}} | Gerbil needs NET_ADMIN for the WireGuard interface and iptables. Add SYS_MODULE if the node must load the wireguard kernel module itself. |
| hostPorts | object | {"enabled":false,"http":80,"https":443,"wg1":51820,"wg2":21820} | Expose the public ports on the node with hostPort, the equivalent of the compose ports: block (80, 443, 51820/udp, 21820/udp). Use this on bare-metal or single-node clusters without a LoadBalancer. |
| imagePullSecrets | list | [] | Image pull secrets for the Pod. |
| images.configInit | object | {"digest":"","pullPolicy":"IfNotPresent","registry":"docker.io","repository":"mikefarah/yq","tag":"4.45.4"} | Image for the init container that merges managed.existingSecret into config.yml. Only used when config.managed.existingSecret is set. |
| images.gerbil.digest | string | "" | |
| images.gerbil.pullPolicy | string | "IfNotPresent" | |
| images.gerbil.registry | string | "docker.io" | |
| images.gerbil.repository | string | "fosrl/gerbil" | |
| images.gerbil.tag | string | "1.6.0" | |
| images.pangolinNode.digest | string | "" | Overrides tag when set. |
| images.pangolinNode.pullPolicy | string | "IfNotPresent" | |
| images.pangolinNode.registry | string | "docker.io" | |
| images.pangolinNode.repository | string | "fosrl/pangolin-node" | |
| images.pangolinNode.tag | string | "" | Defaults to .Chart.AppVersion. |
| images.traefik.digest | string | "" | |
| images.traefik.pullPolicy | string | "IfNotPresent" | |
| images.traefik.registry | string | "docker.io" | |
| images.traefik.repository | string | "traefik" | |
| images.traefik.tag | string | "v3.7.19" | |
| nameOverride | string | "" | Override the chart name. |
| pangolinNode.extraEnv | object | {} | Extra environment variables. |
| pangolinNode.extraVolumeMounts | list | [] | |
| pangolinNode.internalPort | int | 3001 | Internal API port (server.internal_port). Badger and Gerbil call it on 127.0.0.1. |
| pangolinNode.livenessProbe.failureThreshold | int | 6 | |
| pangolinNode.livenessProbe.httpGet.path | string | "/api/v1/" | |
| pangolinNode.livenessProbe.httpGet.port | string | "internal-api" | |
| pangolinNode.livenessProbe.periodSeconds | int | 10 | |
| pangolinNode.livenessProbe.timeoutSeconds | int | 10 | |
| pangolinNode.readinessProbe.failureThreshold | int | 3 | |
| pangolinNode.readinessProbe.httpGet.path | string | "/api/v1/" | |
| pangolinNode.readinessProbe.httpGet.port | string | "internal-api" | |
| pangolinNode.readinessProbe.periodSeconds | int | 10 | |
| pangolinNode.readinessProbe.timeoutSeconds | int | 10 | |
| pangolinNode.resources.limits.memory | string | "512Mi" | |
| pangolinNode.resources.requests.cpu | string | "50m" | |
| pangolinNode.resources.requests.memory | string | "128Mi" | |
| pangolinNode.securityContext.allowPrivilegeEscalation | bool | false | |
| pangolinNode.securityContext.capabilities.drop[0] | string | "ALL" | |
| pangolinNode.startupProbe | object | {"failureThreshold":60,"httpGet":{"path":"/api/v1/","port":"internal-api"},"periodSeconds":5,"timeoutSeconds":5} | Startup probe. Gerbil and Traefik start only after it passes (the compose depends_on: condition: service_healthy). |
| pangolinNode.timezone | string | "" | Timezone for log timestamps. |
| pod.affinity | object | {} | |
| pod.annotations | object | {} | Extra Pod annotations. |
| pod.dnsPolicy | string | "" | DNS policy. Defaults to ClusterFirstWithHostNet when hostNetwork is true. |
| pod.hostNetwork | bool | false | Run the Pod in the host network namespace. Gerbil's SNI proxy then binds 8443 and Traefik binds 8000/9443/8080 directly on the node, so prefer hostPorts or a LoadBalancer Service unless you need the node's own IP stack. |
| pod.labels | object | {} | Extra Pod labels. |
| pod.nodeSelector | object | {} | |
| pod.priorityClassName | string | "" | |
| pod.securityContext | object | `{"seccompPr |
Deploy pangolin-node with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has pangolin-node 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 chartpangolin-node is pinned at v0.1.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