To access Varnish Enterprise Helm Chart and Varnish Controller Helm Chart, you must first add the repository and configure the image pull secret. The former is to allow the local machine to access the Helm Chart repository, and the latter is to allow the cluster to pull Varnish Enterprise and Varnish Controller images from the remote repository.
To add the Varnish Helm Chart repository to Helm, run the following command on the local machine:
helm repo add varnish https://packagecloud.io/varnishplus/60/helm --username <token> --password does-not-matter
Replace <token>
with your Varnish Enterprise’s PackageCloud token. The token can be found in a license file. The password can be set to any string as it is ignored by the repository.
To allow a Kubernetes cluster to pull the Docker images from a private repository, create a Docker repository secret in the same namespace you’re going to install Varnish Enterprise and Varnish Controller on. To do this using kubectl
, run the following command:
kubectl create secret docker-registry varnish-pull-secret --docker-username=<username> --docker-password=<password> --docker-server=https://quay.io
Replace <username>
and <password>
with your Varnish Docker image’s Quay.io credentials. The username and password can be found in a license file. Once an Image Pull Secret is configured, configure values.yaml to use this newly created secret:
---
global:
imagePullSecrets:
- name: varnish-pull-secret
This value can be shared between Varnish Enterprise Helm Chart and Varnish Controller Helm Chart.
In Varnish Controller Helm Chart, the Varnish Controller license file is read from a Kubernetes secret. To create a license file on a Kubernetes cluster using kubectl
, run the following command:
kubectl create secret generic varnish-license --from-file=license.lic=./license.lic
The first license.lic
is the filename to create on a Kubernetes cluster, and the second ./license.lic
is the path to license.lic on the local machine.