Use this guide to install Zuplo Self-Hosted in a single cluster with automatic
certificates from cert-manager. Before you begin, complete the
requirements.
Set environment variables
Set these variables in the shell that you use for the installation:
Code
# From the Zuplo portal. See Requirements for instructions.export ZUPLO_ACCOUNT_NAME='acme-corp'# Provided by Zuplo during onboarding.export ZUPLO_CHART_VERSION='<chart version from onboarding>'export ZUPLO_REGISTRY_KEY='<base64 credential from onboarding>'# Yours.export ZUPLO_SUBDOMAIN='api.example.com'export ZUPLO_MANAGEMENT_HOSTNAME='zuplo-admin.example.com'export ZUPLO_BUILD_REGISTRY='us-docker.pkg.dev/acme-corp/zuplo-gateways'export ACME_EMAIL='platform@example.com'
Authenticate to the Zuplo registry
The chart is an OCI artifact in Zuplo's registry. The same credential pulls the
chart and the component images.
Create zuplo-values.yaml and commit it to your infrastructure repository. Pass
this file to Helm during every upgrade.
Code
account: # Your Zuplo account name. name: acme-corpdeployments: # Parent domain for your APIs. Needs wildcard DNS: # *.api.example.com -> your ingress address subdomain: api.example.commanagementApi: # Where deployments are pushed IN. Must be reachable by Zuplo and your CI/CD. hostname: zuplo-admin.example.com dedicatedIngress: enabled: falsebuilder: # Where the in-cluster builder pushes built gateway images. provider: docker registry: us-docker.pkg.dev/acme-corp/zuplo-gateways secretName: builder-secretcert-manager: # Issues and renews one certificate per deployment hostname. Leaving this on # is what keeps a wildcard certificate out of the picture. enabled: true acme: # Required when cert-manager.enabled is true. The certificate authority # sends expiration warnings to this address. email: platform@example.com
Create the credentials file
The chart creates Kubernetes Secrets from Helm values. Put credentials in a
separate values file so that you don't commit them with the rest of the
configuration.
The chart doesn't support existingSecret. It stores these values in Kubernetes
Secrets and in the Helm release history. Don't commit this file as plaintext.
Encrypt it with SOPS or Sealed Secrets, or generate it in CI from a secret
store. Add it to .gitignore with your kubeconfig.
The installation takes one to two minutes and creates resources in two
namespaces:
zuplo is the release namespace created by --create-namespace. It contains
gateway deployments and the subcharts.
zuplo-system is created by the chart and contains the Zuplo management
plane.
Always pass `--version`
Without --version, Helm selects the most recent chart available at
installation time. Record the pinned version with zuplo-values.yaml so that
you can review and reproduce upgrades.
Point DNS to the load balancer
Get the address of the LoadBalancer Service created by the chart:
Code
kubectl get svc zuplo-haproxy-ingress -n zuplo
Code
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGEzuplo-haproxy-ingress LoadBalancer 10.128.82.11 203.0.113.24 80:31670/TCP,443:31011/TCP 50s
Create two DNS A records pointing at EXTERNAL-IP, both resolving publicly and
neither behind a TLS-terminating proxy:
Type
Name
Value
A
*.api.example.com
203.0.113.24
A
zuplo-admin.example.com
203.0.113.24
Certificates can't be issued until these records resolve. cert-manager checks
the challenge URL from inside the cluster before it contacts the certificate
authority.