To deploy the application locally, follow these steps:
-
Ensure you have the necessary tools installed:
-
Run the deployment script:
./deploy.sh
By default, this will deploy the application in the
devenvironment.To specify a different environment, pass the environment name as an argument:Currently only dev environment is supported -
Verify the deployment:
- Check the status of the Helm releases:
helm list -n remarket
- Get the details of the Ingress:
kubectl get ingress -n remarket
- Check the status of the Helm releases:
-
Access the application: By default kubernetes does not allow external trafic goin into the cluster. To access the application you need to forward port from you local machine to the kubernetes cluster.
To access application you MUST use host name i.e. localhost. This is done because, nginx can resolve only proper DNS names, which 127.0.0.1 IP does not satisfy.
minikube service remarket-ingress-nginx-controller --url -n remarketPlease note output may look something like:
http://127.0.0.1:43489 http://127.0.0.1:39733 ❗ Because you are using a Docker driver on linux, the terminal needs to be open to run it.There is 2 IPs, because NGINX, exports both 80 and 443 ports. The first port is the mapped to 80.
kubectl port-forward --namespace=remarket service/remarket-ingress-nginx-controller 3000:80The app is now available at
http://localhost:3000. -
Delete aplication: To uninstall remarket simply run:
helm uninstall remarket -n remarket