Helmの使い方

see also)

Install

sudo snap install helm --classic

Add repository

helm repo add stable https://kubernetes-charts.storage.googleapis.com/

Search on stable repository

helm search repo stable

Update repository

helm repo update

Search ‘wordpress’ on repository

helm search repo wordpress
NAME                    CHART VERSION   APP VERSION     DESCRIPTION
stable/wordpress        9.0.3           5.3.2           DEPRECATED Web publishing platform for building...

Install WordPress

helm install wp-test stable/wordpress

Uninstall WordPress

helm uninstall wp-test

Use case: WordPress

NOTE: stable/wordpress is deprecated chart(pakcage)

https://github.com/bitnami/charts/tree/master/bitnami/wordpress

Add bitnami repository

helm repo add bitnami https://charts.bitnami.com/bitnami

Add WordPress chart

$ helm install wp-dev bitnami/wordpress
NAME: wp-dev
LAST DEPLOYED: Thu Aug 27 12:10:18 2020
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
** Please be patient while the chart is being deployed **

Your WordPress site can be accessed through the following DNS name from within your cluster:

    wp-dev-wordpress.default.svc.cluster.local (port 80)

To access your WordPress site from outside the cluster follow the steps below:

1. Get the WordPress URL by running these commands:

  NOTE: It may take a few minutes for the LoadBalancer IP to be available.
        Watch the status with: 'kubectl get svc --namespace default -w wp-dev-wordpress'

   export SERVICE_IP=$(kubectl get svc --namespace default wp-dev-wordpress --template "{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}")
   echo "WordPress URL: http://$SERVICE_IP/"
   echo "WordPress Admin URL: http://$SERVICE_IP/admin"

2. Open a browser and access WordPress using the obtained URL.

3. Login with the following credentials below to see your blog:

  echo Username: user
  echo Password: $(kubectl get secret --namespace default wp-dev-wordpress -o jsonpath="{.data.wordpress-password}" | base64 --decode)