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

  Рет қаралды 13,802

Just me and Opensource

Just me and Opensource

3 жыл бұрын

In this video I will show you how to connect Jenkins to Kubernetes and run Jenkins slave agents in Kubernetes cluster as pods.
Learn Kubernetes Playlist:
• Learn Kubernetes
Kubernetes & Jenkins Playlist:
• Kubernetes & Jenkins
Hope you enjoyed this video. Please share it with your friends and don't forget to subscribe to my channel. For any questions/issues/feedback, please leave me a comment and I will be happy to help.
Thanks for watching.
If you wish to support me:
www.paypal.com/cgi-bin/webscr...

Пікірлер: 83
@cyberpau2298
@cyberpau2298 3 жыл бұрын
Thank you very much for all of your videos. I just want you to know that you are one of my KZbin Heroes (alongside with Bucky Roberts of TheNewBoston and Brad Traversy of Traversy Media). Keep it up!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Cyberpau, many thanks for your valuable comment. Cheers.
@sebastianfarias5670
@sebastianfarias5670 5 ай бұрын
Bucky !!! he's so cool!
@ThiruSings
@ThiruSings 3 жыл бұрын
Thank you so much. I had never got this information anywhere else. My kube cluster is working now.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Perfect. Thanks for watching.
@cipher6042
@cipher6042 3 жыл бұрын
This video was very helpful for me with a work task I am performing. Thank you!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Glad it was helpful! Thanks for watching.
@corwaincyrus6840
@corwaincyrus6840 3 жыл бұрын
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 3 жыл бұрын
We need more people like you in this planet :P
@corwaincyrus6840
@corwaincyrus6840 3 жыл бұрын
@@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 3 жыл бұрын
@@corwaincyrus6840 :)
@litan1106
@litan1106 3 жыл бұрын
Great video!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Li, thanks for watching.
@ThanhNguyenVan-ss7yy
@ThanhNguyenVan-ss7yy 2 жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@justmeandopensource thanks. Have a good weekend
@justmeandopensource
@justmeandopensource 2 жыл бұрын
@@ThanhNguyenVan-ss7yy Cheers.
@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 :)
@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.
@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?
@vishalpoptani6762
@vishalpoptani6762 2 жыл бұрын
Do you plan to make the same configuration using Jenkins shared library?
@alexandreoliveira-mq6jd
@alexandreoliveira-mq6jd 2 жыл бұрын
How we connect cluster from azure to a local jenkins?
@TradeWithScence
@TradeWithScence 3 жыл бұрын
Hi Venkat,i open both the port with the loadBalancer,getting tunnel error ,please help me
@kayoutube690
@kayoutube690 Жыл бұрын
is the jenkins slave can run docker build?
@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
@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.
@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
@jaysistar2711
@jaysistar2711 3 жыл бұрын
I like your prompt. What are your PS1, etc. values, and what else did you install to make that happen?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
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.
@nah0221
@nah0221 3 жыл бұрын
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 жыл бұрын
More details needed. Where are you getting the docker not found error?
@HoneyHaiderMengha
@HoneyHaiderMengha 7 ай бұрын
pod is showing offline @just
@bot1511
@bot1511 3 жыл бұрын
Hey, can you make video about deploying GitLab EE or CE with runners and everything else? On Helm option or without?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@@bot1511 NO worries. Thanks for your interest and motivation. :)
@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 Жыл бұрын
Hi were you able to fix this? I got a similar error.
@87jaswant
@87jaswant Жыл бұрын
@@adejorodamilare1314 nopes adejoro
@adejorodamilare1314
@adejorodamilare1314 Жыл бұрын
@@87jaswant so what did you do eventually. Did you drop the architecture and move to something else?
@TheQuranVerses1
@TheQuranVerses1 2 жыл бұрын
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 жыл бұрын
can you help please ?
@justmeandopensource
@justmeandopensource 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 жыл бұрын
@@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
@Anandhasaravanansas
@Anandhasaravanansas 3 жыл бұрын
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 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
@@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 жыл бұрын
@@justmeandopensource Thank you, Venkat. I will try and let you know.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
@@irfanansari6448 No worries.
@venkatdirisala8621
@venkatdirisala8621 3 жыл бұрын
Hiii Venkat I want to deploy my war into eks cluster
@justmeandopensource
@justmeandopensource 3 жыл бұрын
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
@jameeappiskey5830
@jameeappiskey5830 3 жыл бұрын
How we can build docker images using this plugin
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Jamee, thanks for watching. Can you explain your requirements in a bit detailed way?
@jameeappiskey5830
@jameeappiskey5830 3 жыл бұрын
@@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 жыл бұрын
@@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.
@stilianstoilov3728
@stilianstoilov3728 3 жыл бұрын
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 3 жыл бұрын
Hi Stilian, thanks for these suggestions. I will add them to my list.
@harindrabalanagireddy9059
@harindrabalanagireddy9059 3 жыл бұрын
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 """ } } } } }
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thanks for sharing this.
[ Kube 25 Discussion 2 ] Deploying to Kubernetes cluster using Jenkins
19:31
Just me and Opensource
Рет қаралды 23 М.
[ Kube 25 Discussion 1 ] Configuring Jenkins to connect to Kubernetes cluster
19:27
ТАМАЕВ УНИЧТОЖИЛ CLS ВЕНГАЛБИ! Конфликт с Ахмедом?!
25:37
How to Use Kubernetes Pods As Jenkins Agents
25:15
CloudBeesTV
Рет қаралды 54 М.
How to  AUTOMATICALLY Scale Jenkins on a Kubernetes Cluster
16:50
Deekshith SN
Рет қаралды 6 М.
[ Kube 25 Discussion 3 ] Connecting Jenkins to Minikube Kubernetes Cluster
16:27
Just me and Opensource
Рет қаралды 14 М.
How to design a Deployment Pipeline (GitOps)
11:01
DevOps Journey
Рет қаралды 28 М.
Jenkins Master Slave Setup over ssh using SSH keys
18:51
IWTL Academy
Рет қаралды 18 М.
[ Kube 23 ] Dynamically provision NFS persistent volumes in Kubernetes
27:29
Just me and Opensource
Рет қаралды 40 М.
Running Jenkins In Kubernetes - Tutorial And Review
32:33
DevOps Toolkit
Рет қаралды 13 М.
ТАМАЕВ УНИЧТОЖИЛ CLS ВЕНГАЛБИ! Конфликт с Ахмедом?!
25:37