Deploy to Kubernetes Cluster | CI/CD Kubernetes using Jenkins Pipeline | Jenkins Pipeline Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2024

ความคิดเห็น • 79

  • @JavaHomeCloud
    @JavaHomeCloud  5 ปีที่แล้ว +4

    Github URL 👉github.com/javahometech/node-app
    🌟 Welcome to Java Home Cloud 🌟
    Register for Online Training 👉 bit.ly/3vuBQqb
    🌐Website 👉javahome.in

  • @victorefedi4600
    @victorefedi4600 4 ปีที่แล้ว +1

    this has to be one of the best materials I have ever seen for Jenkins.

  • @prasanthsaimovva
    @prasanthsaimovva 2 ปีที่แล้ว +1

    Thanks for the video. I was stuck at the tagging part for 1 day and it helped me

  • @shivanjalikaname8935
    @shivanjalikaname8935 4 ปีที่แล้ว +1

    I had a interview scheduled for k8s task. Your tutorial helped me a lot..thank you

  • @nettisrinivasarao5818
    @nettisrinivasarao5818 4 ปีที่แล้ว +1

    Nice video simple good explanation to make clear understand

  • @aleksandrshkraba5061
    @aleksandrshkraba5061 5 ปีที่แล้ว +16

    Sorry, but you can use kubectl apply for creation and it will be correct without mistake. I have never used kubectl create, and haven't problem with creation. Thank you for good video.

    • @nah0221
      @nah0221 3 ปีที่แล้ว

      In older versions, it matters

  • @skyhigh7424
    @skyhigh7424 ปีที่แล้ว +2

    simple and straight. thanks 🙏

  • @rohanrustagi7857
    @rohanrustagi7857 2 ปีที่แล้ว

    You are just genius sir

  • @InterviewDOT
    @InterviewDOT 5 ปีที่แล้ว +2

    Good job 👌All The Best from InterviewDOT 🙏

  • @armanerfani
    @armanerfani 4 ปีที่แล้ว +1

    Thank you for sharing. Very clear description 👍

  • @karl-heinzpeters7283
    @karl-heinzpeters7283 4 ปีที่แล้ว +3

    Great job! Better than the ugly Kubernetes Deploy Plugin! Thx a lot.

  • @petrashouse
    @petrashouse 2 ปีที่แล้ว

    These videos are awesome! Thank you!

  • @PavanKumar-yj8fu
    @PavanKumar-yj8fu 3 ปีที่แล้ว +2

    thank you very much for the video, it was very helpful

  • @moinsyed195
    @moinsyed195 2 ปีที่แล้ว

    hello,
    really great job bro
    i have clear all my concept
    please make connected video on helm

  • @sadiqueshamim1770
    @sadiqueshamim1770 3 ปีที่แล้ว +3

    How did you install the kubernetes on the ec2 instance, nodes, masters nodes. Can you please tell . Will really help me .

    • @sadiqueshamim1770
      @sadiqueshamim1770 3 ปีที่แล้ว +1

      Your videos are just awesome.......

    • @JavaHomeCloud
      @JavaHomeCloud  3 ปีที่แล้ว

      Check my kubernetes playlist to setup clusters

  • @jlpcpr
    @jlpcpr ปีที่แล้ว

    Hi Java Home Cloud, thanks for this tutorial. I am facing an issue that I can't figure out. I am running this with a Kubernetes cluster. The script runs in an SSH Agent Pod. It says that it adds the SSH key but when I try to SSH to run the deployment in the master node, it fails with "Host key verification failed." It looks like the SSH Agent pod is not getting the Private Key. Any ideas?
    Happening when it goes smoothly in your video at 11:24.

  • @devopscopilot3835
    @devopscopilot3835 4 ปีที่แล้ว

    AWESOME. Just one suggestion: It will be better if you make a separate playlist for the parts where you teach on how to deploy the nodeapp.

  • @vivekgc2051
    @vivekgc2051 3 ปีที่แล้ว

    Which aproach is bes if we have 20 docker images for microservices and helm charts to deploy... Is there any jenkins file for example...

  • @Imhemantnegi
    @Imhemantnegi 2 ปีที่แล้ว

    Sir, from where value of $1 came into your sed script?

  • @karismaray5658
    @karismaray5658 2 ปีที่แล้ว

    Very useful video.

  • @shivajinaga7893
    @shivajinaga7893 5 ปีที่แล้ว +4

    Simple and Clear!!

  • @piratevv
    @piratevv 4 ปีที่แล้ว

    Hi, 5:28 timecode - what is the kops-weekend machine. could you help me understand the setup

  • @maximusdecimus6125
    @maximusdecimus6125 4 ปีที่แล้ว

    with the same approach, can we use Nexu3 OSS Docker Reistry instead of Docker Hub to push images from Jenkins and pull that & deploy to AWS EKS??

  • @kchaitu4
    @kchaitu4 4 ปีที่แล้ว +2

    Hello, Very neatly explained. Thanks. I wanted to know, how to set up the same with AWS ECR instead of Dockerhub.

  • @chandrasekharreddy8177
    @chandrasekharreddy8177 5 ปีที่แล้ว

    It's a very useful video .but our Jenkins pipeline fails at the middle how to replace the previous docker tag ,means how to add rollback functionality into the pipeline.

  • @ajitgondkar8546
    @ajitgondkar8546 3 ปีที่แล้ว +1

    First of all thanks for the simple and clear explanation.
    I was trying the same k8s deployment on VM with minikube.
    I am getting one error while building the Jenkins pipeline.
    /var/lib/jenkins/workspace/deploy-k8s@tmp/durable-0786c27b/script.sh: line 1: kubectl: command not found
    kubectl command is working in a terminal, but when I was trying this command using Jenkins, it would error.
    can you please help me to resolve this issue?

    • @omhe63927
      @omhe63927 3 ปีที่แล้ว

      I think kubectl Path is not discoverable by Jenkins user, running in the same node of minikube I guess.
      So first make kubectl executable to others
      chmod +x `which kubectl`
      and then define the Path of kubectl executable as an environment variable in the Pipeline

  • @RajVerma-go4xk
    @RajVerma-go4xk 4 ปีที่แล้ว +1

    you are building everytime new image with new tag and deploying it, i.e right, but how we can remove old image which are present with same name with different tag? please help on this

    • @akashkarve1991
      @akashkarve1991 4 ปีที่แล้ว

      U can create another pipeline which will delete older docker images.....u might schedule that pipeline

  • @nagasatish54
    @nagasatish54 4 ปีที่แล้ว

    iam getting this error in jenins output....please tell how to fix
    service/nodeapp unchanged
    error parsing node-app-pod.yml: error converting YAML to JSON: yaml: line 10: mapping values are not allowed in this context
    error parsing node-app-pod.yml: error converting YAML to JSON: yaml: line 10: mapping values are not allowed in this context

  • @masterbat8953
    @masterbat8953 4 ปีที่แล้ว

    Can you please post a video on deploying to GKE?

  • @vikrambahadur2008
    @vikrambahadur2008 3 ปีที่แล้ว

    Kubectl apply doesn’t break if resources are not there

  • @mohanbabu902
    @mohanbabu902 3 ปีที่แล้ว +1

    Your explanation is very good👌👌👌👌 but I doubt that can I use kuberenetes continuous deployment plugin for establishing connection between Jenkins and kubernetes server.
    Please answer me, anybody.
    Thank you in advance.

  • @JyotirmayaPati-y9m
    @JyotirmayaPati-y9m 11 หลายเดือนก่อน

    I have the .pem file, can anyone suggest how to extract private key, which was there in the video.

  • @bhaskar6705
    @bhaskar6705 5 ปีที่แล้ว +1

    Please share GitHub url

  • @ArunKumar-cj7wd
    @ArunKumar-cj7wd 4 ปีที่แล้ว

    It is very nice session. I am facing one issues when try to do ssh from jenkins pipeline. Here we are using KOPS that is creating one master and 2 node . For ssh plugin configuration we need private key and userId. We have admin as userid . For which mahine's private key we need to provide for ssh configuration ? If we need to use of KOPS master private key then how to generate ?. Could you please help on this ?

  • @vamsikrishna2241
    @vamsikrishna2241 2 ปีที่แล้ว

    I got this error "The connection to the server localhost:8080 was refused - did you specify the right host or port?"

  • @DeepakKumarSahu555
    @DeepakKumarSahu555 4 ปีที่แล้ว +1

    nice tutorial

  • @tarekshalaby6869
    @tarekshalaby6869 4 ปีที่แล้ว

    Can we see another pipeline for EKS?

  • @InspiringOrigins
    @InspiringOrigins 4 ปีที่แล้ว

    Permission denied (publickey).
    lost connection
    while deploying to k8s , i have added k8s private key in jenkins . some body please help

  • @Anilche
    @Anilche 4 ปีที่แล้ว

    Hi, I tried your excellent example, but I immediately got the following error --
    java.lang.NoSuchMethodError: No such DSL method 'getDockerTag' found among steps
    I have my getDockerTag method outside of the pipeline {}
    pipeline {
    agent any
    environment {
    DOCKER_TAG = getDockerTag()
    IMAGE_URL_WITH_TAG = "somestuff:${DOCKER_TAG}"
    }
    stages {
    stage('Preparation') {
    steps {
    git credentialsId: 'GitHub', url: "github.com/url"
    }
    }
    stage('Package and test') {
    steps {
    sh '''mvn clean package'''
    }
    }
    stage('Build Docker Image'){
    steps{
    sh 'docker build . -t ${IMAGE_URL_WITH_TAG}'
    }
    }
    stage('Deploy to K8s Cluster') {
    steps{
    sh 'envsubst < ${WORKSPACE}/deploy.yaml'
    sshagent(['kops-master']){
    sh 'scp -o StrictHostKeyChecking=no deploy.yaml ec2-user@31.2.231.23 :/home/ec2-user/'
    script{
    try{
    sh 'ssh ec2-user@31.2.231.23 kubectl apply -f .' // if k8s resource already exists
    } catch(error){
    sh 'ssh ec2-user@31.2.231.23 kubectl create -f .' // if k8s resources does not exists
    }
    }
    }
    }
    }
    }
    }
    def getDockerTag(){
    def tag = sh script: 'git rev-parse HEAD', returnStdout: true
    return tag
    }

  • @Chandra-f6w
    @Chandra-f6w ปีที่แล้ว

    Instead of ansible , could you please make a video of EKS , THAT will be usefull in the realworld

  • @VishalGangwar081
    @VishalGangwar081 4 ปีที่แล้ว

    Instead of using ssh, how can we use kubeconfig ? Could you please show some demo ?

    • @aithamdabdessamad3926
      @aithamdabdessamad3926 4 ปีที่แล้ว

      you can use a plugin in jenkins or use bitnami/kubectl image and git it the kubeconfig ;)

  • @chetanraj
    @chetanraj 4 ปีที่แล้ว +1

    This is perfect to deploy onto pre-prod env for continuous integration. But when it comes to deploy the same image to production, how do we move this image onto production kubernetes cluster using jenkins pipeline? Could you please help with this?

  • @DonPierreHalfaway
    @DonPierreHalfaway 3 ปีที่แล้ว +1

    Came to this video looking for: withCredentials([string(credentialsId: I made an issue and so far no one has explained what it is at 3:19

    • @DonPierreHalfaway
      @DonPierreHalfaway 3 ปีที่แล้ว

      please explain line 14 of your code and show us how you got to that line and how it is used. If possible please place into this issue so we have posterity
      github.com/Ilikef150s2/Sample-Jenkins-Repo/issues/12

    • @JavaHomeCloud
      @JavaHomeCloud  3 ปีที่แล้ว

      you will find it under pipeline syntax

  • @ramskan
    @ramskan ปีที่แล้ว

    excellent

  • @bharathnannaka9446
    @bharathnannaka9446 4 ปีที่แล้ว

    I got fallowing error.
    "Bad interpreter" in AWS linux Jenkins.
    Cloud you share solution.

    • @JavaHomeCloud
      @JavaHomeCloud  4 ปีที่แล้ว

      Send full error stack

    • @bharathnannaka9446
      @bharathnannaka9446 4 ปีที่แล้ว

      @@JavaHomeCloud
      + ./changeTag.sh d7069d93b0c0c437fdd3182f6a95bf067d1d4f66
      /var/lib/jenkins/workspace/k8s@tmp/durable-22db45af/script.sh: ./changeTag.sh: /bin/bash^M: bad interpreter: No such file or directory
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code 126
      Finished: FAILURE

    • @bharathnannaka9446
      @bharathnannaka9446 4 ปีที่แล้ว

      @@JavaHomeCloud
      + ./changeTag.sh d7069d93b0c0c437fdd3182f6a95bf067d1d4f66
      /var/lib/jenkins/workspace/k8s@tmp/durable-22db45af/script.sh: ./changeTag.sh: /bin/bash^M: bad interpreter: No such file or directory
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // withEnv
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code 126
      Finished: FAILURE

    • @nagarajubalusa2598
      @nagarajubalusa2598 4 ปีที่แล้ว

      Change the name from kubernets to kubernetes

  • @DevOpsPulse
    @DevOpsPulse 2 ปีที่แล้ว

    thank you

  • @HeyMani92
    @HeyMani92 4 ปีที่แล้ว

    I got this error "/home/cloud_user
    Permission denied, please try again.
    Permission denied, please try again.
    Permission denied (publickey,password)."

    • @HeyMani92
      @HeyMani92 4 ปีที่แล้ว

      could you ple help me on this

    • @Zindagi_GarageVlogs
      @Zindagi_GarageVlogs 4 ปีที่แล้ว

      @@HeyMani92 in think in your local machine ssh connection is not in active state r else you have not edited the files which are in git check once

  • @sunildhakad833
    @sunildhakad833 2 ปีที่แล้ว

    Hello 🎉🎉🎉