1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-11-13 03:35:52 +01:00
verdaccio/website/docs/kubernetes.md
Abraham Schilling ddb42431d1 build: configure prettier as formatter for json, yaml and markdown (#1930)
* build: configure pretter as formatter for most files

* chore: reformat code (#1931)

* chore: re-format all files

* chore: force run quality anaylsis test

Co-authored-by: Juan Picado @jotadeveloper <juanpicado19@gmail.com>

Co-authored-by: Juan Picado @jotadeveloper <juanpicado19@gmail.com>
2021-04-09 17:54:19 +02:00

2.5 KiB

id title
kubernetes Kubernetes

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.

''

Helm

Setup Helm

If you haven't used Helm before, you need to setup the Helm controller called Tiller:

helm init

Install

⚠️ If you are using this helm chart, please be aware of the migration of the repository.

Deploy the Helm verdaccio/verdaccio chart.

Add repository

helm repo add verdaccio https://charts.verdaccio.org

In this example we use npm as release name:

helm install --name npm verdaccio/verdaccio

Deploy a specific version

helm install --name npm --set image.tag=3.13.1 verdaccio/verdaccio

Upgrading Verdaccio

helm upgrade npm verdaccio/verdaccio

Uninstalling

helm del --purge npm

Note: this command delete all the resources, including packages that you may have previously published to the registry.

Custom Verdaccio configuration

You can customize the Verdaccio configuration using a Kubernetes configMap.

Prepare

Copy the existing configuration and adapt it for your use case:

wget https://raw.githubusercontent.com/verdaccio/verdaccio/master/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/data
auth:
  htpasswd:
    file: /verdaccio/storage/htpasswd

Deploy the configMap

Deploy the configMap to the cluster

kubectl create configmap verdaccio-config --from-file ./config.yaml

Deploy Verdaccio

Now you can deploy the Verdaccio Helm chart and specify which configuration to use:

helm install --name npm --set customConfigMap=verdaccio-config verdaccio/verdaccio

Rancher Support

Rancher is a complete container management platform that makes managing and using containers in production really easy.