Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a Helm Chart to deploy in K8s #754

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Crivaledaz
Copy link

It is to make it easier to deploy EtherCalc in a Kubernetes cluster using Helm.

I based my work on the docker-compose.yaml file from master. The chart does the following :

  • Deploy a Redis server and a EtherCalc server in the same pod.
  • Create associated Kubernetes resources : Service, Service Account, Deployment, Ingress (if enabled), PVC (if persistence is enabled)
  • Can be deploy with data persistence (by using PVC and PV)

I tested it on a Kubernetes cluster version 1.18.8 with Helm 3.5.2.

The Helm Chart adds an installation method and do not change anything from existing installation methods.

@eddyparkinson
Copy link
Collaborator

Testing & install? ... It is good to catch problems early. Please describe the testing that you did and explain the install process.

@Crivaledaz
Copy link
Author

Hi,

You can follow the Readme to deploy on a Kubernetes cluster.

Helm is a CNCF project which helps you define, install, and upgrade applications in Kubernetes. You can set up Helm by following the official guide.

To use Helm, you need a Kubernetes cluster. If you don't have one you can easily begin with Minikube.

So, to test my work, you can install a Kubernetes environment with Minikube, then set up Helm V3 with the Minikube cluster, and finally deploy Ethercalc in Minikube, by running : helm install ethercalc-kube crivaledaz/ethercalc, as explained in the Readme.

To summarize, on Linux :

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
minikube kubectl -- get po -A
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
helm repo add crivaledaz http://clavier.iiens.net/helm
helm install ethercalc-kube crivaledaz/ethercalc

Once Helm has deployed Ethercalc in Kubernetes and the containers have started (it can take one minute) :

export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=ethercalc,app.kubernetes.io/instance=my-release" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT

After that, you have a Kubernetes cluster with an EtherCalc instance deployed by Helm using this Chart. You can now access EtherCalc in your web browser on http://127.0.0.1:8080.

The Helm Chart offers many parameters to adapt the deployment to Kubernetes cluster. You need to learn Kubernetes to understand usage of each of them.

For your information, I have deployed this Chart in my company production cluster (Kubernetes 1.18.8 and Helm 3.5.2 with an Nginx Ingress) for one month, and it works fine.

I hope this will help you test my work. Ask me if you encounter difficulties.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants