Deploy a React JS application in AWS EKS using Azure DevOps CI/CD.

Deploy a React JS application in AWS EKS using Azure DevOps CI/CD.

In this article, we will deploy a Hello World React JS application in AWS EKS (Kubernetes) using Azure DevOps CI/CD. This example shows how to use Azure DevOps to deploy applications in an AWS Kubernetes environment.

Create an IAM role for the EKS cluster in the AWS Console.

No alt text provided for this image

Create a new IAM role called "EKSNodeRole" for the EKS Cluster Nodes with the following policy:

No alt text provided for this image

Create an ECR repository now.

No alt text provided for this image

Create an EKS cluster now.

No alt text provided for this image


This is the source code for the Hello World React JS application.

GitHub Source Code https://github.com/srconline/reactapp

Apply the following YML file to create a build pipeline in the Azure DevOps project.

GitHub https://github.com/srconline/reactapp/blob/master/azure-pipelines.yml

Create library variables for parameters.

No alt text provided for this image

You can build your project. Your application image should be visible in AWS ECR.

Now we'll get ready for deployment. Make a Service connection for the Release pipeline.

No alt text provided for this image

Use the following AWS Shell script to deploy the application in EKS,

AWS Shell script https://github.com/srconline/reactapp/blob/master/AWS%20Shell%20Script.txt

No alt text provided for this image

Verify that EKS Nodes are healthy

No alt text provided for this image

Create a new release pipeline that is fed by the build pipeline.

No alt text provided for this image

Enter the load balancer URL into your browser

No alt text provided for this image

You have successfully deployed your React JS application in AWS Kubernetes!

#kubernetes, #microservices, #cloudcomputing, and #devopscommunity , #devops

To view or add a comment, sign in

Explore content categories