To get started with the Varnish Enterprise Helm Chart, make sure:
Run the following command to quickly install Varnish Enterprise Helm Chart:
helm install --set global.imagePullSecrets[0].name=varnish-pull-secret varnish-enterprise varnish/varnish-enterprise
Substitute varnish-pull-secret for the image pull secret you created in the
image pull secret instruction.
By default, Varnish Enterprise Helm Chart provides an empty VCL with a default
backend configured to locahost:8080. In most cases, this needs to be changed to
something more useful. To do so with the values override, configure
server.vclConfig as needed:
---
global:
imagePullSecrets:
- name: varnish-pull-secret
server:
vclConfig: |
vcl 4.1;
backend default {
.host = "www.example.com";
.port = "80";
}
sub vcl_backend_fetch {
set bereq.http.Host = "www.example.com";
}
Then install or upgrade using the new values, e.g.:
$ helm upgrade -f values.yaml varnish-enterprise varnish/varnish-enterprise
You should now have Varnish Enterprise running in the cluster!
You should have Helm installed and your varnish-enterprise.lic available locally.
Use kubectl to create a generic Kubernetes secret from your local license
file:
kubectl create secret generic varnish-license-secret --from-file=./varnish-enterprise.lic
Next create or update your values.yaml file that specifies the Varnish Enterprise image
and configures the license secret to be mounted at the required path
(/etc/varnish/varnish-enterprise.lic):
server:
...
<your previous content>
...
extraVolumes:
- name: license-volume
secret:
secretName: varnish-license-secret
extraVolumeMounts:
- name: license-volume
mountPath: /etc/varnish/varnish-enterprise.lic
subPath: varnish-enterprise.lic
readOnly: true
You can now deploy as usual. For more options, check the Configurations page.