In the following walk through you will create an environment to run HashiCups locally on your machine. The initial form of this doc is created for linux/macos users. WSL users should still be fine but may have to tweak a couple things here or there.
NOTE This is deploying HashiCups and Consul in a non-transparent mode.
- Install Docker
- Install Helm
- A local Kubernetes cluster. Below are some popular options.
- Install Consul K8s CL
-
Start your local k8s cluster. This may be kind, minikube, k3s, or any other prefered flavor.
-
Deploy Consul through the Consul K8s CLI.
consul-k8s install -auto-approve -config-file=helm/consul-values.yaml -set global.image=hashicorp/consul:1.11.4
-
Deploy HashiCups. Assumption is that you are in the
local-k8s-consul-deployment/
folder.kubectl apply -f k8s/
-
Expose the HashiCups UI
kubectl port-forward deploy/nginx 8082:80
-
Visit http://localhost:8080
- Expose the Consul UI
kubectl port-forward pods/consul-server-0 8500:8500 --namespace consul
- Visit http://localhost:8500
- Remove all HashiCups resources
kubectl delete -f k8s/
- Remove all Consul resources
consul-k8s uninstall -auto-approve -wipe-data && kubectl delete pvc/data-consul-consul-server-0 --namespace consul
- Terminate you local kubernetes cluster.