Jenkins Pipeline for Microservices Deployment to EKS Cluster | Jenkins Kubernetes Deployment to EKS
ฝัง
- เผยแพร่เมื่อ 15 ธ.ค. 2020
- www.cidevops.com/2020/12/depl...
Source code url is bitbucket.org/ananthkannan/my...
We will use Springboot Microservices based Java application. I have already created a repo with source code + Dockerfile. The repo also have Jenkinsfile for automating the following:
- Automating builds using Jenkins
- Automating Docker image creation
- Automating Docker image upload into Docker Hub
- Automating Deployments to Kubernetes Cluster
Pre-requistes:
1. Amazon EKS Cluster is setup and running. Click here to learn how to create Amazon EKS cluster.
2. Jenkins Master is up and running
3. Setup Jenkins slave, install docker in it.
4. Docker, Docker pipeline and Kubernetes Deploy plug-ins are installed in Jenkins
5. Docker hub account setup in cloud.docker.com
6. Install kubectl on your instance - ยานยนต์และพาหนะ
I just subscribed to your channel and visited your website. Awesome, Going forward would expect more content in devops and DevOps interview experience
Awesome, thank you!
I just subscribed to your channel, outstanding content. Thank you so much Coach.
Thank you so much El Arnold 🙏
Video was simply awesome, very perfect
Glad it was helpful ☺️🤝
Great video... simple to easily understood
Glad it was helpful!
Perfecto and well explained. Thanks
Glad you liked it
Nice tutorial with clear explanation. but one question. here you are connecting to k8s cluster from jenkins master by configuring k8s configuration credential and role bindings. but k8s worker nodes are not part of jenkins slave nodes. So, can we directly add k8s worker nodes as jenkins slave nodes and deploy apps as you explained in video.
Amazing video my friend, thank you ! +1 subscriber
Thanks for the sub!
Good video bro👍 keep going🔥
Thank you, I will
Thanks for this great video :
It would be great if you can share video on below steps :
- Jenkins Master setup on EC2
- Setting up Jenkins slave & installing docker in it.
please watch this video --> th-cam.com/video/kHJGYTcLNj0/w-d-xo.htmlsi=a-CB2SkwGPgLN3xQ
Sir your explanation and documentation superb we need your devops real time coaching
please take a look at many playlists in my channels
Fantastic work
Thank you so much, glad you liked it 👍
Great video. Any chance you can add how to define image:tag as a varible in jenkins?
nice video. but i have a question on mind. Is it secure that directly using kubeconfig file in jenkins credentials.?
Thanks Coach 👌
Any time!
Hi thanks Video is very clear on understanding hands on Jenkin pipeline. Do you have any plan for Openshift?
Will work on it
kindly request you to make a video with same architecture using Bamboo. Your support is highly appreciated all the time.
@DevOps Coach is there a way I can make the pipeline push to a private docker registry instead of a private one ? and then pull the image from the private registry to use it in creating the pods ?
yes you can...please watch other video th-cam.com/video/xWexnx8gro8/w-d-xo.html
one question here? how can you say that it is deploying to EKS? you haven't added any ssh-keys under jenkins credentials? you didn't setup the EKS cluster here as well.
PLease explain
look at the pre-requistes
Thanks for the video.
kubectl create clusterrolebinding cluster-system-anonymous --clusterrole=cluster-admin --user=system:anonymous
After adding above RBAC to anonymous user my jenkins not able to deploy the pod into KES cluster
+ kubectl auth can-i list pods
yes
[Pipeline] sh
+ kubectl auth can-i create deployments
no
ERROR: script returned exit code 1
Finished: FAILURE
i have created jenkins slave and master and installed docker on slave. connected master slave as well but in pipeline while executing its showing error. DOCKER: COMMAND NOT FOUND.
you need to install docker on slave machine.
Where is master node which manages the cluster?
master node is control pane provided by AWS itself...we only create worker nodes
how can we add email approval stage inside pipeline?
You need to use Email Extension Plugin and/or Email Extension Template Plugin
Nice Video.. how to test code in this pipiline?
you can use linter or replay option
hello Bro, can you please share the base code with docker and yaml file
check the details in the video
ERROR: Kubernetes deployment ended with HasError
I get this error can you say what exactly is the error with deployment ,manually am able to do but in pipeline am getting this error in last stage of jenkins
www.coachdevops.com/2020/11/code-error-403-when-trying-to-access.html
check the above link for the fix
Hloo bro....Please make video using Docker private registry instead of docker hub....Thanks in advance by the way how can i reach you
Hi Pawan thanks for the feedback, I do have a video on setting up nexus as private docker registry. Please watch here - th-cam.com/video/YARrewGcVHc/w-d-xo.html
I will post video on integrating with Jenkins pipeline too!
How can i reach you broo
@@pawannani6597 check my website for contacts info - www.coachdevops.com
I am facing an issue that after I deploy the app on EKS the service external IP remains stuck at : and I can't access the spring boot app from a browser any suggestions how to solve that ?
check the image...whose image are you using? check deployment yaml file
@@DevOpsCoach I am using the same repo as in this video ..I asked a friend and they suggested port forwarding so I am now able to access the app on my local machine thank you very much
What command did you do?
@@DevOpsCoach kubectl port-forward 8085:8085 then on my localhost I entered localhost:8085 and was able to access the app from localhost
Hello I'm facing this error failed to get default registry endpoint from daemon (Got permission denied while trying to connect to the Docker daemon socket
make sure you install Docker on Jenkins ec2 instance and also add jenkins user to Docker group
@@DevOpsCoach I've installed docker in slave machine also have to install in master machine?
oh ok. did you try this command? sudo usermod -aG docker jenkins
and you restart Jenkins service
kubernetes-CD plugin is suspended by Jenkins.
yes you can watch this video.. this video using Kubernetes CLI plug-in th-cam.com/video/C1BlN66s9yo/w-d-xo.html
@@DevOpsCoach Thanks, but in my case I don't have permissions to access instance, need to run Jenkins pipelines through yaml files only.