[ Kube 25 Discussion 1.1 ] Running Jenkins slave agents in Kubernetes

Поделиться
HTML-код
  • Опубликовано: 22 окт 2024

Комментарии • 83

  • @cyberpau2298
    @cyberpau2298 4 года назад +4

    Thank you very much for all of your videos. I just want you to know that you are one of my RUclips Heroes (alongside with Bucky Roberts of TheNewBoston and Brad Traversy of Traversy Media). Keep it up!

  • @corwaincyrus6840
    @corwaincyrus6840 4 года назад +2

    I did not even look at this video, I just saw you post and I was like, wow! This guy is really helping the community!! So I came only to leave a like

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      We need more people like you in this planet :P

    • @corwaincyrus6840
      @corwaincyrus6840 4 года назад +1

      @@justmeandopensource no, no... we need more people like you! Most tutorials and even some paid courses all show you the first 10 easiest steps and processes when using some technology. But you actually go in depth to a practical degree.

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      @@corwaincyrus6840 :)

  • @ThiruSings
    @ThiruSings 3 года назад +1

    Thank you so much. I had never got this information anywhere else. My kube cluster is working now.

  • @cipher6042
    @cipher6042 3 года назад +1

    This video was very helpful for me with a work task I am performing. Thank you!

  • @jaysistar2711
    @jaysistar2711 3 года назад +1

    I like your prompt. What are your PS1, etc. values, and what else did you install to make that happen?

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      Hi, thanks for watching. Its a combination of Zsh, Oh-my-zsh plugin manager, powerlevel10k customizations and plugins like zsh-autosuggestions and zsh-syntax-highlighting. Cheers.

  • @ThanhNguyenVan-ss7yy
    @ThanhNguyenVan-ss7yy 2 года назад +3

    hi Venkash,
    I did same as you it worked. But once i run the command in shell like "kubectl get po" it said the command is not found. This is caused by the pod does not have kubectl cli installed. Any idea from you incase we need to run the kubernetes cli on the slave pod?

    • @justmeandopensource
      @justmeandopensource  2 года назад +2

      Hi Thanh, the container image I used in this video for jenkins slave pod doesn't have kubectl binary. If you want you have to bake it inside the image, host it in your local container registry somewhere and pull it from there or check in docker hub if an image with docker and kubectl installed.

    • @ThanhNguyenVan-ss7yy
      @ThanhNguyenVan-ss7yy 2 года назад +1

      @@justmeandopensource thanks. Have a good weekend

    • @justmeandopensource
      @justmeandopensource  2 года назад +1

      @@ThanhNguyenVan-ss7yy Cheers.

  • @vishalpoptani6762
    @vishalpoptani6762 2 года назад

    Do you plan to make the same configuration using Jenkins shared library?

  • @weilunyi
    @weilunyi 3 года назад

    Thank you for your video, and I have a question that I always get ip is 127.0.0.1 when run "kubectl config view". How do I get real ip so that jenkins container can access it?

  • @ahmadalkhaldi8934
    @ahmadalkhaldi8934 3 года назад

    Is there any documentation on the service account that the agent uses inside kubernetes. Instead of using the default . What are the privs that we should provide the service account for the agent if we dont wanna use the clusterAdmin.

  • @litan1106
    @litan1106 3 года назад +1

    Great video!

  • @alexandreoliveira-mq6jd
    @alexandreoliveira-mq6jd 3 года назад +1

    How we connect cluster from azure to a local jenkins?

  • @kayoutube690
    @kayoutube690 Год назад

    is the jenkins slave can run docker build?

  • @vishalpoptani6762
    @vishalpoptani6762 2 года назад

    I tried the same steps, but for a newer version of jenkins. My pod is getting created on the cluster but in jenkins the node is showing as offline. I also get messages like waiting for agent to connect in the agent log section of jenkins. Any help would be appreciated :)

  • @TheQuranVerses1
    @TheQuranVerses1 2 года назад +1

    Thank you for your video, but it is not working when you run kubectl command from pipeline or docker build command.... it says docker not found and kubectl not found

    • @TheQuranVerses1
      @TheQuranVerses1 2 года назад +1

      can you help please ?

    • @justmeandopensource
      @justmeandopensource  2 года назад +2

      @@TheQuranVerses1 Hi, thanks for watching. I am sure I have mentioned in this video that you have to use a jenkins slave image that has docker and kubectl baked into it. The slave jenkins slave image i used in this video has docker binary built into it. Not sure if you are using the same image. Check if your image has docker in it or use one with docker in it.

    • @TheQuranVerses1
      @TheQuranVerses1 2 года назад +1

      @@justmeandopensource Thank you so much for your reply, I will try to use one with docker and kubectl, I will try to find an image with docker and kubectl

  • @TradeWithScence
    @TradeWithScence 3 года назад

    Hi Venkat,i open both the port with the loadBalancer,getting tunnel error ,please help me

  • @bot1511
    @bot1511 4 года назад +1

    Hey, can you make video about deploying GitLab EE or CE with runners and everything else? On Helm option or without?

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      Hi, Thanks for watching. I will try my best. It requires a publicly accessible domain name which I don't have. Anyways I will look into it.

    • @bot1511
      @bot1511 4 года назад +1

      @@justmeandopensource aa That's thy it is so hard to do. Hmmm. Now that have sense. Thank you very very much for every video on this channel. I have learned so much new things and still doing this.

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      @@bot1511 NO worries. Thanks for your interest and motivation. :)

  • @nah0221
    @nah0221 3 года назад +1

    hello! .. coming from 2021 and I stuck when using jenkins via helm chart and trying to use docker as agent .. I'm getting docker: not found. I've installed docker plugin and configured it with automatic installation. Any suggestions here ?

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      More details needed. Where are you getting the docker not found error?

  • @vibhormathpal2021
    @vibhormathpal2021 2 года назад

    Jenkins slaves pods are deploying fine however slave pods can checkout and job is failing with error cloning remote repo origin...Please assist

  • @athulyachandrasekar5326
    @athulyachandrasekar5326 3 года назад

    Hi Venkat
    While run build am receiving error like
    Agent error
    Tried to download agent.jar and jnlp. Then ran comment as mentioned. But no luck
    Still build is not successful. Please help me with link which I can refer to connect agent to Jenkins

  • @Anandhasaravanansas
    @Anandhasaravanansas 3 года назад +1

    Hi Venkat, I tried similar setup and when i run the job, i see (pending-All nodes of label ‘kubepod’ are offline). Any sugestions?

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      Hi Anandha, thanks for watching. Did you check the jenkins log? You will find a clue as to why its failing to provision the slave pod. Usually it will be due to an incorrect pod template configuration in Jenkins.

    • @irfanansari6448
      @irfanansari6448 3 года назад +1

      @@justmeandopensource Hi Venkat, same error. Pod is getting created in the cluster and within a minute it is dead and new pods will come and this same is happening in a loop. Also in logs, I can see that the Slave pod is not able to connect on port 50000 which is already enabled in my Jenkins.
      Also, I tried to go inside the pod and ping my Jenkins host which is outside my cluster and pod is not able to resolve my Jenkins server IP.
      Please help.
      Thanks in Advance.

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      @@irfanansari6448 Okay. If you think that the slave pods can't talk back to Jenkins master, then I believe the problem lies in the slave pod configuration in your Jenkins master. You know when you configure Kubernetes cloud, further down the line you configure the slave pods and the containers and the image it uses, the volumes and stuff. There you would have configured JENKINS_URL environment variable. There you could specify the ip address of the jenkins master instead of dns name. You just need to make sure that slave pods can talk to Jenkins. Whether its a firewall thing or AWS security group thing, you just need to sort that out.

    • @irfanansari6448
      @irfanansari6448 3 года назад +1

      @@justmeandopensource Thank you, Venkat. I will try and let you know.

    • @justmeandopensource
      @justmeandopensource  3 года назад +2

      @@irfanansari6448 No worries.

  • @ritugoldy
    @ritugoldy 3 года назад

    Thanks for video for very precise demonstration. I tried it but I am facing issue as my slave pod is getting recreated continuously with no console logs in job. Slave is always offline, when debed it further I see connection time out in container logs.
    INFO: Locating server among [9.30.188.30:8080/jenkins/]
    hudson.remoting.jnlp.Main$CuiListener error
    SEVERE: Failed to connect to 9.30.188.30:8080/jenkins/tcpSlaveAgentListener/: connect timed out
    Failed to connect to 9.30.188.30:8080/jenkins/tcpSlaveAgentListener/: connect timed out
    at org.jenkinsci.remoting.engine.JnlpAgentEndpointResolver.resolve(JnlpAgentEndpointResolver.java:214)
    at hudson.remoting.Engine.innerRun(Engine.java:689)
    Appreciate for any comments and directions.

  • @87jaswant
    @87jaswant 2 года назад

    (pending-‘Jenkins’ doesn’t have label ‘kubepods’). jenkin job is stuck with this message.
    i have jenkins running of linux machine and integrated kubernetes.
    please suggest

    • @adejorodamilare1314
      @adejorodamilare1314 2 года назад

      Hi were you able to fix this? I got a similar error.

    • @87jaswant
      @87jaswant 2 года назад

      @@adejorodamilare1314 nopes adejoro

    • @adejorodamilare1314
      @adejorodamilare1314 2 года назад

      @@87jaswant so what did you do eventually.
      Did you drop the architecture and move to something else?

  • @jameeappiskey5830
    @jameeappiskey5830 3 года назад +1

    How we can build docker images using this plugin

    • @justmeandopensource
      @justmeandopensource  3 года назад +1

      Hi Jamee, thanks for watching. Can you explain your requirements in a bit detailed way?

    • @jameeappiskey5830
      @jameeappiskey5830 3 года назад +1

      @@justmeandopensource I meant that how we can build docker images using this plugin. is it possible to make a docker images and then push those docker images into docker repo by using this plugin or setup?

    • @sareddybhaskar
      @sareddybhaskar 3 года назад +1

      @@justmeandopensource Thank you, Venkat I followed your tutorial till the end, I am trying to build the image in the Agent and want to push the build image to my hub I am getting the error docker not found always.
      I try to get a different image with docker installed on the Jenkins agent not starting container can you please help me with this.

  • @venkatdirisala8621
    @venkatdirisala8621 4 года назад +1

    Hiii Venkat I want to deploy my war into eks cluster

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      Hi Venkat, thanks for watching. Have you packaged your war in a container and created an image? The below SO discussion talks about using Tomcat container to package war and ready to be deployed in kubernetes.
      stackoverflow.com/questions/54341432/deploy-war-in-tomcat-on-kubernetes

  • @HoneyHaiderMengha
    @HoneyHaiderMengha 10 месяцев назад

    pod is showing offline
    @just

  • @stilianstoilov3728
    @stilianstoilov3728 4 года назад +1

    Gi Venkat, more suggestions for future videos can be kube-bench and kube-hunter. Really nice tools from Aquasecurity for security purposes:
    github.com/aquasecurity/kube-bench
    github.com/aquasecurity/kube-hunter

    • @justmeandopensource
      @justmeandopensource  4 года назад +1

      Hi Stilian, thanks for these suggestions. I will add them to my list.

  • @harindrabalanagireddy9059
    @harindrabalanagireddy9059 3 года назад +1

    Can Make the same video using a pipeline for multiple containers link for a pipeline (plugins.jenkins.io/kubernetes/)
    example
    podTemplate(containers: [
    containerTemplate(name: 'maven', image: 'maven:3.3.9-jdk-8-alpine', ttyEnabled: true, command: 'cat'),
    containerTemplate(name: 'golang', image: 'golang:1.8.0', ttyEnabled: true, command: 'cat')
    ]) {
    node(POD_LABEL) {
    stage('Get a Maven project') {
    git 'github.com/jenkinsci/kubernetes-plugin.git'
    container('maven') {
    stage('Build a Maven project') {
    sh 'mvn -B clean install'
    }
    }
    }
    stage('Get a Golang project') {
    git url: 'github.com/hashicorp/terraform.git'
    container('golang') {
    stage('Build a Go project') {
    sh """
    mkdir -p /go/src/github.com/hashicorp
    ln -s `pwd` /go/src/github.com/hashicorp/terraform
    cd /go/src/github.com/hashicorp/terraform && make core-dev
    """
    }
    }
    }
    }
    }