CICD Pipeline to deploy Kubernetes Applications using Terraform, EKS, and Jenkins

preview_player
Показать описание
This video walks you through the steps of creating a CI/CD pipeline using Jenkins. Here are the steps we followed:
# Jenkins-pipeline-deploy-to-eks
# Project Name: End-to-end deployment of Applications to Kubernetes using a Jenkins CI/CD Pipeline
#Steps for the project

1. Create a Keypair that matches your keypair
2. Create a Jenkins Server with all the dependencies, libraries and packages needed.
3. Once completed, access the Jenkins server and set it up
4. Run the Jenkins-pipeline-deploy-to-eks to create Kubernetes Cluster, create deployments and Services
5. Test that the application is running.
6. Destroy infrastructure
Here is the link to access the repositories where the code is found:

#devops #jenkinspipeline #kubernetes #aws #innovation #infrastructure #terraform
Рекомендации по теме
Комментарии
Автор

Wow, this video is absolutely fantastic! 🌟 The way you explained the concepts was incredibly clear, and I really appreciate the effort you put into providing such valuable content.

manlaisabella
Автор

Perfect man! this is what I was looking for, followed your step and just did it. trying to work around a custom app and deploy different environments like staging, and testing a rough idea would be great. Thanks a lot for saving my week.

techienoor
Автор

Thank you for the excellent tutorial. There is one error of note (in 'jenkins-server-script.sh').
ERROR: "public key for is not installed"
- This prevents Jenkins to be installed and running. I spent some time troubleshooting this. Here is the fix I found:

__FIX__
Replace:
- sudo yum install jenkins -y
with
yum install jenkins --nogpgcheck

I hope this helps somebody. Cheers... - Joseph P.

joepp
Автор

Detailly explained. Ama definitely gonna give a try following this tutorial.
Thank you sir!

solidman
Автор

Bravo 👏. This video came right on time. Thanks for your time and for putting up such rich content .

animnjogho
Автор

it was a very interesting insightful in this video but it will be very helpful if you could help on below:

1: You created a New VPC and instance via terraform as per video time 14.30, but suppose we have a VPC name main-dev in a AWS account and in the same VPC we install multiple cluster, ec2 etc already. so how we can use existing VPC and attach desired IAM role, Security group etc.
2: How we can install multiple instances in same .tfstate file in same VPC

tzcunnv
Автор

Thanks for putting the work together for everyone to gain some knowledge. I wasn't able to deploy to EKS from my Jenkins Pipeline. It kept throwing an error that kubectl command can't be found in the temporary directory created in the Jenkins workspace, but I have kubectl installed with execution permission. I didn't create the cluster with terraform module.

adedapooluwajimi
Автор

Thank you so much for your video .Could also do a video to show how to create all terraform files you used to deploy the cluster? please

yawotentegue
Автор

Excellent tutorial. My recommendation is to use Python or shell script to organize and run terraform code, and just use Jenkin for your CI/CD pipeline. If you could demo a simple application with the CI/CD pipeline is even better, in which you can include web hook, unit test, security scan, smoke test, etc. in the pipeline, and independent of infrastructure code - terraform. Look forward to your next tutorial. Thanks,

mikedqin
Автор

Thanks for your tutorial! :)
Just a small question in the Jenkins part:
In your JenkinsFile I see you define the variables: AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, but you never use it to execute the "sh "aws eks update-kubeconfig --name myapp-eks-cluster". Can you telle me pls why or if I am missing something? :)
Because normally we use "withCredentials( )" function to use those credential Variables inside JenkinsPipeline.

Or is it enough just in the ec2 instance add the credentials manually using "aws configure" in the console? :)
Thanks again for your support! :)

DNTgrowth
Автор

@Primus after creating nginx application, do we need to use terraform destroy only once in terraform directory? Or do we need to apply once again in k8 directory? If we want to use destroy in multiple directories, what is the order of destroying? Thanks in advance

ravitejakavya
Автор

Thank very much for this quality teaching but I am stuck in deploying my app. Here is the complain "Unable to connect to the server: dial tcp xx.x.x.xx:443: i/o timeout" please what is the way out?

myroyalluv
Автор

Quick question, did you have an already created cluster prior to running the create eks cluster pipeline? I am getting No cluster found for name: calcapp-eks-cluster.

basebandit
Автор

For some reason my LoadBalancer can't be created, EKS creation and kubernetes deployment return success, but mu LoadBalances is not created. Google says that there is problem with public/private subnets. Do we assign private subnets to our LB ? Or is it publicly open for anyone ?

Error shown on AWS EKS deployment section:
Error syncing load balancer: failed to ensure load balancer: could not find any suitable subnets for creating the ELB

rfprtiu
Автор

Hey Bro, Awesome work here, really appreciate the content, have a doubt in terraform part that how terraform will come to know about my aws account where it has to deploy ec2, subnet, etc, also can we use default vpc or vpc is also required,

ujjawalchaturvedi
Автор

Thanks very much realy helpfull. Also I didn't find your repo in git hub? So that i can get the code for me to practice too.

ngweleonardbequicke
Автор

Thanks for your effort .The is trowing some error and pipeline is failling

yawotentegue
Автор

What is the role and responsibilities of this project sir coz I want to add in my cv

archanadhage
Автор

Also i'm not able to initialize the backend even after providing credentials for accesskey and secret key.
i did not find anything in video where to and how to do.?

shubhamjain
Автор

@primuslearning4235 I tried the tutorial but jenkins wasn't installed on my server. I see that some others had the same issue. Do you have a resolution for this please ?

mgfhmcx