Skip to content

Latest commit

 

History

History
54 lines (43 loc) · 1.81 KB

File metadata and controls

54 lines (43 loc) · 1.81 KB

SE Getting Hashicups Up and running locally using K8s

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.

Pre-Reqs

Getting Started

  1. Start your local k8s cluster. This may be kind, minikube, k3s, or any other prefered flavor.

  2. 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
    
  3. Deploy HashiCups. Assumption is that you are in the local-k8s-consul-deployment/ folder.

    kubectl apply -f k8s/
    
  4. Expose the HashiCups UI

    kubectl port-forward deploy/nginx 8082:80
    
  5. Visit http://localhost:8080

Visit Consul UI (Optional)

  1. Expose the Consul UI
    kubectl port-forward pods/consul-server-0 8500:8500 --namespace consul
    
  2. Visit http://localhost:8500

Clean-up

  1. Remove all HashiCups resources
    kubectl delete -f k8s/
    
  2. Remove all Consul resources
    consul-k8s uninstall -auto-approve -wipe-data &&  kubectl delete pvc/data-consul-consul-server-0 --namespace consul
    
  3. Terminate you local kubernetes cluster.