This is the 10th day of my participation in the August More Text Challenge
source
Artifact Hub is the official Chart repository for Helm, as Helm’s own Hub was deprecated and migrated to Artifact Hub
hot
The Artifact Hub repository is very active, as can be seen from the official package and release charts
Chart data increased from 900 in 2000 and 4 years to 4600, and version release increased from 4000 to 60000. It is very active and there are many charts
contrast
Ali Cloud also has a warehouse like this, which can be added by helm Add Repo at present, but I don’t know why the page has been upgraded, I am looking forward to opening again!
classification
Open the Artifacthub. IO/site and press Enter in the Artifact Hub search box to see all the packages
The left side of the classification is very complete, and convenient, there are as follows:
- species
- category
- vendor
- Storage type
- license
- deprecated
For example, helm plugins can find helm Push, which we installed earlier, with the total number of these categories
Currently the most star-tipped plug-in in this category is 2to3(migrate and clean up helM2 configurations and publish to HelM3)
use
Do a search for Redis, and when you click in, you’ll see a good introduction screen
There are four buttons to click on the right
- INSTALL Installation description
- TEMPLATES file
- VALUES SCHEMA VALUES VALUES
- CHANGELOG Indicates the change logs
The right center shows the release date of chart, chart version and Redis version
Click the INSTALL button to add the repository first, and then you can select the version to INSTALL
The bitnami repository has been configured when helm is installed. Here we can install chart VERSIONS. To install other VERSIONS, check chart VERSIONS below see All in the middle right and all VERSIONS will be listed
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-redis bitnami/redis --version 14.87.
Copy the code
But you can see it when you look down, and the chart includes two different clusters
- A master-slave Redis cluster with optional sentries
- A sharding cluster
After installation, the following output shows that the default is a master/slave cluster with no sentinel mode
NAME: my-redis
LAST DEPLOYED: Fri Jul 30 17:53:12 2021
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
** Please be patient while the chart is being deployed **
Redis™ can be accessed on the following DNS names from within your cluster:
my-redis-master.default.svc.cluster.local for read/write operations (port 6379)
my-redis-replicas.default.svc.cluster.local for read-only operations (port 6379)
To get your password run:
export REDIS_PASSWORD=$(kubectl get secret --namespace default my-redis -o jsonpath="{.data.redis-password}" | base64 --decode)
To connect to your Redis™ server:
1. Run a Redis™ pod that you can use as a client:
kubectl run --namespace default redis-client --restart='Never' --env REDIS_PASSWORD=$REDIS_PASSWORD --image docker.io/bitnami/redis:6.2. 5-debian-10-r0 --command -- sleep infinity
Use the following command to attach to the pod:
kubectl exec --tty -i redis-client \
--namespace default -- bash
2. Connect using the Redis™ CLI:
redis-cli -h my-redis-master -a $REDIS_PASSWORD
redis-cli -h my-redis-replicas -a $REDIS_PASSWORD
To connect to your database from outside the cluster execute the following commands:
kubectl port-forward --namespace default svc/my-redis-master 6379:6379 &
redis-cli -h 127.0. 01. -p 6379 -a $REDIS_PASSWORD
Copy the code
Next you can see if Redis is available
Using kubectl get secret — the namespace default my – redis – o jsonpath = “{. Data. Redis – password}” | base64 – decode for redis password
Kubectl exec –tty -i my-redis-master-0 — bash = kubectl exec –tty -i my-redis-master-0 — bash = kubectl exec –tty -i my-redis-master-0 — bash = kubectl exec –tty -i my-redis-master-0
Kubectl port-forward –address 0.0.0.0 SVC /my-redis-master 6379:6379 kubectl port-forward –address 0.0.0.0 SVC /my-redis-master 6379:6379 Add a –address parameter for easy access by other machines
conclusion
Artifact Hub contains an extensive chart package, a variety of databases, Devops tools, agents, monitoring, and more, while comprehensive documentation and tutorial details make it easy to use
Detailed description of parameters is listed at the bottom of chart page. You can install the software you need according to relevant documents. If the software installation is slow, you can change the image address to accelerate the deployment of Chart in K8S