2.9 KiB
id | title |
---|---|
kubernetes | Kubernetes |
You can find instructions to deploy Verdaccio on a Kubernetes cluster on the verdaccio/docker-example repository. Nicméně doporučená metoda instalace Verdaccia do Kubernetes clusteru je pomocí Helm. Helm je balíčkový správce pro Kubernetes což přináší mnoho výhod.
Helm
Nastavení Helm
Pokud jste ještě nepoužívali Help, budete muset nastavit ovladač pro Helm jménem Tiller:
helm init
Instalace
⚠️ 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 npm verdaccio/verdaccio
Nasazení specifické verze
helm install npm --set image.tag=3.13.1 verdaccio/verdaccio
Aktualizace Verdaccia
helm upgrade npm verdaccio/verdaccio
Odinstalace
helm uninstall npm
Poznámka: tento příkaz odstraní všechny prostředky včetně balíčků, které jste dříve publikovali do registru.
Vlastní konfigurace Verdaccia
Můžete upravit konfiguraci Verdaccia pomocí Kubernetes configMap.
Příprava
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
Poznámka: Zkontrolujte, zda používáte správnou cestu pro ukládání, která slouží pro perzistenci dat:
storage: /verdaccio/storage/data
auth:
htpasswd:
file: /verdaccio/storage/htpasswd
Nasazení configMap
Nasaďte configMap
do clusteru
kubectl create configmap verdaccio-config --from-file ./config.yaml
Nasazení Verdaccia
Nyní můžete nasadit Verdaccio Helm graf a specifikovat, jakou konfiguraci použít:
helm install npm --set customConfigMap=verdaccio-config verdaccio/verdaccio
NGINX proxy body-size limit
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
....
...
Podpora Rancher
Rancher is a complete container management platform that makes managing and using containers in production really easy.