Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
helm_overview [2020/05/16 19:25] andonovjhelm_overview [2020/05/22 13:30] (current) andonovj
Line 10: Line 10:
 This scenario covers version 3.x of Helm. If you are using version 2.x, it's highly advisable to move to the recent version. This scenario covers version 3.x of Helm. If you are using version 2.x, it's highly advisable to move to the recent version.
  
-=====Installation=====+=====Install Simple Redis Chart=====
 Helm can be installed very easily as follows: Helm can be installed very easily as follows:
  
Line 40: Line 40:
 "stable" has been added to your repositories "stable" has been added to your repositories
 master $ master $
 +</Code>
 +
 +In case that is little bit deprecated you can use:
 +
 +<Code:bash|Add Bitnami Repo>
 +master $ helm repo add bitnami https://charts.bitnami.com/bitnami
 +"bitnami" has been added to your repositories
 +master $ 
 </Code> </Code>
  
Line 113: Line 121:
 version: 10.5.7 version: 10.5.7
 master $ master $
 +</Code>
 +
 +====Configure a namespace====
 +Create a namespace for the installation target.
 +
 +<Code:bash|Create a namespace>
 +master $ kubectl create namespace redis
 +namespace/redis created
 +master $
 +</Code>
 +
 +With a known chart name, use the install command to deploy the chart to your cluster.
 +
 +<Code:Bash|Install Chart>
 +master $ helm install my-redis stable/redis --namespace redis
 +WARNING: This chart is deprecated
 +NAME: my-redis
 +LAST DEPLOYED: Sat May 16 19:29:23 2020
 +NAMESPACE: redis
 +STATUS: deployed
 +REVISION: 1
 +TEST SUITE: None
 +NOTES:
 +This Helm chart is deprecated
 +
 +Given the `stable` deprecation timeline (https://github.com/helm/charts#deprecation-timeline), the Bitnami maintained Redis Helm chart is now located at bitnami/charts (https://github.com/bitnami/charts/).
 +
 +The Bitnami repository is already included in the Hubs and we will continue providing the same cadence of updates, support, etc that we've been keeping herethese years. Installation instructions are very similar, just adding the _bitnami_ repo and using it during the installation (`bitnami/<chart>` instead of `stable/<chart>`)
 +
 +```bash
 +$ helm repo add bitnami https://charts.bitnami.com/bitnami
 +$ helm install my-release bitnami/<chart>           # Helm 3
 +$ helm install --name my-release bitnami/<chart>    # Helm 2
 +```
 +
 +To update an exisiting _stable_ deployment with a chart hosted in the bitnami repository you can execute
 + ```bash                                                  $ helm
 + repo add bitnami https://charts.bitnami.com/bitnami
 +  $ helm upgrade my-release bitnami/<chart>
 +  ```
 +
 +  Issues and PRs related to the chart itself will be redirected to `bitnami/charts` GitHub repository. In the same way, we'll be happy to answer questions related to this migration process in this issue (https://github.com/helm/charts/issues/20969) created as a common place for discussion.
 +
 +** Please be patient while the chart is being deployed **
 +Redis can be accessed via port 6379 on the following DNS names from within your cluster:
 +
 +my-redis-master.redis.svc.cluster.local for read/write operations
 +my-redis-slave.redis.svc.cluster.local for read-only operations
 +
 +
 +To get your password run:
 +
 +    export REDIS_PASSWORD=$(kubectl get secret --namespace redis 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 redis my-redis-client --rm --tty -i --restart='Never' \
 +    --env REDIS_PASSWORD=$REDIS_PASSWORD \
 +   --image docker.io/bitnami/redis:5.0.7-debian-10-r32 -- bash
 +
 +2. Connect using the Redis CLI:
 +   redis-cli -h my-redis-master -a $REDIS_PASSWORD
 +   redis-cli -h my-redis-slave -a $REDIS_PASSWORD
 +
 +To connect to your database from outside the cluster execute the following commands:
 +
 +    kubectl port-forward --namespace redis svc/my-redis-master 6379:6379 &
 +    redis-cli -h 127.0.0.1 -p 6379 -a $REDIS_PASSWORD
 +master $
 +</Code>
 +
 +It appears that is deprecated, be sure to use the Bitnami version, for which we have to add the repo first again and install it:
 +
 +<Code:bash|Install the Bitnami Regis>
 +master $ helm repo add bitnami https://charts.bitnami.com/bitnami
 +"bitnami" has been added to your repositories
 +master $ helm install redis bitnami/redis
 +NAME: redis
 +LAST DEPLOYED: Fri May 22 13:23:40 2020
 +NAMESPACE: default
 +STATUS: deployed
 +REVISION: 1
 +TEST SUITE: None
 +NOTES:
 +** Please be patient while the chart is being deployed **
 +Redis can be accessed via port 6379 on the following DNS names from within your cluster:
 +
 +redis-master.default.svc.cluster.local for read/write operations
 +redis-slave.default.svc.cluster.local for read-only operations
 +
 +
 +To get your password run:
 +
 +    export REDIS_PASSWORD=$(kubectl get secret --namespace default 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 --rm --tty -i --restart='Never' \
 +    --env REDIS_PASSWORD=$REDIS_PASSWORD \
 +   --image docker.io/bitnami/redis:6.0.3-debian-10-r2 -- bash
 +
 +2. Connect using the Redis CLI:
 +   redis-cli -h redis-master -a $REDIS_PASSWORD
 +   redis-cli -h redis-slave -a $REDIS_PASSWORD
 +
 +To connect to your database from outside the cluster execute the following commands:
 +
 +    kubectl port-forward --namespace default svc/redis-master 6379:6379 &
 +    redis-cli -h 127.0.0.1 -p 6379 -a $REDIS_PASSWORD
 +master $ helm ls
 +NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART           APP VERSION
 +redis   default                       2020-05-22 13:23:40.824372834 +0000 UTC deployed        redis-10.6.15   6.0.3
 +master $
 +</Code>
 +
 +====Create Persistent Storage====
 +Let's create couple persistant Volumes for storage:
 +
 +<Code:bash|Create Persistent Storage>
 +master $ kubectl apply -f pv.yaml
 +persistentvolume/pv-volume1 created
 +persistentvolume/pv-volume2 created
 +persistentvolume/pv-volume3 created
 +master $ mkdir /mnt/data1 /mnt/data2 /mnt/data3 --mode=777
 +master $ cat pv.yaml
 +kind: PersistentVolume
 +apiVersion: v1
 +metadata:
 +  name: pv-volume1
 +  labels:
 +    type: local
 +spec:
 +  capacity:
 +    storage: 10Gi
 +  accessModes:
 +    - ReadWriteOnce
 +  hostPath:
 +    path: "/mnt/data1"
 +---
 +kind: PersistentVolume
 +apiVersion: v1
 +metadata:
 +  name: pv-volume2
 +  labels:
 +    type: local
 +spec:
 +  capacity:
 +    storage: 10Gi
 +  accessModes:
 +    - ReadWriteOnce
 +  hostPath:
 +    path: "/mnt/data2"
 +---
 +kind: PersistentVolume
 +apiVersion: v1
 +metadata:
 +  name: pv-volume3
 +  labels:
 +    type: local
 +spec:
 +  capacity:
 +    storage: 10Gi
 +  accessModes:
 +    - ReadWriteOnce
 +  hostPath:
 +    path: "/mnt/data3"
 </Code> </Code>
  • helm_overview.1589657157.txt.gz
  • Last modified: 2020/05/16 19:25
  • by andonovj