- Start docker desktop (in case you are using Windows)
- Run
minikube start
to start minikube locally - Run
kubectl get ingresses,services,pods -A
to get the list of services running locally on minikube
- Build docker image:
docker build -f Dockerfile -t hello-python-backend:latest .
- Apply Kubernetes Deployment file:
kubectl apply -f ./kubernetes/backend-deployment.yaml
- Expose the port 8080 of backend API to be reachable by the frontend
kubectl expose deployment hello-python-backend --type=NodePort --port=8080
- Run the command below to open the hello-python-backend on minikube
minikube service hello-python-backend-service
- Open the minikube URL alonside /api/hello on your browser
Example:
http://127.0.0.1:55633/api/hello
Change the value of value NAME on kubernetes/backend-deployment.yaml to change what the API will return
The helm chart can be created using this tutorial: https://docs.bitnami.com/tutorials/create-your-first-helm-chart/