Blog post will help understand about example
Create a intance has option:
- Instance type: t2.xlarge
- Open traffic port in Security Group: 8080,80,22
- Storage of 16GiB
The first, we must install all sofware to use:
We can run all command in repo or create bash file and run it by bash ./bash_filename
.
Before deploy app, we need install istio and configuring components of istio. we just run bash file in gateway directory. we can run by command:
bash ./install_package.sh
Finnally, we need apply istio-ingressgateway to config gateway:
kubectl apply -f istio-ingressgateway.yaml
- Get permission user jenkins can use docker
sudo usermod -aG docker jenkins
- Install plugin kubernetes
- Connect jenkins to kubernetes cluster:
- Coppy 2 folder .minikube and .kube of your user.Get permission for user jenkins can use them:
sudo cp -r .kube/ .minikube/ /var/lib/jenkins
sudo chown -R jenkins /var/lib/jenkins/.minikube/ /var/lib/jenkins/.kube/
- Change the path in config of .kube folder in home folder jenkins
sudo nano /var/lib/jenkins/.kube/config
"Change PATH: (/home/ubuntu/ -> /var/lib/jenkins/"
- Test connect with kubernetes cluster: manage jenkins/ manage nodes and clouds -> select kubernetes -> test connect
- Create a job pipeline:
- Choose GitHub hook trigger for GITScm polling: make trigger
- Choose pipeline script from SCM and add your repo and Add github webhook: get soure code of jenkinsfile from your repo
- Create file jekinsfile uses these helm charts to:
- Deploy React application on Kubernetes
- Deploy MongoDB persistance layer on Kubernetes
- Deploy Spring Boot Backend API on Kubernetes
- Deploy Istio and expose services using Istio VirtualService and Gateway and connect frontend to backend.
- Deploy Prometheus and graffana and able to monitor using them.
student app
- Try change line 16 in kubernetes-full-stack-example/react-student-management-web-app/src/App.js and push to github and check title of web