How to set up AWS Kubernetes Jenkins pipeline?
▬▬▬▬▬▬ * Instruction's Guides * ▬▬▬▬▬▬
1. AWS Kubernetes Jenkins Pipeline - jhooq.com/aws-kubernetes-jenk...
2. GitHub Repo - github.com/rahulwagh/k8s-jenk...
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
Негізгі бет Ғылым және технология How to set up AWS Kubernetes Jenkins pipeline? - Part 13
Пікірлер: 144