Posts

Showing posts with the label CI/CD

CI/CD Deployment pipeline using Jenkins on Kubernetes to deploy a Simple Nginx application

Image
  Requirements: For CI/CD deployment pipeline using Jenkins on Kubernetes you need git repository and Kubernetes setup as well as Jenkins plugins named docker , docker pipeline( plugin integrates Jenkins with docker)and Kubernetes continuous deployment Create credentials in Jenkins for Kubernetes (Given ID will use in Jenkinsfile). Click to Credentials on the left menu and fill the fields as shown in below image 3. Create a new item and select pipeline option as shown in below image Create a new item with pipeline option 4(a). Now add credentials with the key file in two steps to use encrypted git credentials in Jenkinsfile Create a secret text to implement the git 4(b). now got to the project -> click on pipeline syntax link now right-side drop-down choose: with credentials: Bind credentials to variables and then choose a secret box from next drop down box and choose above credential ID and enter any value which will use in Jenkinsfile. It will generate the line of code...

GitLab CI/CD implementation on Kubernetes Cluster (L4 And L7 Load Balancer)

Image
  Login to Gitlab and create a project Create project in Gitlab 2. Add Kubernetes cluster in created project Select Kubernetes option under operations 3. Add existing cluster and fill up all the fields which is related to kube-config file. Fill Kubernetes cluster info 4. Disable the Auto Dev-Ops for project. Go to settings->CI/CD->Expand Auto Dev-Ops and uncheck the Default to Auto DevOps Pipeline. Disable auto DevOps 5. Create or Enable Runner for this project (Settings->CI/CD->Expand Runner) . Set up a specific Runner manually or Enable the shared runner (Created earlier by using  link https://docs.gitlab.com/runner/install/linux-manually.html ) Enable Runner 6. Now Deploy the project with Docker file, gitlab ci/cd file and kubernetes template file. Gitlab CI/CD file named .gitlab-ci.yml and format is as below #before_script: # - sudo usermod -aG docker $USER build: script: - docker build -t dokcer.io/library/nginx:$CI_COMMIT_SHA . - docker log...