Skip to content

LewisWatson/carshare-kubernetes

Repository files navigation

carshare-kubernetes

Prerequisites

Start minikube

minikube start

carshare-api uses mongo for data persistence.

kubectl create -f mongo-rc.yaml
kubectl create -f mongo-service.yaml
kubectl create -f carshare-api-rc.yaml
kubectl create -f carshare-api-service.yaml
kubectl create -f carshare-web-rc.yaml
kubectl create -f carshare-web-service.yaml

Configure Ingress

Ingress is not enabled by default in minikube.

minikube addons enable ingress

Initialise helm on the cluster

helm init

Deploy the NGINX Ingress Helm Chart.

helm install --name my-release stable/nginx-ingress

Create Ingress

kubectl create -f ingress.yaml

Test

You can test the system by adding carshare.test to your /ets/hosts file.

echo "$(minikube ip) carshare.test" | sudo tee -a /etc/hosts

You should be able to access carshare-web by navigating to carshare.test in a browser.

carshare-web screenshot

You should also be able to make a GET request on carshare-api.

$ curl http://carshare.test/api/v0/carShares
{"errors":[{"status":"403","title":"Forbidden"}]}

It should respond with an error 404 forbidden as you will not be authenticated.

About

Deploy carshare.ninja in minikube

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published