Microservices and Orchestration via building a simple two-tier live chat microservices and deploy it in Minikube.
Docker permission -
$ sudo chown "$USER":"$USER" /home/"$USER"/.docker -R
$ sudo chmod g+rwx "$HOME/.docker" -R
- Step 1: Start minikube cluster
$ minikube start
- Step 2 : Change docker environment for minikube
$ kubectl get po -A
$ alias kubectl="minikube kubectl --"
$ eval $(minikube docker-env)
- Step 3 : Download app files
$ git clone https://github.com/hb0313/livechat-container.git
$ make build --directory ~/miniproject2-container/mongodb
- Step 4 : Deploy mongodb minikube image
$ git clone https://github.com/hb0313/livechat-minikube.git
$ cd livechat-minikube
$ kubectl apply -f mongodb-deploy.yaml
- Step 5 : Deploy mongodb service
$ kubectl apply -f serviceDB.yaml
$ kubectl get service
copy the external IP
- Step 6 : Update the livechat-container/webserver/app/config.py and update the host: 'external_ip'
$ vi ~/miniproject2-container/webserver/app/config.py
- Step 7 : Deploy webserver minikube image and service
$ make build --directory ~/miniproject2-container/webserver
$ kubectl apply -f webserver-deploy.yaml
$ kubectl apply -f serviceWEB.yaml
- Step 8 : Forward port to host (VM/GCP)
$ kubectl port-forward --address 0.0.0.0 service/webserver-service 8080:8080