Тёмный
No video :(

How to set up AWS Kubernetes Jenkins pipeline? - Part 13 

Rahul Wagh
Подписаться 45 тыс.
Просмотров 31 тыс.
50% 1

How to set up AWS Kubernetes Jenkins pipeline?
▬▬▬▬▬▬ * Instruction's Guides * ▬▬▬▬▬▬
1. AWS Kubernetes Jenkins Pipeline - jhooq.com/aws-...
2. GitHub Repo - github.com/rah...
In this lab session, we are going to set up the AWS Kubernetes Jenkins pipeline. We will be using eksctl for creating an EKS cluster on AWS.
Setting up a pipeline on AWS requires you to have an active AWS account and you can not use the free tier of AWS because you can not use the EKS cluster on the free tier of AWS.
Here are steps which we will go through -
1. Setting up AWS EC2 Machine - First we need to set up EC2 machine where we will be installing the Jenkins along with Gradle, kubectl, eksctl, docker. We can not use t2.micro instance because we will need more CPU and memory to run Jenkins and Gradle.
2. Connect to EC2 machine - After starting the EC2 machine we will use the private key-pair file to connect to EC2 instance.
3. Install JDK - As we need to install Jenkins so we need to have JDK(adoptopenjdk.net/) pre-installed onto the EC2 machine. For this lab session I will be using adopt open JDK 11.
4. Install and Setup Jenkins - In this step we are going to install Jenkins and also going to the setup admin user
5. Assign administrative privileges to Jenkins user - After installing and setting up the Jenkins on EC2 machine we need to assign root privileges so that we can execute Docker and Gradle commands inside the Jenkins pipeline
6. Install Docker - The next step would be to install docker so that we can create a docker image and push the docker image to docker hub
7. Install and Configure AWS CLI - After installing the docker we need to install and configure AWS CLI so that we can use EKSCTL to set up and start the Kubernetes cluster.
8. Install kubectl - Also along with EKSCTL we need to install Kubectl so that we can view the deployments and services
9. Install eksctl - Now we need to install eksctl so that we can set up and start the Kubernetes cluster without using AWS UI
10. Add docker hub and GITHUB credentials - As we need to clone the github repo and push the docker image to docker hub we need to store credentials of github and docker inside Jenkins.
11. Jenkins script for stages - Once we are done all the above steps we are going to write the Jenkins pipeline scripts for all the stages
▬▬▬▬▬▬ ⭐️ 🕘Timestamps ⭐️ ▬▬▬▬▬▬
2:21 Setup an AWS EC2 Instance
7:17 Connect to EC2 Instance
10:05 Install JDK on AWS EC2 Instance
11:54 Install and Setup Jenkins
17:41 Update visudo and assign administrative privileges to Jenkins user
19:24 Install Docker
25:44 Install and Setup AWS CLI
29:32 Install and Setup Kubectl
31:01 Install and Setup eksctl
33:47 Create eks cluster using eksctl
48:25 Add Docker and GitHub Credentials into Jenkins
50:25 Add Jenkins stages
52:54 Build, deploy and test CI CD pipeline
To learn more on DevOps visit - jhooq.com
Disclaimer/Policy: All the content/instructions are solely mine. The source is completely open-source.
Video is copyrighted and can not be re-distributed on any platform.
#devops #aws #jenkins #cloud #kubernetes #eksctl #docker

Опубликовано:

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 145   
@abhishekgowlikar
@abhishekgowlikar 2 года назад
Most wonder video I ever seen on youtube on CICD with simple explanation. Kudos
@RahulWagh
@RahulWagh 2 года назад
Glad you liked it
@anilkommalapati6248
@anilkommalapati6248 2 года назад
I repent why i have not come across such a wonderful tutorial all these years. Brilliant Rahul. Great work and clear concise and pretty simple. Thanks a million Rahul
@user-bq1ze4zl7p
@user-bq1ze4zl7p 6 месяцев назад
wow...!!Crystal clear ,simple ,easy ..I was looking for this pipeline since long ,,,,first time ever seen this type of explanation about CI/CD pipeline .. you are real champion of DevOps this video boosted my confidence
@RahulWagh
@RahulWagh 6 месяцев назад
Glad to hear that
@gopib4324
@gopib4324 3 года назад
I have become ur fan Boss!! u r teaching is out of this world!! Keep up ur good worK!!
@RahulWagh
@RahulWagh 3 года назад
Thank you so much 😀
@JaiboDelNorte
@JaiboDelNorte 2 года назад
It will great to see logs for POD on the different instance in your AWS each time your hit the URL, amazing video!!
@RahulWagh
@RahulWagh 2 года назад
Thanks for the idea! Generally this session tends to get very long so its really hard to keep the track of every aspect. But i will make a not for the next time
@nikunjrabadiya436
@nikunjrabadiya436 2 года назад
This is the best video I found in recent day on any devops topics Thanks Rahul to make life easy :)
@RahulWagh
@RahulWagh 2 года назад
I hope it was easy to understand
@kullayappatanguturi5761
@kullayappatanguturi5761 2 года назад
Thanks a ton Rahul for the video, got clarified many doubts in this video GREAT EXPLANATION
@attanpashtonculture6870
@attanpashtonculture6870 Год назад
You deserve a millions of followers.such a great tutorials. Appreciate your great work. Keep it up
@RahulWagh
@RahulWagh Год назад
Glad you like them!
@PoojaSharma-hv7yw
@PoojaSharma-hv7yw 2 года назад
I was looking for this pipeline since long. Thanks a lot . It's the best tutorial.
@RahulWagh
@RahulWagh 2 года назад
Glad to know that
@PoojaSharma-hv7yw
@PoojaSharma-hv7yw 2 года назад
@@RahulWagh Just wanted to thank you again for this video. I cracked an interview today :)
@RahulWagh
@RahulWagh Год назад
Sorry for the late reply and but really glad to know you cleared the interview. Best of luck with your new job
@daniellet9180
@daniellet9180 2 года назад
Thank you so much @Rahul for the amazing content and for starting from scratch.
@RahulWagh
@RahulWagh 2 года назад
You are welcome
@mohanbabu9198
@mohanbabu9198 2 года назад
Very nice explanation by detailing each step.
@AkshanshGusain
@AkshanshGusain 2 года назад
You are a life save Rahul. Awesome tutorial.
@RahulWagh
@RahulWagh 2 года назад
Happy to help
@sebasnangsong4144
@sebasnangsong4144 Год назад
Thank you very much Rahul. This video is just perfect and well explained.
@RahulWagh
@RahulWagh Год назад
Most welcome!
@krishnakrgupta
@krishnakrgupta Год назад
Brilliant tutorial.
@CelebsVideopidia
@CelebsVideopidia Год назад
Thankyou Rahul such a great step by step knowledge sharing .... Thank a lot
@RahulWagh
@RahulWagh Год назад
Thanks and welcome
@dileepu2157
@dileepu2157 Год назад
Thank you so much brother amazing and detailed explanation. Just started to learn about devops and this was very helpful.
@pravim2651
@pravim2651 2 года назад
Rahul Bhai amazing videos Your my Guruji , thanks a lot ..... 🙏🙏
@kamkum2k
@kamkum2k Год назад
Rahul, you are amazing, BEST of BEST. Thanks a lot
@RahulWagh
@RahulWagh Год назад
Thanks
@PrashanthBharadwaj-mq5tf
@PrashanthBharadwaj-mq5tf Год назад
Bro... fantastic Explanation.. Got the clear picture !! :)
@RahulWagh
@RahulWagh Год назад
Glad to know
@tharunjulme3002
@tharunjulme3002 Год назад
Thanks a Bunch Rahul for sharing content
@RahulWagh
@RahulWagh Год назад
So nice of you
@eduarmoran
@eduarmoran 2 года назад
excellent video !!!
@RahulWagh
@RahulWagh 2 года назад
You welcome
@hrishikeshshrikant4230
@hrishikeshshrikant4230 3 года назад
its very much impressive Rahul. you can make it very easy. Thank you
@RahulWagh
@RahulWagh 3 года назад
So nice of you, stay tuned for more similar sessions
@PrasadD-fe1fr
@PrasadD-fe1fr Год назад
Thank you so much for sharing such wonderful video bro.. Please keep posting. It is very useful video for everybody.
@RahulWagh
@RahulWagh Год назад
So nice of you
@poonamkamboj5264
@poonamkamboj5264 2 года назад
nicely explained, Rahul. thanks, I was able to follow the steps :)
@uradiprashanthmudiraj5942
@uradiprashanthmudiraj5942 5 месяцев назад
greate video and crestal clear explation ever👏
@RahulWagh
@RahulWagh 5 месяцев назад
Glad it was helpful!
@akshaychaudhari8243
@akshaychaudhari8243 Год назад
Excellent session Boss!!
@RahulWagh
@RahulWagh Год назад
Glad you enjoyed it!
@akshaychaudhari8243
@akshaychaudhari8243 Год назад
@@RahulWagh when do u have plan to make video on complete automation with Terraform, Ansible, Docker, K8s, Jenkins etc.
@RahulWagh
@RahulWagh Год назад
Let see when i get little more time in my schedule may be in the next month you will see
@jesusvalencia3332
@jesusvalencia3332 Год назад
Excellent!
@deepaksabane3068
@deepaksabane3068 2 года назад
Awesome videos whenever I see your videos first I will like then I will see because I know u will explain every steps with details waiting for openshift lecture for deploying application
@RahulWagh
@RahulWagh 2 года назад
Thanks and welcome
@vipinsoni3882
@vipinsoni3882 5 месяцев назад
Nice explanation
@RahulWagh
@RahulWagh 5 месяцев назад
Thanks for liking
@krishm5116
@krishm5116 2 года назад
Awesome sir
@derekmab7734
@derekmab7734 2 года назад
Fantastic tutorial. I really enjoyed it and learned a lot. Thank you very much.
@RahulWagh
@RahulWagh 2 года назад
You're very welcome!
@preethi1530
@preethi1530 2 года назад
Best and clean explanation 👍
@RahulWagh
@RahulWagh 2 года назад
Glad you think so!
@keshavpisal6777
@keshavpisal6777 Год назад
Tremendous explanation 💥🤘❣️
@RahulWagh
@RahulWagh Год назад
Thanks a lot 😊
@Amanullah-lt6fq
@Amanullah-lt6fq Год назад
awesome but you forgot to explain how to connect Kubernetes cluster in Jenkins pipeline
@WaqasAhmed-io6fn
@WaqasAhmed-io6fn Год назад
very nice and helpful
@RahulWagh
@RahulWagh Год назад
Thanks and welcome
@roshanranasinghe6690
@roshanranasinghe6690 2 года назад
Great work Rahul.. Thank you..
@RahulWagh
@RahulWagh 2 года назад
Glad you liked it
@guillaumengoulle7150
@guillaumengoulle7150 2 года назад
Awesome you are the best
@RahulWagh
@RahulWagh 2 года назад
Cheer’s
@himanshusrivastava6540
@himanshusrivastava6540 Год назад
Thanks Really Helpful
@RahulWagh
@RahulWagh Год назад
Glad it helped
@navnathdahibhate2464
@navnathdahibhate2464 2 года назад
Great tutorial!
@RahulWagh
@RahulWagh 2 года назад
Glad you liked it.
@mukundkomandur4430
@mukundkomandur4430 2 года назад
Really this video is great !!
@RahulWagh
@RahulWagh 2 года назад
Glad to know that
@fayeza8279
@fayeza8279 2 года назад
instead of installing aws cli on 24:51, you could attach a role to the jenkins instances with ec2 assume role permissions, saves u the trouble of creating access keys
@RahulWagh
@RahulWagh 2 года назад
Great suggestion
@nilavasen8631
@nilavasen8631 Год назад
Dear Mr. Rahul, Hope you are doing well. Thanks a lot for your kind video. This is really helpful. May I request you to please upload a new video on an end to end Microservice application deployment in AWS EKS .. like from pushing the code in GIT to EKS Deployment ... and the complete flow will be in a pipeline calling BuildSpec.yaml ( including Docker build to create Image) , Kubernetes Manifest file , services.yaml file etc.. I will be highly grateful if you can arrange something like this !! 🙂
@RahulWagh
@RahulWagh Год назад
Will try to put it onto my todo list. Hopefully i will come up something around that in upcoming months
@nilavasen8631
@nilavasen8631 Год назад
@@RahulWagh Happy New Year Rahul !! Hope all is well . Kindly can you please look into this request ? I have some upcoming interviews so will be grateful if you kindly provide something on this . 🙂
@shwetasingh-qi7kq
@shwetasingh-qi7kq 2 года назад
Great tutorial , but now i am more confuse , i have my jenkins application running on Ec2 instance , and i have multiple eks clusters in different aws regions , and i want to connect to my eks cluster , for that i am using Kubernetes plugins in jenkins ans providing, but getting error. connection details in cloud configuration section. also kubctl and eksctl is installed on my local machine., so accessing Eks cluster from my local machine , you seems to skip this step , or am I missing something here?
@RahulWagh
@RahulWagh 2 года назад
Well in past I tried using Jenkins kubernetes plugin but was not satisfied with it. It’s buggy and I think it’s not being maintained by the community
@lakshmanakumar1594
@lakshmanakumar1594 2 года назад
Hii...Can you make video on cluster autos calling...it'll help us so much...bcs your way of explanation is Excellent tq
@RahulWagh
@RahulWagh 2 года назад
Will try surely on cluster auto scalling
@vishalingle7024
@vishalingle7024 Год назад
Thanks 👍 🙏
@RahulWagh
@RahulWagh Год назад
Welcome 👍
@ShitalGadhe-sh7xl
@ShitalGadhe-sh7xl 11 дней назад
What plugins required you don't tell us
@evgen5647
@evgen5647 2 года назад
Does `kubectl apply` inside pipeline work because you configured credentials with `aws configure` previously?
@Nachiketde
@Nachiketde 2 года назад
Which kube context are you using and how did you create that? Did you update aws-auth? any AWS role attached to the machine?
@royking7370
@royking7370 Год назад
Rahul, am new to devops and your videos are awesome very easy to understand, am in the US and is there anyway I can get in contact with you for some guidance, thanks
@rohitgupta-ep3nk
@rohitgupta-ep3nk 2 года назад
It was a great video
@RahulWagh
@RahulWagh 2 года назад
Glad you liked it
@nirmalanirmala-vn5wo
@nirmalanirmala-vn5wo Год назад
Thanks 👍👍👌
@RahulWagh
@RahulWagh Год назад
Welcome 😊
@preethi1530
@preethi1530 2 года назад
When I build in jenkins I got an error like kubectl command not found.. But in my ubuntu I'm able to get commands
@RahulWagh
@RahulWagh 2 года назад
I think either your jenkins user does not have permission to run kubectl command or you did not install the kubectl on jenkins virtual machine
@lakshmanakumar1594
@lakshmanakumar1594 2 года назад
36:50 eks after execution of that command i got an error called...invalid apiversion version string is empty...how can I resolve the issue
@qe6919
@qe6919 2 года назад
Amazing video !!! When do you plan to create a video more automation focused with with terraform, Ansible, docker, EKS, Jenkins, CI/CD all combined ?
@RahulWagh
@RahulWagh 2 года назад
Soon I will prepare something around that just not getting sufficient time
@palanisamy-dl9qe
@palanisamy-dl9qe 2 года назад
did you created any RBAC role for jenkins deployment because i'm getting error while running deployment stage like Error from server (Forbidden): deployments.apps is forbidden and also kubectl auth can-i create deployments --namespace default no
@RahulWagh
@RahulWagh 2 года назад
no i did not create any RBAC for jenkins
@isaacambi1914
@isaacambi1914 Год назад
It says this is 13, where is the beginning please. I want to start and follow from the beginning.
@vijaysarde385
@vijaysarde385 2 года назад
Hi Rahul, Big thank you for taking time and explaining DevOps processes step by step. Appreciate your efforts. I have a one concern - I am not sure from where this "jenkins" user came in picture. Did it get created after installation of Jenkins on EC2 machine? - धन्यवाद !
@RahulWagh
@RahulWagh 2 года назад
Glad you liked it. Jenkins user is created at the time of installation
@lakshmanakumar1594
@lakshmanakumar1594 2 года назад
When we install Jenkins by default Jenkins User has been created... cd /etc/passwd In last we can see the default Jenkins User...then set the password for the user with passwd command
@vijaysarde385
@vijaysarde385 2 года назад
@@lakshmanakumar1594 Thank you very much :)
@navnathdahibhate2464
@navnathdahibhate2464 2 года назад
I have completed this pipeline today, great step by step guide. Do you have guide for Jenkins master slave architecture and deploy to EKS.
@RahulWagh
@RahulWagh 2 года назад
Not yet navnath but may be in future i can prepare around it
@healthybrain9072
@healthybrain9072 3 года назад
Hi Rahul. Trust you are doing great. Your video has been a good refrence for me. Question: I was just thinking about the installation of the docker using jenkins user. Would it give us same result if we spin up a new EC2 instance for installing docker? Would our k8 cluster not be affected if jenkins server has issue? Anticipating your response. Thank you
@RahulWagh
@RahulWagh 3 года назад
Thanks you liked my videos. Answering to you question and as per my experience I would keep isolation between kubernetes cluster and the EC2 instance where i have installed Docker,Jenkins. There is no problem using docker using jenkins user or install docker and jenkins to docker user group but I would always install jenkins on separate server(ec2) and kubernetes cluster on separate(EKS cluster.) If you keep the isoation the way i have explained in the video then there should not be any problem
@wladimirlobato9960
@wladimirlobato9960 2 года назад
Great thank you so much
@RahulWagh
@RahulWagh 2 года назад
You welcome
@cherukurimaniharika7031
@cherukurimaniharika7031 Год назад
Thank you so much for detailed tutorial. Have a doubt! How are we connecting to AWS k8 cluster without providing any AWS creds either in jenkins or jenkins file? Can you please clarify on this. Also, Please tell me the plugin names for docker and k8 that needs to be installed.
@RahulWagh
@RahulWagh Год назад
You need to install the AWS CLI onto your machine so that you can connect to AWS. Also after installing the AWS CLI you need to run the command aws configure where you need to enter access key and secret id
@LeGabruRJN
@LeGabruRJN Год назад
how do i change the final message in the rest end point?
@parames3039
@parames3039 2 года назад
So. Smoothly explanation Can you please explain pipeline how to write. In your way
@RahulWagh
@RahulWagh 2 года назад
Hey paramesh thanks for the comment. sorry i did not get your question about how to write?
@daniellet9180
@daniellet9180 2 года назад
@@RahulWagh He means how to write the JenkinsFile of our pipeline
@gk4976
@gk4976 3 года назад
Hi Rahul it's really amazing and you way to explain is very nice u made simple steps, will you pls share me playlist link for this whole task, as I am unable to find playlist ☺️☺️☺️☺️☺️
@RahulWagh
@RahulWagh 3 года назад
Here are the playlist - 1. Terraform - ru-vid.com/group/PL7iMyoQPMtAOz187ezONf7pL8oGZRobYl 2. Kubernetes - ru-vid.com/group/PL7iMyoQPMtAP4nNc7IqQncWm6DGlIee66 3. Helm chart - ru-vid.com/group/PL7iMyoQPMtANm_35XWjkNzDCcsw9vy01b
@rahulvarma2100
@rahulvarma2100 Год назад
Rahul, where did you provide Kube config details in Jenkins server? How is it able to connect to & authenticate with kibe-api server from Jenkins ?
@RahulWagh
@RahulWagh Год назад
I have installed the kubectl utility on my machine which will take of kube config details
@rahulvarma2100
@rahulvarma2100 Год назад
@@RahulWagh Yes, having the Kubernetes config details on profile will work when kubectl are run from a terminal. But how Jenkins is able to detect those details. It must know some how to look at default Kubernetes config, there must be a plugin installed in your Jenkins setup which is doing that job. In my case (unluckily windows env.), I have kubectl installed & in system path variable. From a command prompt, I'm able to query kibe-api server. But the same kubectl commands are not recognised by Jenkins. I think I miss a plugin here, but no idea which one.
@rahulvarma2100
@rahulvarma2100 Год назад
@@RahulWagh Found the issue. Its because Jenkins is running as system account instead of its own/admin. Due to this, the relevant kubeconfig files are not used by Jenkins.
@RahulWagh
@RahulWagh Год назад
Great to know you found the issue
@shashankchouksey2425
@shashankchouksey2425 Год назад
can you tell us how you connected Kubernetes please let me know plugin used
@RahulWagh
@RahulWagh Год назад
You just need to install kubectl utility and it will take care of the connection
@isaacambi1914
@isaacambi1914 Год назад
Where is the beginning
@rajkishor49
@rajkishor49 2 года назад
sir, pipeline was not able to use kubectl command . It says " rror from server (Forbidden): window.location.replace('/login?from=%2Fswagger-2.0.0.pb-v1%3Ftimeout%3D32s'); " and authentication required ! Help me out of this sir.
@RahulWagh
@RahulWagh 2 года назад
Probably something wrong with your certificates
@anubhavsaxena5079
@anubhavsaxena5079 2 года назад
bro same error....how did you solve it??
@bababackchodji4084
@bababackchodji4084 Год назад
@@RahulWagh sir same error please help
@kazishafin1
@kazishafin1 3 года назад
Sir , how about testing within the CI/CD pipeline ?
@RahulWagh
@RahulWagh 3 года назад
Yes off course you could write unit tests or integration test which can be run and tested along with pipeline. As the video was quite long so it was really hard to incorporate everything into one session.
@RahulWagh
@RahulWagh 3 года назад
I can see you are having trouble tagging the correct docker image name. I would recommend follow these steps and use the correct docker image name along the docker repository name which you have created on docker.hub.com . here is link on how to push correct docker image - jhooq.com/deploy-spring-boot-microservices-on-kubernetes/#step-6-create-docker-registry-at-httpshubdockercom
@RahulWagh
@RahulWagh 3 года назад
Also did you created repository with the name - kazishafin/jhooq-docker-demo on docker hub?
@anjanishrivastava1273
@anjanishrivastava1273 Год назад
Gradle all dont use If I use maven then IMAGE CREATION and then check then image then go to ECR registry so no need to pull only push is OK
@glimglobe
@glimglobe 2 года назад
Thank you for this great tutorial. It was so clear. However, my pipeline fails during Kubernetes deployment. I get the error below + kubectl apply -f k8s-spring-boot-deployment.yml Error from server (Forbidden): window.location.replace('/login?from=%2Fswagger-2.0.0.pb-v1%3Ftimeout%3D32s'); Authentication required . Please can someone help me here?
@RahulWagh
@RahulWagh 2 года назад
Probably you are not able to pull the docker image from docker hub. Need to see the logs there could be many things behind it
@glimglobe
@glimglobe 2 года назад
@@RahulWagh Thanks so much for your reply. I was able to fix the issue. The problem was with my kubectl version. I just had to update my cluster version using the command aws eks update-kubeconfig --name cluster-name It worked and everything built perfectly.
@santoshs3783
@santoshs3783 3 года назад
Thank you Rahul sir..... :) Very nice and simple steps in this video as you shown.
@RahulWagh
@RahulWagh 3 года назад
Keep watching there is more to come
@sunilsubramanya3152
@sunilsubramanya3152 3 года назад
Great tutorial!
@RahulWagh
@RahulWagh 3 года назад
Thank you! Cheers!
Далее
Can You Bend This Bar?
01:00
Просмотров 5 млн
AWS Route 53 Course | Part-15
1:15:57
Просмотров 32 тыс.
How to Use Kubernetes Pods As Jenkins Agents
25:15
Просмотров 55 тыс.
Learn Jenkins! Complete Jenkins Course - Zero to Hero
1:08:28