- Install Git
- Install npm
- Install Docker
- EKS-Cluster
- Install helm
yum install git -y
sudo yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_13.x | sudo -E bash -
sudo yum install -y nodejs
yum install docker -y
service docker start
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
Now edit get_helm.sh file
vi get_helm.sh
./get_helm.sh
git clone https://github.com/VamsiTechTuts/kubernetes.git
cd kubernetes/nodejs-k8s
npm install
docker build -t naresh240/nodejs-k8s:v1 .
docker login
docker push naresh240/nodejs-k8s:v1
helm create nodejs
Edit values.yml file
vi nodejs/values.yaml
Edit image as shown below:
Edit Service and port as show below:
helm install nodejs nodejs
kubectl get pods
kubectl get svc
Goto Web UI and check whether we are getting output or not:
Edit our our application and Build docker image with new tag:
docker build -t naresh240/nodejs-k8s:v2 .
Push Docker image to docker hub with tag v2:
docker push naresh240/nodejs-k8s:v2
Edit values.yml file with new tag v2:
upgrade nodejs application with tag v2:
helm upgrade nodejs ./nodejs
Check history of nodejs Application:
helm history nodejs
Goto Web UI and check whether we are getting upgraded output or not:
helm rollback nodejs 1
Goto Web UI and check whether we are getting rollback output or not: