This guide shows how to deploy Varnish Enterprise on Kubernetes using the official public Helm chart and your license file.
First, create a Kubernetes secret containing your Varnish Enterprise license file:
kubectl create secret generic varnish-enterprise-license \
--from-file=varnish-enterprise.lic=/path/to/your/varnish-enterprise.lic
Create a values.yaml file with the following content:
server:
extraVolumes:
- name: varnish-enterprise-license
secret:
secretName: varnish-enterprise-license
extraVolumeMounts:
- name: varnish-enterprise-license
mountPath: /etc/varnish/varnish-enterprise.lic
subPath: varnish-enterprise.lic
readOnly: true
vclConfig: |
vcl 4.1;
backend default {
.host = "www.example.com";
.port = "80";
}
sub vcl_backend_fetch {
set bereq.http.Host = "www.example.com";
}
Available Helm chart versions can be found at: https://hub.docker.com/r/varnish/varnish-enterprise/tags
Install the Helm chart using the OCI registry:
helm install varnish-enterprise oci://registry-1.docker.io/varnish/varnish-enterprise --version 1.7.4 -f values.yaml
Check that the pods are running and inspect the logs:
kubectl get pods
kubectl logs -l app.kubernetes.io/name=varnish-enterprise -f
To upgrade an existing installation:
helm upgrade varnish-enterprise oci://registry-1.docker.io/varnish/varnish-enterprise --version 1.7.4 -f values.yaml
To remove the installation:
helm uninstall varnish-enterprise
kubectl delete secret varnish-enterprise-license