[ Kube 25 Discussion 2 ] Deploying to Kubernetes cluster using Jenkins

  Рет қаралды 23,946

Just me and Opensource

Just me and Opensource

4 жыл бұрын

In this video, I will show you how to deploy resources to Kubernetes cluster using Jenkins through a pipeline script. I will be using Kubernetes and Kubernetes Continuous Deploy plugin for this purpose.
Learn kubernetes playlist:
• Learn Kubernetes
Github Repo:
github.com/justmeandopensourc...
Hope you enjoyed this video. Please share it with your friends and don't forget to subscribe to this 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...
#jenkins #kubernetes #justmekubernetes

Пікірлер: 186
@bjrooney
@bjrooney 4 жыл бұрын
Great Video Venkat. You've made it so simple.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Brendan, Thanks for watching.
@mayurchavhan8590
@mayurchavhan8590 4 жыл бұрын
Great tutorial Venkat. You're awesome!! Thank you for sharing.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Mayur, thanks for watching.
@manueldiera6781
@manueldiera6781 3 жыл бұрын
This is SUPER helpful. Thanks!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thanks for watching. Cheers.
@hrishekessaraghueeti1258
@hrishekessaraghueeti1258 4 жыл бұрын
Awesome video and work! Thanks a lot! Let these videos keep coming! cheeers!!!!!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Sure, this series will keep going.
@SathishKumar-um1ti
@SathishKumar-um1ti 4 жыл бұрын
Nice explanation and all your videos are awesome. Thank you.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Sathish, thanks for watching.
@jpjp-gu5nf
@jpjp-gu5nf 4 жыл бұрын
This is a nice video, thank you !
@justmeandopensource
@justmeandopensource 4 жыл бұрын
HI Jp, thanks for watching. Cheers.
@vincentpham7445
@vincentpham7445 4 жыл бұрын
OMG! He did it, he deployed a Kubernetes with jenkin pipeline. cheers. :)
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Vincent, thanks for watching.
@barkathks8620
@barkathks8620 3 жыл бұрын
Nice Video Venkat...Thank you.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Barkath, thanks for watching. Cheers.
@ahmedyousry784
@ahmedyousry784 4 жыл бұрын
He is a genius
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Ahmed, thanks for watching. Practise makes man perfect.
@Youdude2
@Youdude2 3 жыл бұрын
You can enable smee in an additional sidecar on the latest values.yaml from the Jenkins helm chart to allow Github webhooks if you're behind a firewall
@saigopi5372
@saigopi5372 3 жыл бұрын
That was smooth
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Thanks for watching.
@poshlyak343
@poshlyak343 4 жыл бұрын
Thanks so much for the video. It really helped me. I was looking for how to do this for 2 days. But I had problems with authorization in git, despite the fact that I created сredentials with login and password.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Артем, thanks for watching. Not sure about the issue you are facing. Did it work before and stopped working later or it never worked?
@poshlyak343
@poshlyak343 4 жыл бұрын
@@justmeandopensource It's never working. It works with your open repo. The problem was authorization git. I started the pipeline directly indicating the desired creditianals and it worked. Apparently the problem is in the plugin connecting to the git. If you want, we can continue in a telegram t.me/shulevas
@rajaramkannan5020
@rajaramkannan5020 4 жыл бұрын
Again you nailed it bro..Please can you do one for Jenkins with eks cluster?
@BramMertens
@BramMertens 3 жыл бұрын
Hi Venkat, Thanks for demonstrating that this plugin should work. Some questions I hope you can address. Is the Kubernetes plugin with the cloud connection required for the Kubernetes-continuous-deployment? Or is that just because you use it to deploy the agent? Also: is it required for the deployment to Kubernetes that the Kubernetes instance can connect back to Jenkins? Or is that too only needed because you are running the agent on Kubernetes as well. For me running the agent on Kubernetes as well during this demo creates some confusion. Thanks in advance
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Bram, thanks for watching and sorry for the confusion. You have a valid question. So in this video, I used two plugins. 1. Kubernetes 2. Kubernetes Continuous Deploy The first plugin provides the capability to connect to a kubernetes cluster and run slave agents in the cluster as pods on demand. The second plugin is required if you want to use pipeline stage to deploy manifests/resources to kubernetes cluster. If you are running Jenkins slave agents outside of the cluster, and want to use pipeline to deploy resource into kubernetes cluster, all you want is the second plugin. You don't need to install kubectl binary in your slave machines. The pipeline provides a step that can be used to deploy stuff into kubernetes when that second plugin is installed.
@ferencmolnar1779
@ferencmolnar1779 4 жыл бұрын
Awesome videos! Many many thanks! Can you please make videos for k8s install/running with cri: cri-o and kata containers (micro vm -s) too?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Ferenc, thanks for watching. I will have to explore those first. let me see if I get anywhere with it. Thanks for suggesting that. Cheers.
@rohitshalgar4827
@rohitshalgar4827 3 жыл бұрын
Have one question here, i dont want use kubernetes deployment plugin and want to just add sh "kubectl apply -f deploymentfile" can it be done inside the jenkins slave machine,and how we can send config inside that jenkins slave to connect to cluster?
@vendodt200
@vendodt200 3 жыл бұрын
Awesome! is It possible to use helm3 with jenkins-X on digitalocean or other provider, even not be AKs., Eks, Oke, Azure, Ibm etc?
@shaikidur9341
@shaikidur9341 3 жыл бұрын
Hi venkat your videos are very helpful to us, thanks sharing your knowledge. My requirement is run multiple slave agent nodes parallel from master Jenkins with using Kubernetes loadbalancer. I was fallowing as same as your videos, I have given dummy label name as kubepod, then job is running and pod also creating. But I have given my remote slave agent node name as label name, then job is running and but pod is not creating. I don't why it's happen. Please can you give me any idea and any suggestion. Thanks.
@zawthanoo4184
@zawthanoo4184 4 жыл бұрын
Thanks you so much. My situation is we build docker image first by CircleCI and we keep docker image in Jfrog. And we deploy on clsuter by using Helm. So, if we use jenkings, we need one more pipeline to build docker image(eg: spring project)? First pipeline -> build docker image and keep in docker register. Second pipeline -> to deploy on kubernetes clsuter.
@nareshpandian1321
@nareshpandian1321 4 жыл бұрын
Hi , first you need creat a private registry ,2nd step create a docker file and build a file then push in to docker registry using docker push command in first pipeline , U should use post trigger in jenkins Second pipeline use kubectl coomand to deploy your customized yaml file ( use your customized docker image ) .....it will works ,, Venkat kindly correct me if I'm wrong
@zawthanoo4184
@zawthanoo4184 4 жыл бұрын
​@@nareshpandian1321 I have to create two pipeline. I will test it. thanks for sharing. Cheers!
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Zaw, thanks for watching. I have done a video similar to your request of building/pushing/deploying in this video. See if it helps and adapt it to your needs. kzbin.info/www/bejne/anabYZp7mtNgpZI Cheers.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Naresh, thanks for sharing your thoughts.
@EpicMickeyBR
@EpicMickeyBR 3 жыл бұрын
Unfortunately I'm not able to create the pod remotely, some error happens in SnakeYaml when he tries to create the object through the configuration ...
@Bayaprakashreddyc
@Bayaprakashreddyc 3 жыл бұрын
Hi Venkat, How your command prompt showing commands before entering the command?
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi, thanks for watching. I used zsh-autosuggestions for that. Its a plugin you use with Zsh shell to show suggestions based on the commands you previously entered. I have done a video on my terminal setup long time ago where I explained this. If you are interested here it is. kzbin.info/www/bejne/qaCkqIinZ8iEfrM
@ledung1030
@ledung1030 2 жыл бұрын
hi Venkat! thank for sharing. When I click build now, I have a error: "ERROR: ERROR: java.lang.RuntimeException: io.kubernetes.client.openapi.ApiException: javax.net.ssl.SSLHandshakeException: extension (5) should not be presented in certificate_request". I found the problem. it need add "-Djdk.tls.client.protocols=TLSv1.2 ". how to add it to jenkins agent??? thank you!
@emaadsiddiqui881
@emaadsiddiqui881 2 жыл бұрын
Thanks for the excellent lectures, I have tried this, but getting below errors: Still waiting to schedule task ‘kube-mbmnb’ is offline Pods get created and terminated frequently. Can you please suggest
@mohammadazzu1685
@mohammadazzu1685 3 жыл бұрын
Plz share videos on terraform and ansible integration.. Sir
@miroslavtodorovic1406
@miroslavtodorovic1406 3 жыл бұрын
I see you are using kubeconfig file in Jenkins for auth to EKS cluster. I was wondering how did you create client certs and key, which is obviously necessary to connect to EKS cluster. Without those certs connection to EKS would not work. And what is happening if I do not have those certs, how to auth to EKS?
@liyaodong2
@liyaodong2 4 жыл бұрын
Hi, this is awesome. However I have one weird issue. I'm using macos with minikube. My jenkins is a nodeport instead of using docker to provision the jenkins container. I tried to set credentials but received such error: Error testing connection : java.nio.file.NoSuchFileException: /Users/fans3210/.minikube/ca.crt. I checked the file exist. Strange thing is after I set credential to "none", test connection success. Would be very appreciated if you can explain the cause.
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Yao, thanks for watching. Its nothing to do with Mac but to do with Minikube. I used a proper multi node cluster and not a minikube for this demo. When I get some time I can look into this.
@binaryconsole
@binaryconsole Жыл бұрын
Hi Venkat, Kubernetes Continuos Deployment Plugin is not more available, can you pls suggest alternative or tricks? I am unable to proceed from there, thank you
@MrCiccioTv
@MrCiccioTv 2 жыл бұрын
Hello, was your k8s cluster running on bare metal? Tried to follow your video but could not connect my jenkins running on docker to my k8s cluster running on docker too. I assume they need to be on same docker custom network but I cannot start a minikube joining the same jenkins network. Can you make a video where you do the same setup but connecting to a k8s cluster running on same docker?
@venkateshm9702
@venkateshm9702 3 жыл бұрын
Hi Venkat, Excellent stuff! Could you please explain how to grab these slave PodTemplate configuration into a groovy file, instead of configuring right in the jenkins
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Venkat, thanks for watching. Yes you could but I am afraid I am not a groovy expert. If I get some time I will have a look. Cheers.
@AS-lt5li
@AS-lt5li 4 жыл бұрын
hi I was trying to configure jenkins instance using jenkins kubernetes operator so after deploying all the yaml my jenkins is up and running but i am not able to see my projects in my jenkins, I have added inside the yaml in the seedjob section. I am not finding any clues and where it went wrong. Please help me
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Akash, thanks for watching. I haven't tried deploying jenkins using operators. If you could share a link/documentation of how you did it, I can try to reproduce in my test environment.
@mohinisingh3055
@mohinisingh3055 3 жыл бұрын
When i am running my pipeline.... it is showing jenkins does not have label kubepod......but i have already given the label in the configuration
@alixak4304
@alixak4304 4 жыл бұрын
Thanks very much for this amazing Channel ! It would be nice, if you create a google sheet, where people could propose some Ideas. Also you need to figure out a way for donations :) You are doing a really good work. If you need any help in your channel, it will be an honor for me to help you. I work as a DevOps engineer ;)
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Alix, thanks for watching and thanks for all your suggestions. They are all very valid. You made my day. I do these videos out of passion and not really for money. I once set up a Patreon account following advice from one of the viewer and then deleted it later. I can't commit to all these and now-a-days findind it very difficult to get time to do all these. Cheers.
@aniatingal
@aniatingal 3 жыл бұрын
After all this done,pipeline build says jenkins doesn't have label kubepode. So started with changing 'agent any' then after checkout it is ended with HasError..any help?
@maximusdecimus6125
@maximusdecimus6125 4 жыл бұрын
We have our Cluster in AWS EKS and Jenkins instance with two slaves setup separately in Linux VMs. In our existing system, Our Jenkins builds the Docker Images and push that to Nexus docker registry. on the same pipeline job I would like Jenkins to deploy the Image to our AWS EkS cluster. Is this possible?? what are the prequisites needed on my Jenkins slave. Do I need to install Kubectl or setting up the kubernetes plugins from jenkins will automatically take care of that?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Maximus, thanks for watching. Yes you can use the same pipeline to deploy to the EKS cluster. You can use either approach. You can install kubectl on the slave machines with appropriate kubeconfig files and then in your pipeline add a script stage which runs a script that does kubectl deploy. Or more elegant way would be to use Kubernetes plugin as shown in this video.
@maximusdecimus6125
@maximusdecimus6125 4 жыл бұрын
@@justmeandopensource Thank you for the reply. Don't we need to provide AWS Credentials in Addition to KubeConfig ?
@diegarcho
@diegarcho 2 жыл бұрын
Thanks Venkat, great tutorial, I just have a question because I am having trouble making this work, whenever I run the pipeline it says that the system:anonymous has no permissions to run k8s changes. So it looks like it fails to authenticate with the user I am providing in the .kube/config credentials and defaults to anonymous. I was able to run it by giving cluster-admin permissions to anonymous, but thats a nasty hack. I am using EKS (k8s version 1.17), Could you help me out on this one?
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Diego, thanks for watching. I can understand your problem. I never used a restricted user level kubeconfig. Always used the cluster-admin kubeconfig that has full privilege. What happens when you click "Test Connection" on the cloud configuration page after adding your kubeconfig as jenkins credentials? Do you see any error there?
@diegarcho
@diegarcho 2 жыл бұрын
​@@justmeandopensource I can connect normally to the cluster and the pod spins up wonderfully, but the moment I need to run a kubernetes-cd command it fails as descripted. I have no problem setting up a "Jenkins" Serviceaccount with full priviledges, but I cannot make the plugin use it, it looks like it always defaults to anonymous. BTW, kubernets-cd is only working properly on version 1.0, had other issues with the following ones as well.
@raamstarraamstar5115
@raamstarraamstar5115 4 жыл бұрын
I followed the every steps which you shown but I'm getting like "API call failed". Could you suggest something this in chat.
@bharavikumar363
@bharavikumar363 Жыл бұрын
Hi suppose we have more than one master node how we can specify more than one master node in Jenkins manage nodes configuration
@karthikeyanmohanraj1919
@karthikeyanmohanraj1919 3 жыл бұрын
Hi i tried to use a minikube cluster in my case but fails to create service nginx. Is it possible to use minikube cluster or not(since it is a single node cluster)???
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Karthik, thanks for watching. Can you tell me where exactly you are having issues? I haven't tried it in Minikube though. Were you able to connect your Jenkins to Minikube? Is it during the pipeline job execution it fails? Could you give me more details so that I can try to reproduce at my end. Cheers.
3 жыл бұрын
Do you have a example for a agent with Kaniko to build dockerfile within Kubernetes ?
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi Sebastien, sorry for the late reply. I only managed to do that recently and here is the link. kzbin.info/www/bejne/j5-9gn13grBpgKs
@unixbashscript9586
@unixbashscript9586 2 жыл бұрын
Hello, why did you have to add the secret and that other credential? Didn't both of them end up with contents from the ~/.kube/config file? Thanks!
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Hi, I don’t get your question. Could you please explain it better? Thanks.
@unixbashscript9586
@unixbashscript9586 2 жыл бұрын
@@justmeandopensource hello, so the first time you added credentials, you uploaded your kube config file, if I'm not wrong. The second time, you pasted your kube config file. My question was why do it twice? Maybe one of the times you didn't add the kube config file and I misunderstood. One of the times surely is to allow jenkins connection to the cluster, but the other? Edit: Great content btw and thanks for speaking on such interesting topics and tools!
@justmeandopensource
@justmeandopensource 2 жыл бұрын
@@unixbashscript9586 Ah I see. I will have to watch this video again to see what exactly my intention was. Will get back to you soon.
@shantanuparanjpe8363
@shantanuparanjpe8363 2 жыл бұрын
Hi Venkat, I am using dep.yml file to store the nginx deployment configuration on github repo aling with Jenkinsfile. I am getting "ERROR: No matching configuration file". It seems that the configuration file path is not matched. Not sure how this matching process. How is jenkins performing the match? Can you please?
@AshutoshKumar-mp9yz
@AshutoshKumar-mp9yz 3 жыл бұрын
In the configure cloud section whenever i am adding my kubeconfig file in the credentials and testing the connection. It gives an error message. Error testing connection :: Failure executing: GET at: :/api/v1/namespaces/default/pods. Message: Unauthorized! Configured service account doesn't have access. Service account may have been revoked. Unauthorized. Could you please help?
@sirAvdul
@sirAvdul 2 жыл бұрын
I got error Bad Request after Starting Kubernetes deployment, do I need to create deployment manually first?
@rashadothman318
@rashadothman318 3 жыл бұрын
Much appreciated for the GREAT tutorials.. I am getting "‘Jenkins’ doesn’t have label ‘kubepod’" and the the slave container error and terminating in loop
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Rashad, thanks for watching. I have had that problem sometimes. Its hard to find out but the issue is around pod/container definition in Kubernetes plugin configuration. If you missed something or got something wrong there, you will have this issue. Just double check the configuration.
@rashadothman318
@rashadothman318 3 жыл бұрын
@@justmeandopensource Thanks a lot!!!
@justmeandopensource
@justmeandopensource 3 жыл бұрын
You are welcome.
@MohitVerma-yj1pq
@MohitVerma-yj1pq 3 жыл бұрын
Hi, Same issue was with me. I did 2 things 1) while spinning up jenkins container I have exposed port 50000:50000 along with 8080:8080 in my docker compose file. this Issue- resolved -> java.io.IOException: Failed to connect to 192.168.43.92:50000 2) manage jenkins --> global security--> agents-->agents port to 50000 and check agent protocols box this issue resolved by this--> Server reports protocol JNLP4-connect not supported
@rashadothman318
@rashadothman318 3 жыл бұрын
@@MohitVerma-yj1pq Hey Mohit, Make sure you expose jenkins tunnel x.x.x.x:50000 as well
@rajd2145
@rajd2145 4 жыл бұрын
HI Venkat. nice tutorial. I am a new to jenkins and kubernetes. Somehow I am getting "‘Jenkins’ doesn’t have label ‘kubepod’" and the the slave container error and terminating in loop. I ran through your videos coupl eof times. not sure what I may be missing
@rashadothman318
@rashadothman318 3 жыл бұрын
I am facing same issue "Jenkins’ doesn’t have label ‘kubepod"
@kapilkaushal6178
@kapilkaushal6178 3 жыл бұрын
Hi Venkat , I have created my Master node and 1 worker node on AWS Ubuntu Instance. And My Jenkins is on other AWS Ubuntu machine. I have installed the jenkins plugins "Kubernetes" & "Kubernetes deploy" but when i try to add the kubernetes secret credentials then it is not showing me into the configuration to test the connection. Can you please advise.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Kapil, thanks for watching. Do you mean in the Kubernetes cloud configuration page you are not seeing the credential that you added? I have done a follow up video to this one. Have a look and check if you are following the same steps. kzbin.info/www/bejne/hZfScoyMnpaMmbc Cheers.
@kapilkaushal6178
@kapilkaushal6178 3 жыл бұрын
@@justmeandopensource Thanks Venkat. I am able to add the secrets now. As i am new to kubernetes and I have a basic queries. 1. When we deploy our app then where it gets deployed ? In a master or in a worker. 2. Can we have multiple worker into the same machine or into the same ec2 instance. 3. I have installed the kubernetes in ec2 instance and i have created 1 master and 2 worker into the similar ec2 machine. Hence i need to understand the significance of worker node. How to decide the number of worker we require for the application. 4. As the replica set is going to provide the high availability for our application then why we require the worker node. As a beginer in kubernetes my queries might be silly but to understand the basics to peoceed further Please advise.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
@@kapilkaushal6178 Cool. I am happy to help with your queries whenever I get some time. 1. Usually master nodes will have taints which prevents any user workloads getting scheduled in master nodes. So all your workloads will land in the worker nodes. In theory, it is a good practice to not schedule the normal workloads in master nodes. 2. No you can't. But if you can run more worker nodes in individual virtual machines on the same instance. 3. Worker nodes are to be choosen based on the number of apps you intend to run and the memory and cpu requirements for your workloads. Start with low and increase it as you need it. 4. worker nodes are the places where your applications will be running in docker containers. Worker nodes are part of the kubernetes architecture. Replicaset is just a concept in Kubernetes.
@kapilkaushal6178
@kapilkaushal6178 3 жыл бұрын
@@justmeandopensource Thanks venkat and appreciate for your quick response. As per my information if we are deploying any app on kubernetes cluster then it will gets deployed into any of the worker node and inside the worker node we do have Pods running and we did the configuration of pods for HA and scalibility etc as part of the yaml file. Now Lets say if there is only single worker node in our ec2 machine then our application will always be deployed on that worker node itself. So are we adding more workes and attaching them with master to have a high availability of our setup ? Coz we have already configured the HA for our application as part of the Yaml file by using replicaset etc. Also is it possible to connect with you for any advise regarding my usecase.
@octovianuspabubung9981
@octovianuspabubung9981 Жыл бұрын
Kubernetes cd plugin is no longer supported by jenkins. And my pipeline is not running when execute deployment.yaml . Do you have any alternative? Thank you. I am new in devops
@tamilselvan8343
@tamilselvan8343 4 жыл бұрын
hi venkat sir, can u please explain difference between docker containers and linux containers??what was the benefit of using linux container instead of docker container?? one more thing what is the use of exposing port 50000 in jenkins??? Another question is u are configured dynamic pod with one docker container,but in ready column says 2/2 how it will come.Either my assumption is wrong???
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Tamil, thanks for watching. Linux containers are set of isolated processes running and sharing the same host kernel. archives.flockport.com/lxc-vs-docker/ Port 50000 is exposed from Jenkins as that is the port through which slave communication happens.
@tamilselvan8343
@tamilselvan8343 4 жыл бұрын
@@justmeandopensource thank u Venkat for ur suggestion
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@tamilselvan8343 You are welcome.
@tamilselvan8343
@tamilselvan8343 4 жыл бұрын
@@justmeandopensource hi Venkat can u please reply the my last question..
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@tamilselvan8343 That must be an init container. Please check kubectl describe output.
@ramansharma2417
@ramansharma2417 4 жыл бұрын
Hi Venkat, I am getting an error while start my jenkins job ErrorImagepull and the pod is terminating immediately
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. ErrorImagePull means the cluster can't pull the container image you specified for some reason. It could be network issue. Do you have any intermittent problems with your network accessing internet. Did you specify the correct image name? Is the image a valid image? You can do a docker pull of that image from your local machine to see if you can successfully pull it. Where is the image hosted? Is it a private repository? If so have you provided the credentials for the private repository.
@ramansharma2417
@ramansharma2417 4 жыл бұрын
nginx.yaml file i am using which is in your repository and JenkinsFile with branch test-deploy-stage.I am doing practise on EC-2 Ubuntu instances and able to pull image of nginx without any issue using docker.
@dipakgiri3248
@dipakgiri3248 3 жыл бұрын
Showing this error : Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Service; exception=Class not found: io.kubernetes.client.openapi.models.V1Service in 'reader', line 1, column 1: apiVersion: v1 ^
@febi881
@febi881 4 жыл бұрын
Thank you so much for the great efforts. I need a help to configure the same. I have a test kubernetes cluster with 1.18.3, by following the video i am able to configure the ci-cd-pipeline with external jenkins and docker local registry. But at the pod deployment stage i am getting the following error. Did a lot of research but not succeeded yet. Kindly advise if you have see this issue before. Kubernetes version: Client Version: v1.18.3 Server Version: v1.18.3 Jenkins : latest version. Starting Kubernetes deployment Loading configuration: /var/jenkins_home/workspace/demo1_master/myweb.yaml ERROR: ERROR: Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment in 'reader', line 1, column 1: apiVersion: apps/v1 ^ The exception is see is below: Caused by: hudson.remoting.ProxyException: org.yaml.snakeyaml.error.YAMLException: Class not found: io.kubernetes.client.openapi.models.V1Deployment
@abhinavkapula9283
@abhinavkapula9283 3 жыл бұрын
Downgrading some plugins worked for me. Jackson 2 API 2.11.2 -> 2.10.3 Snakeyaml API 1.26.4 -> 1.26.3 Kubernetes Client API 4.9.2-2 -> 4.9.2-1 Kubernetes Credentials 0.7.0 -> 0.6.2
@akashrakhe8086
@akashrakhe8086 4 жыл бұрын
Hi, I am getting this error " Error testing connection : java.net.UnknownHostException: kubernetes.default.svc: Name does not resolve" when i upload config file and try to test connection
@keerthireddy4084
@keerthireddy4084 3 жыл бұрын
hey have u solved it
@hrishekessaraghueeti1258
@hrishekessaraghueeti1258 4 жыл бұрын
at 19:04 why is the slave pod that ran the pipeline got terminated
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. That is the slave pod that got launched dynamically for the job and when finished running the job, the slave pod will get terminated as we configured it to terminate after the job run.
@rahulraj-yz5el
@rahulraj-yz5el 3 жыл бұрын
hi venkat could you please make video to deploy images through jenkins with helm
@atulbarge7445
@atulbarge7445 4 жыл бұрын
hi venket please create video for nexus and sonar Qube on kubernetes pod , i have tried but its still not complete
@justmeandopensource
@justmeandopensource 4 жыл бұрын
HI Atul, thanks for watching. I will look into it when I get some time. Meanwhile you can follow the below post. devopscube.com/setup-nexus-kubernetes/ Just change "extensions/v1beta1" to "apps/v1" for deployment manifest. Or you can use helm for this.
@mhdbll7970
@mhdbll7970 4 жыл бұрын
Hello, when i put the config file as credentials on kubernetes cloud configuration and i test connection i got Error testing connection : java.net.SocketException: Broken pipe (Write failed), does anyone have any idea about this?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi, thanks for watching. Have you tried pasting the content of the kubeconfig file in the credential field? I am sure it will work. Please double check your steps and that you have access to your cluster and firewall stuff and so on.
@mhdbll7970
@mhdbll7970 4 жыл бұрын
@@justmeandopensource I really appreciate that you respond to our questions, i don't want to waist your time, but how can i check that i have access to cluster ? I thought that cheking the acces to the kubernetes master physical server is enough
@shantanusohni3615
@shantanusohni3615 4 жыл бұрын
I am using gcp kubernetes cluster, when I copy & paste kubeconfig into my Jenkins but kubeconfig's token expired in every 20 minutes, can you give any solution for this???
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Shantanu, thanks for watching. I am aware of this case that the authentication from kubeconfig is valid only for certain time and then the token expires. I don't use GKE clusters on a daily basis so no idea. I will have to explore the options. Will let you know if I find one. I haven't tried the below plugin but this might be of some help. cloud.google.com/blog/products/devops-sre/introducing-the-jenkins-gke-plugin-deploy-software-to-your-kubernetes-clusters
@shantanusohni3615
@shantanusohni3615 4 жыл бұрын
@@justmeandopensource thanks for reply
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@shantanusohni3615 No worries. Cheers.
@ravipamarthy
@ravipamarthy 4 жыл бұрын
You can refer to this url from cloudbees but works otherwise too. support.cloudbees.com/hc/en-us/articles/360038636511-Kubernetes-Plugin-Authenticate-with-a-ServiceAccount-to-a-remote-cluster
@venkateshpakanati2103
@venkateshpakanati2103 4 жыл бұрын
I'm using below Jenkinsfile content to checkout and build code through maven container, not sure why maven container not able to access public network as it's throwing below error Is there any configuration so that maven container can reach internet? mvn clean package [INFO] Scanning for projects... Downloading from central: repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-starter-parent/2.1.6.RELEASE/spring-boot-starter-parent-2.1.6.RELEASE.pom [ERROR] [ERROR] Some problems were encountered while processing the POMs: [FATAL] Non-resolvable parent POM for com.example:CacheProject:1.0.0: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.1.6.RELEASE from/to central (repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/78.47.226.171] failed: Connection refused (Connection refused) and 'parent.relativePath' points at no local POM @ line 6, column 10 Below is the Jenkinsfile code ------------------------------------------------- def label = "worker-${UUID.randomUUID().toString()}" podTemplate(label: label, containers: [ containerTemplate(name: 'maven', image: 'maven:3.5-jdk-8', command: 'cat', ttyEnabled: true) ], ) { node(label) { stage('Checkout Code') { checkout scm stash name: "code-stash", includes: "**/*" } stage('Build Code') { container('maven') { unstash "code-stash" sh "mvn clean package" } } } }
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Venkatesh, thanks for watching. Sorry, no idea about this problem.
@PraveenKumar-ur9il
@PraveenKumar-ur9il 4 жыл бұрын
Hello bro need your help i have a kubernets cluster deployed on AWS private subnet and my jenkins pod is in private subnet but my jenkins pod not able to connect to the download centre i am running kubernetes 1.18.0 and network CNI calico can you please help me out on this issue
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Praveen, thanks for watching. So you have a private subnet. Have you got a nat gateway in a public subnet in the same vpc and an associated route in private subnet to route traffic to nat gateway for outside access? Have you checked if the ec2 instances in your private subnet can access internet? If they can access the internet, then pods running inside them will also have access.
@PraveenKumar-ur9il
@PraveenKumar-ur9il 4 жыл бұрын
Yes my ec2 instance is having access but my pod is not having access I tried to figure out but no luck can you please help me out struggling for past 1week
@pkumar5049
@pkumar5049 3 жыл бұрын
Hi Very informative video. I want to spin a pod from Jenkins on kubernetes that should have ubuntu as one of the container. How do I configure Jenkins to do that ? Any suggestion on that will be great.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Prateek, thanks for watching. If you want to deploy anything to Kubernetes from Jenkins you need Kubernetes and Kubernetes Continuous Deploy plugin installed as shown in this video. You want to deploy a pod that has an ubuntu container. Basically you would have created a docker image for that ubuntu container and have it in docker hub or in some other image repository. You need to have a manifest (yaml file) that contains the definition of the deployment/pod/container spec. You can then basically follow the pipeline example script I showed in this video to deploy that manifest. In the pipeline script, I had kubepod label in the agent section. You can just run it directly on the master. Hope this makes sense.
@pkumar5049
@pkumar5049 3 жыл бұрын
@@justmeandopensource Thanks for reply. I will try the same.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
no worries.
@pkumar5049
@pkumar5049 3 жыл бұрын
@@justmeandopensource Will be great to have a demo of the following in order 1) Setting up kubernetes with worker nodes 2) Creating manifest for existing image or customized 3 )Creating pipeline script for Jenkins to deploy the manifest 4 ) Configuring Jenkins to run builds simultaneously on different pods. In that way we have all the different components covered.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
@@pkumar5049 I will try. I have already covered points 1, 2 and 3 in various videos in my Learn kubernetes playlist. The only missing part will be point 4. I will see if I can do that. Cheers.
@TheDheeraj1996
@TheDheeraj1996 3 жыл бұрын
Hi Venkat, [I am using minikube] In Jenkins Cloud Configuration > After adding Kube Config file and on Clicking Test. I am getting this error "Error testing connection : java.nio.file.AccessDeniedException: /home/dheeraj/.minikube/profiles/minikube/client.key" .. COULD YOU PLEASE HELP ME WITH THIS ?
@keerthireddy4084
@keerthireddy4084 3 жыл бұрын
have u solved this error
@pranav__07
@pranav__07 2 жыл бұрын
@@keerthireddy4084 same problem
@justmeandopensource
@justmeandopensource 2 жыл бұрын
Guys, sorry about the late reply. I will test this and release a video soon.
@pranav__07
@pranav__07 2 жыл бұрын
@@justmeandopensource ❤️
@dhirendrayadav7443
@dhirendrayadav7443 4 жыл бұрын
I tried kubeconfig as secret file credentials but getting error "Error testing connection : java.net.SocketTimeoutException: connect timed out"
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Dhirendra, thanks for watching. Where is your cluster running and where is your Jenkins running? Can the Jenkins machine access the network Kubernetes cluster is in? Is there a firewall of some sort preventing?
@abhinavkapula9283
@abhinavkapula9283 3 жыл бұрын
I am getting the following error from Jenkins pipeline: " Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment in 'reader', line 1, column 1: apiVersion: apps/v1"
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Hi Abhinav, thanks for watching. What version of Kubernetes are your testing this against? This will work only if you are running v1.16 and above.
@abhinavkapula9283
@abhinavkapula9283 3 жыл бұрын
@@justmeandopensource I am using v1.19. I tried this several times, but still am getting stuck with this step everytime.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
I will re-test this today. How is your Kubernetes cluster provisioned? Or how is your setup different to mine shown in this video. I want to use a similar setup to yours for testing. Cheers.
@abhinavkapula9283
@abhinavkapula9283 3 жыл бұрын
@@justmeandopensource I have been following your previous videos and setup my cluster through vagrant and vbox. Previously I tried with GKE cluster but had problems with GCP authentication from Jenkins pipeline.
@justmeandopensource
@justmeandopensource 3 жыл бұрын
Okay. I will try it and let you know.
@sambasiva1702
@sambasiva1702 4 жыл бұрын
What is clusterk8config file ?
@MatheusOliveira-ro6gd
@MatheusOliveira-ro6gd 4 жыл бұрын
Olá, você poderia ensinar a deixar o terminal exatamente como o do vídeo?
@justmeandopensource
@justmeandopensource 4 жыл бұрын
HI Matheus, thanks for watching. I have done few videos on how I customized my terminal and desktop environment. You can follow them in the below playlist. kzbin.info/aero/PL34sAs7_26wOgqJAHey16337dkqahonNX Cheers.
@MatheusOliveira-ro6gd
@MatheusOliveira-ro6gd 4 жыл бұрын
@@justmeandopensource thank you bro, nice meet you
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@MatheusOliveira-ro6gd No worries. Thank you.
@MatheusOliveira-ro6gd
@MatheusOliveira-ro6gd 4 жыл бұрын
@@justmeandopensource Hello, I met your channel a little while ago and... I am enjoying your content :D Can you help me something? Lately I have been trying to use grafanna and Loki for get metrics and logs by distinct nodes But the promtails (grafanna Loki agent) dont sent the metrics and logs for the Loki data source Have you had this problem? My config: pastebin.com/6BmvBRSz
@JacksonMagnabosco
@JacksonMagnabosco 3 жыл бұрын
ERROR: ERROR: Can't construct a java object for tag:yaml.org,2002:io.kubernetes.client.openapi.models.V1Deployment; exception=Class not found: io.kubernetes.client.openapi.models.V1Deployment
@VirajRashmika
@VirajRashmika 3 жыл бұрын
me also getting same error
@nagarajunagari2266
@nagarajunagari2266 4 жыл бұрын
Sir, thx 🙏for video, How to get the kube config file in k8s,where is it ?Anyone Plz let me know ..
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Nagaraju, thanks for watching. It depends on how your cluster was provisioned. Usually it will be in the master node at /etc/kubernetes/admin.conf. Cheers.
@nagarajunagari2266
@nagarajunagari2266 4 жыл бұрын
@@justmeandopensource Thank a lot Sir for you Reply and support .it's valuable .🙏
@justmeandopensource
@justmeandopensource 4 жыл бұрын
You are welcome.
@ahmedyousry784
@ahmedyousry784 4 жыл бұрын
yea its work now thank you for your helping me can i get your contact
@justmeandopensource
@justmeandopensource 4 жыл бұрын
HI Ahmed, thanks for watching. Glad that I was of some help. If you are interested you can join the slack workspace for this channel. Here is the invitation. kzbin.info?q=https%3A%2F%2Fjoin.slack.com%2Ft%2Fjustmeopensource%2Fshared_invite%2FenQtODg4NDcxMTg5Mjk2LTgyNWJkMzlmNzRlMDdhYzc2ZjA3NjA0N2ZkODg5NzAyMzNjMGY4OGJjZDkzNmRhNDU1ZjEzZjc1NzhiMjBlMmI&event=channel_banner&redir_token=WbWGgN30gxnQ9x3y2C-lJf4ftY98MTU4NjUxMjIwNUAxNTg2NDI1ODA1
@ahmedyousry784
@ahmedyousry784 4 жыл бұрын
how do i add files from git to my pod
@justmeandopensource
@justmeandopensource 4 жыл бұрын
Hi Ahmed, thanks for watching. You can use an init container to pull data from Github to a volume and then start the pod with this volume mounted. This is one of the usecase we have for init containers. kzbin.info/www/bejne/gGW2kICcqKiDftE Cheers.
@ahmedyousry784
@ahmedyousry784 4 жыл бұрын
@@justmeandopensource thats nice but i want to create buy jenkins pipline to get commit from github and put it on pod
@ahmedyousry784
@ahmedyousry784 4 жыл бұрын
can you create vedio for this
@justmeandopensource
@justmeandopensource 4 жыл бұрын
@@ahmedyousry784 Your usecase is not very clear to me. There are a million ways to get this thing working. My focus on this series is not about ci/cd but how to set one up in Kubernetes.
@ahmedyousry784
@ahmedyousry784 4 жыл бұрын
@@justmeandopensource I want to make ci/cd on kuber
@Ruboded
@Ruboded Жыл бұрын
The plugin is suspended :(
@rajd2145
@rajd2145 4 жыл бұрын
Ha..Ha I was able to fix it. The port 50000/tcp was not opened on my Jenkins server.
@gdevelek
@gdevelek 2 жыл бұрын
If you not building anything with Jenkins, and you are deploying a known image, what is the point? It defeats the purpose....
@akashhr6373
@akashhr6373 Жыл бұрын
the plugin is no longer supported by jenkins
@versavidsind
@versavidsind 3 жыл бұрын
Great, It is cool! I tried running this in a similar way but my slave pod gets in an error state saying. SEVERE: Failed to connect to localhost:8080/tcpSlaveAgentListener/: Connection refused (Connection refused) here is the code I'm using: github.com/uditgaurav/jenkins-template
[ Kube 25 Discussion 3 ] Connecting Jenkins to Minikube Kubernetes Cluster
16:27
Just me and Opensource
Рет қаралды 14 М.
[ Kube 25 Discussion 1 ] Configuring Jenkins to connect to Kubernetes cluster
19:27
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 47 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 13 МЛН
How to Use Kubernetes Pods As Jenkins Agents
25:15
CloudBeesTV
Рет қаралды 54 М.
How to set up AWS Kubernetes Jenkins pipeline? - Part 13
58:51
Rahul Wagh
Рет қаралды 30 М.
The IDEAL & Practical CI / CD Pipeline - Concepts Overview
22:36
Be A Better Dev
Рет қаралды 468 М.
[ Kube 25 Discussion 1.1 ] Running Jenkins slave agents in Kubernetes
16:51
Just me and Opensource
Рет қаралды 13 М.
Learn Jenkins! Complete Jenkins Course - Zero to Hero
1:08:28
DevOps Journey
Рет қаралды 728 М.
How to design a Deployment Pipeline (GitOps)
11:01
DevOps Journey
Рет қаралды 25 М.
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 47 МЛН