Skip to content

In this project, we will be deploying a Kubernetes cluster using a Jenkins CI/CD pipeline. We will be utilizing various DevOps tools such as GitHub, Jenkins, Ansible, and a Kubernetes cluster to accomplish this. The goal of this project is to utilize these tools to automate the deployment process and streamline the development workflow.

License

Notifications You must be signed in to change notification settings

Krishnamohan-Yerrabilli/Deployment-on-K8s-cluster-using-jenkins-CI-CD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deployment on Kubernetes Cluster using Jenkins CI/CD Project

Kubernetes final image (12)

Whole Project Code Available Here

This Repo is to Teach You Each Tool/Technology and How to Implement the Whole Project Step by Step

Prerequisites/tools needed to work on this project.

We will have a deployment over a Kubernetes cluster using Jenkins CI/CD pipeline,
in this project, we are taking the help of various DevOps tools like GitHub, Jenkins,
Ansible and a Kubernetes cluster(2 nodes).

We will also learn about Kubernetes to know about this deployment and services and we
will write Ansible playbooks with it, we will also write Dockerfile.

Agenda

  • When the developer writes a Docker file, he pushes it to the GitHub repository
    so whenever there is a new commit to the GitHub repo When the new code arrives it
    Notifies Jenkins via a webhook, and Jenkins starts the pipeline.

  • Jenkins pulls all the code from the GitHub repository Once it's completed, it will
    ssh to the ansible server so when a developer pushes a docker file it accesses the
    Ansible server and starts running the image.

  • When it gets the docker file it starts building the image based on the docker file It
    tags it, and once tagged it pushes to the Docker hub and the second task of the Ansible
    Server is, it will ssh to our Kubernetes cluster server, which will evaluate and ansible
    will execute the playbook.

  • It runs the kubectl command on our Kubernetes cluster(web app) and it tries to get the
    latest image from the docker registry .It will pull from the docker hub and it will start
    building the image, it will build a container and that container should be available to
    us using an node IP and a port which we specified in the Service.yaml

  • We're going to start by writing Service.yaml and hand it over to the Kubernetes cluster
    So this is the whole scenario in simple terms was going to achieve a Kubernetes deployment

  • The Jenkins CI/CD pipeline uses various tools We use Linux commands, Jenkins, and Docker
    and you need to have a Dockerhub account, so once Ansible Server builds a Docker image
    based on the Docker file, we push it to the Docker Hub.

  • So we need to log in to Docker Hub here so we can easily push the latest image so what
    we're trying to accomplish here is we have the latest image and we also maintain a
    version based on the build

  • It builds v1, it contains a fresh image, If the second time it builds another image v2
    so that the second contains the latest image, we are performing a version, also, we have
    to separate the latest image.

Project is divided into 6 parts

❤ Show your support

Give a ⭐️ if this project helped you, Happy learning!

About

In this project, we will be deploying a Kubernetes cluster using a Jenkins CI/CD pipeline. We will be utilizing various DevOps tools such as GitHub, Jenkins, Ansible, and a Kubernetes cluster to accomplish this. The goal of this project is to utilize these tools to automate the deployment process and streamline the development workflow.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published