Deploying two-tier Microservice application in Kubernetes
Clone the application
git clone https://github.com/LondheShubham153/microservices-k8s.git
login to docker
docker login
Build ,tag and push image
docker build . -t mnmanish/taskmaster && docker push mnmanish/taskmaster
Create deployment file for application
vim taskmaster.yaml
Create service file for application
vim taskmaster-svc.yaml
Create mongo persistent volume
vim mongo-pv.yaml
Create mongo persistent volume claim
vim mongo-pvc.yaml
Create mongo deployment file
vim mongo.yaml
Create mongo service file
vim mongo-svc.yaml
Apply taskmaster.yaml
kubectl apply -f taskmaster.yaml
Apply taskmaster-svc.yaml
kubectl apply -f taskmaster-svc.yaml
Apply mongo-pv.yaml
kubectl apply -f mongo-pv.yaml
Apply mongo-pvc.yaml
kubectl apply -f mongo-pvc.yaml
Apply mongo.yaml
kubectl apply -f mongo.yaml
Apply mongo-svc.yaml
kubectl apply -f mongo-pvc.yaml
Now, on the worker node, check docker container of mongo and taskmaster is running
docker ps




