This repository contains 4 Helm charts that following the tutorials.
- Install prerequisites tool above.
- Start the minikube cluster.
$ minikube start
1. Example: Deploying PHP Guestbook application with Redis (https://kubernetes.io/docs/tutorials/stateless-application/guestbook/)
To perform helm deployment:
$ helm upgrade --install guestbook ./php-guestbook
To get the IP address for the frontend Service:
$ minikube service frontend --url
To uninstall resources:
$ helm uninstall guestbook
2. Example: Deploying WordPress and MySQL with Persistent Volumes (https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/)
To perform helm deployment:
- Generate deployment.yaml by templates
$ helm template ./wordpress-mysql > ./wordpress-mysql/outputs/deployment.yaml
- Apply kustomization.yaml secret
$ kubectl kustomize ./wordpress-mysql/outputs > ./wordpress-mysql/templates/deployment.yaml
- Perform the deployment
$ helm upgrade --install wordpress ./wordpress-mysql --set template.enabled=false
To get the IP address for the wordpress Service:
$ minikube service wordpress --url
To uninstall resources:
$ helm uninstall wordpress
3. Example: Deploying Cassandra with a StatefulSet (https://kubernetes.io/docs/tutorials/stateful-application/cassandra/)
To perform helm deployment:
- Remove and recreate Minikube to avoid insufficient resource, start Minikube with the following settings
$ minikube delete
$ minikube start --memory 5120 --cpus=4
- Perform the deployment
$ helm upgrade --install cassandra ./cassandra-statefulset
To get Cassandra StatefulSet:
$ kubectl get statefulset cassandra
To uninstall resources:
$ helm uninstall cassandra
4. Running ZooKeeper, A Distributed System Coordinator (https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/)
You will require a cluster with at least four nodes, and each node requires at least 2 CPUs and 4 GiB of memory. So, I perform the deployment with the GKE cluster.
To perform helm deployment:
- Connect to the GKE cluster
$ gcloud container clusters get-credentials [cluster name] --zone [zone] --project [project id]
- Perform the deployment
$ helm upgrade --install zookeeper ./zookeeper-coordinator
- Check the StatefulSet's Pods, Use
CTRL-C
to terminate to kubectl when all Pods is running.
$ kubectl get pods -w -l app=zk
To uninstall resources:
$ helm uninstall zookeeper