You can find instructions to deploy Verdaccio on a Kubernetes cluster on the verdaccio/docker-example repository. However, the recommended method to install Verdaccio on a Kubernetes cluster is to use Helm. Helm is a Kubernetes package manager which bring multiple advantages.
If you haven't used Helm before, you need to setup the Helm controller called Tiller:
⚠️ If you are using this helm chart, please be aware of the migration of the repository.
Deploy the Helm verdaccio/verdaccio chart.
helm repo add verdaccio https://charts.verdaccio.org
In this example we use
npm as release name:
helm install npm verdaccio/verdaccio
helm install npm --set image.tag=3.13.1 verdaccio/verdaccio
helm upgrade npm verdaccio/verdaccio
helm uninstall npm
Note: this command delete all the resources, including packages that you may have previously published to the registry.
You can customize the Verdaccio configuration using a Kubernetes configMap.
Copy the existing configuration and adapt it for your use case:
wget https://raw.githubusercontent.com/verdaccio/verdaccio/master/packages/config/src/conf/docker.yaml -O config.yaml
Note: Make sure you are using the right path for the storage that is used for persistency:
storage: /verdaccio/storage/dataauth: htpasswd: file: /verdaccio/storage/htpasswd
configMap to the cluster
kubectl create configmap verdaccio-config --from-file ./config.yaml
Now you can deploy the Verdaccio Helm chart and specify which configuration to use:
helm install npm --set existingConfigMap=verdaccio-config verdaccio/verdaccio
The standard k8s NGINX ingress proxy allows for 1MB for body-size which can be increased by modifying the default deployment options according to the documentation:
... annotations:... kubernetes.io/proxy-body-size: 20m.... ...
Rancher is a complete container management platform that makes managing and using containers in production really easy.