Skip to main content
Use Kustomize when you want to manage Pangolin with rendered manifests, environment-specific overlays, and explicit patches in Git. For Pangolin, the supported Kustomize workflow is:
  1. Render the Pangolin Helm chart to manifests.
  2. Use the rendered output as the Kustomize base.
  3. Create overlays per environment.
  4. Apply the overlay with kubectl apply -k or reconcile it with Argo CD or Flux.

When to use Kustomize for Pangolin

Use Kustomize if you:
  • want environment-specific overlays for dev, staging, or production
  • need explicit patches committed to Git
  • prefer reviewing rendered Kubernetes manifests before applying them
  • use Argo CD or Flux with Kustomize sources
  • want to customize Helm-rendered output without forking the chart
For a simpler single-environment setup, use Pangolin Helm.

Version context

This page is aligned with the Pangolin Helm chart 0.1.0-alpha.0.

Supported approach

The Pangolin chart does not provide native Kustomize bases. Render the Helm chart first, then use Kustomize on the rendered manifests.
Do not manage the same Pangolin resources with both a live Helm release and Kustomize. Pick one ownership model per environment.
Recommended ownership model:
  • Use Helm only to render the Pangolin chart.
  • Use Kustomize, Argo CD, or Flux to apply and reconcile the rendered manifests.
  • Re-render the base when upgrading the chart or changing Helm values.

Example directory structure

Step 1: Create the namespace

Create the namespace before applying rendered manifests:
Gerbil requires NET_ADMIN for WireGuard interface management. If your cluster enforces Pod Security Admission, label the namespace before creating workloads:
Do not use a restricted Pod Security profile for a namespace running Gerbil unless you have validated the selected chart mode. Gerbil requires NET_ADMIN.

Step 2: Create the Pangolin app Secret

Create a Secret for SERVER_SECRET:
Do not commit this Secret to Git.

Step 3: Create base values

Create values/values-base.yaml:
Replace:
  • pangolin.example.com
  • example.com
  • vpn.example.com
  • TLS resolver names
  • storage settings
Use gerbil.startupMode=delayed for the first install if Gerbil should not start before the initial Pangolin setup is complete. Switch it to normal after setup.

Step 4: Render Pangolin to the base

Add and update the Helm repository:
Create directories:
Render the Pangolin chart:
You can also render from the GHCR OCI chart:

Step 5: Create the base kustomization

The namespace is already rendered by Helm through --namespace pangolin. You can also set namespace: pangolin in Kustomize, but avoid changing namespaces in overlays unless you have verified all rendered resources and references.

Step 6: Inspect rendered resource names

Before writing patches, inspect the generated resource names:
Or list the main resource names with yq:
Do not assume generated resource names. Helm names can change with the release name, chart name, nameOverride, or fullnameOverride.
Use the actual rendered names in your patch targets.

Step 7: Create a production overlay

Example overlays/prod/kustomization.yaml:
Replace pangolin and pangolin-dashboard with the actual names from your rendered manifests.

Step 8: Add patches

Patch Pangolin resources

CPU limits are rendered by default through the chart’s resourcesPolicy.cpuLimits.enabled=true. If you disable CPU limits in chart values, keep your Kustomize patches consistent with that policy.

Patch dashboard IngressRoute host

The Pangolin chart uses Traefik IngressRoute for the dashboard and API in controller mode, not a standard Kubernetes Ingress.
Patch the rendered IngressRoute only after checking the route order and match rules. The API route and dashboard route target different service ports.

Patch node affinity

Reference it in overlays/prod/kustomization.yaml:

Patch Gerbil startup mode

For first install, this should usually be handled in Helm values before rendering. If you still need to patch rendered manifests, inspect the generated Deployment first. To switch Gerbil from delayed to normal mode, prefer updating values and re-rendering:
Then re-render:

Do not rename rendered Helm resources by default

Avoid Kustomize options such as namePrefix and nameSuffix for Helm-rendered bases unless you have verified every generated reference. Renaming rendered resources can break:
  • Service selectors
  • Secret references
  • ConfigMap references
  • ServiceAccount references
  • NetworkPolicy selectors
  • Traefik IngressRoute service references
  • Prometheus monitor selectors
  • CloudNativePG references
If you need different resource names, prefer changing the Helm release name or chart naming values before rendering.

Apply the overlay

Preview the rendered output:
Compare with the live cluster:
Apply the overlay:
Verify workloads:
Verify Traefik resources:
Check events:

Updating the rendered base

When upgrading the Pangolin chart or changing Helm values, re-render the base and review the changes. Update the Helm repository:
Render the updated chart output:
Or with OCI:
Validate the overlay:
Review the diff:
Commit the updated base and overlays:
Apply after review:

Ownership model

Do not run helm upgrade against a release that is managed by Kustomize. Avoid this pattern:
Use one of these models instead:

Common Kustomize patches for Pangolin

Patch resource requests and limits

Patch IngressRoute host

Add annotations

Patch Gerbil Service type

Patch the Gerbil Service only after checking the rendered Service name.
For important topology settings such as database mode, Gerbil ports, startupMode, Traefik mode, and CloudNativePG settings, prefer changing Helm values and re-rendering instead of patching rendered YAML.

Validation

Validate Kustomize output:
Run a server-side dry run:
Preview live changes:
If a patch does not apply, inspect generated resource names:

Troubleshooting

The patch does not apply

Check the rendered resource name and kind:
Then verify the patch target in your overlay.

The pod does not start

Check pod status and events:

Dashboard routing does not work

Check the rendered and applied IngressRoute:
Verify:
  • Traefik CRDs are installed.
  • A Traefik controller is watching the namespace and labels.
  • pangolin.ingressRoute.dashboard.host or the patched host matches DNS.
  • The API route still contains PathPrefix(/api/v1).
  • TLS settings match your Traefik setup.

Gerbil does not start

Check Gerbil resources:
Verify:
  • namespace allows NET_ADMIN
  • gerbil.startupMode is set correctly
  • Gerbil persistence is enabled or intentionally disabled
  • pangolin.config.gerbil.start_port matches gerbil.ports.wg1
  • pangolin.config.gerbil.clients_start_port matches gerbil.ports.wg2

Next steps

Helm Install

Install Pangolin with Helm.

Configuration

Review Pangolin chart options.

Troubleshooting

Debug Pangolin deployment and routing issues.

GitOps

Deploy Pangolin with Argo CD or Flux.