How to deploy our application using kubernete's Helm-chart?
Deploying a DevOps project in Kubernetes using Helm-Chart involves creating and managing Kubernetes applications with Helm’s package manager. This process simplifies the deployment, scaling, and management of containerized applications. Helm charts package Kubernetes resources and configurations, enabling repeatable deployments and easy updates. The process includes defining charts, configuring values, and utilizing Helm commands to deploy, upgrade, or rollback applications, ensuring consistent and efficient DevOps workflows.
STEP 1: GITHUB Source code in Private Repo
GIT_TOKEN :your Git-hub token
STEP 2: Create a TWO EC2 SERVER ( One for Jenkins & Another for Sonarqube )
PRE-REQUIREDSITE
· In Jenkins Server, Install GIT, JAVA, JENKINS, NPM, NODEJS , DOCKER, KOPS, KUBECTL, HELM etc
· In sonarqube server, install docker & docker compose. Soner is run as a container by writting a docker compose file
STEP 3: In jenkins server, Login to jenkins dashboard and create one pipeline job, and also
Generated Token configure in the jenkins credential section. To access the GITHUB private repoistory for source code
Dashboard > Manage jenkins >Credentials >System >Global Credential >
In pipeline, select Job(Rocket-pipeline-project ) and write a jenkins file for SCM Checkout from git reposistory to jenkins pipeline
Here Declaritive pipeline script written for jenkins file SCM CHECKOUT.
Install Git in Server and also install git plugin jenkins dashboard
Dashboard > Rocket-pipeline-project > Configuration
Click Build Now
1st stage runned successfully.
STEP 4: Install the NPM & Nodejs in jenkins server and write a jenkins file npm install and build it
1st & 2nd stages run successfully.
Install the DOCKER to build package into docker image
Jenkins pipeline syntex
Stage view (output)
In credential section, Store the DOCKERHUB Password as a Secret text(to access dockerhub)
Also provide permission for docker deamon chmod 777 /var/run/docker.sock
Pipeline syntex
Stage view (output)
Install Kops & kubectl to create k8s cluster
Cd .docker (move docker config.json ,
create docker directory in opt path and move this config.json)
Copy the .kube file and save as txt doc and upload in k8s credential section in jenkins server
Check the connectivity of the k8s cluster. (test connection)
Reqired permission for path /opt/docker/config.json (chmod 777 /opt/docker/config.json)
Build failed due to Permission denied. (/opt/docker/config.json)
Last stage output (stage view)
Console output ( Jenkins )