This is the fourth day of my participation in the August More text Challenge. For details, see: August More Text Challenge

Warehouse list

In the previous chapter, we added several useful warehouses, but we need to know which warehouses are being added now. We need to check

helm repo list
Copy the code

The first column is the warehouse name, the second column is the warehouse address, the warehouse name, is created when specified

incubator      	https://kubernetes-charts-incubator.storage.googleapis.com                 
apphub         	https://apphub.aliyuncs.com                               
azure          	http://mirror.azure.cn/kubernetes/charts/                 
bitnami        	https://charts.bitnami.com/bitnami                        
Copy the code

Warehouse management

In the previous section, you saw that there is a deprecated repository, and since we can add it, we can also delete it. In this case, Google’s repository will be deleted

Usage: command, type, action, name

helm repo remove incubator
helm repo list
Copy the code

You can see that helm has multiple parameters behind it, and to find out how to use it, just use helm repo-h to see the help

Currently helm repo has five commands available:

  • Add warehouse
  • Remove Removes the repository
  • Update Updates repository resources
  • List View the list of repositories
  • Index Generates the warehouse index

Private servers warehouse

Since there are official warehouses, and third-party warehouses (APphub), so also support self-built private warehouses

This example uses Minio to set up a private repository for storage

Deploy minio

Download the Minio server and deploy it on a storage machine. Deploy the client and helm together

# # server wget https://dl.min.io/server/minio/release/linux-amd64/minio client wget https://dl.min.io/client/mc/release/linux-amd64/mcCopy the code

Start the minio server

Start and specify a storage path

chmod +x minio
./minio server /data/miniorepo/
Copy the code

After successful startup, you can see the API access address and interface access address and account password (RootUser RootPass), as well as the client connection mode. By the way, the interface (Console) listens on the port is dynamic, and changes every time the startup, if you want to fix, Use the –console-address “:PORT” parameter

API: http://ip:9000  http://172.17.0.1:9000  http://172.18.0.1:9000  http://127.0.0.1:9000             
RootUser: minioadmin 
RootPass: minioadmin 

Console: http:/ / IP: 39679 http://172.17.0.1:39679 http://172.18.0.1:39679 http://127.0.0.1:39679
RootUser: minioadmin 
RootPass: minioadmin 

Command-line: https://docs.min.io/docs/minio-client-quickstart-guide
   $ mc alias set myminio http://ip:9000 minioadmin minioadmin
Copy the code

Setting up the client

It can be done directly from the output of the previous section

mv /usr/local/bin/mc /usr/local/bin/mc
chmod +x /usr/local/bin/mc
mc alias set myminio http://ip:9000 minioadmin minioadmin
Copy the code

Private warehouses

Because minio implements the S3 protocol and the concepts are similar, the storage names and usage are similar

Create a bucket

mc mb myminio/minio-helm-repo 
Copy the code

Setting bucket Permissions

mc policy set download myminio/minio-helm-repo
mc policy set upload myminio/minio-helm-repo
mc policy set public myminio/minio-helm-repo
Copy the code

indexing

Now that the bucket and permissions are in place, the HELM private repository also needs an index to identify itself, or a pure object store

mkdir -pv helm
helm repo index /root/helm
mc cp /root/helm/index.yaml myminio/minio-helm-repo
Copy the code

View files in the repository

mc ls myminio/minio-helm-repo
Copy the code

Creating a private repository

helm repo add myrepo http://ip:9000/minio-helm-repo# If there are reports403Myminio policy set download myminio/minio-helm-repo MC policy set upload Myminio /minio-helm-repo MC policy set public myminio/minio-helm-repoCopy the code

Update the warehouse and check again

helm  repo  update
helm  repo  list
Copy the code

As you can see, the private repository is already in the list, so it’s easy to make Chart uploads or automate the process later