eks-pipeline

Pipeline to do deployment on EKS cluster using jenkins, based on the envornment selected.

Assumptions :

You have already eks cluster and jenkins installed. On jenkins server install git, kubectl .

[root@ip-172-31-24-61 eks-deploy]# cp /root/bin/kubectl /usr/bin [root@ip-172-31-24-61 eks-deploy]# cp /root/bin/kubectl /usr/local//bin

Steps 1:

Create a role using which ec2 instance can generate the kubeconfig file of eks cluster and assing it to jenkins server.

Step 2:

Create new job "eks-deploy" of the type pieline.

image

Make this job as a parametrized and add two parameter "environment and aws-region" Depending on the envirnment and region we can select the cluster.

image

image

image

Now past the jenkinsfile code in pipeline and save it.

And build the job with parameter.

image

And check the output in console section.

Have attach output in console.log section.