Deploy of Application in Nodes for Amazon Elastic Kubernetes Service
Tags: amazoneks, cloudwatch, ec2instance, aws
Published: 2024-03-17 14:11:04

“ I have checked the documents of AWS to get the solution for deploy of application in nodes for amazon elastic kubernetes service, in such scenario it is possible to deploy application after creation of amazon eks cluster and node with proper iam permissions. In terms of cost, need to pay for services integrated with the scenario.”

Amazon Elastic Kubernetes Service is a managed kubernetes service to run kubernetes in the AWS cloud and on-premises data centers. In the cloud, Amazon EKS automatically manages the availability and scalability of the kubernetes control plane nodes responsible for scheduling containers, managing application availability, storing cluster data and other key tasks. You can take advantage of all the performance, scale, reliability and availability of AWS infrastructure as well as integrations with AWS networking and security services. On-premises, EKS provides a consistent, fully supported kubernetes solution with integrated tooling and simple deployment to AWS Outposts, VM or bare metal servers.

In this post, you will experience how to deploy of application in nodes for amazon elastic kubernetes service. Here I have created a cluster and node group in amazon eks with iam roles.

#Architecture Overview
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lvpmm2rzfl3sr2awc8yq.png)
The architecture diagram shows the overall deployment architecture with data flow, amazon eks, cluster, node group, ec2 instance and cloudwatch logs.

#Solution overview
The blog post consists of the following phases:
1. Create of IAM Cluster Role and Cluster in Amazon Elastic Kubernetes Service
2. Create of IAM Node Role and Add of Node Group in Cluster Created
3. Deploy and Test a Nginx Application in Nodes of Cluster

##Phase 1: Create of IAM Cluster Role and Cluster in Amazon Elastic Kubernetes Service 
1. Open the console of IAM, create a role for the cluster with required aws managed policy. Also open the console of Amazon EKS, create a cluster in required vpc with configurations and add-ons.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cy5lp166lg9resmik91c.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rg5r1neso84z6zfa5kh8.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9jbmbbrxkltdcnemdrd.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bgebh7in2h6gizj6i97k.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/klr8vdb3lh5vlsp5p9rb.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kblxhn8gje2dh3kpr4wv.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wyo56uhe8qf41qibu2v3.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qq6ewxn42frlc5ycawey.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x3h8ogi4i5b572zet41f.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x666021gteqoac9ve31m.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d1qxdfuq3z4plgbcq0wh.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f2g65pu9dxlkhcrul981.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxvzya7o45t6967g0qof.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ffq9qdagzbxrehtwd4j.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ivx4vahvt2cnkp0qca62.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g7kizr476olu2u5yo4ht.png)

##Phase 2: Create of IAM Node Role and Add of Node Group in Cluster Created
1. Open the console of IAM, create a role for node with required aws managed policies. Also open the cluster created in eks, add a node group with required configurations.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/24blx84z6hibwlxb81uv.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xrok17bb41rl93u3v9x4.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tupw1kfscusn5nm5rjo9.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzphy0e8aae78oi4xuhg.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dthrh1tqzwfk0yh5fskh.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lrk9i3iodc8e8f4k7rm.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v1u89btwzlmpu3ayjgu9.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2bfsfanwmrg2083sckjb.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ugus41lek3051ym341i.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4voumib86u4p9sdbvu1.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wes4tub122d18fb7zik5.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5yh04ifh8h6cm7qv35d.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a233b5g7s28r0h60g1r0.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pgvwnkq06llzqpd4ktfj.png)

##Phase 3: Deploy and Test a Nginx Application in Nodes of Cluster 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nle4kxnetpooix63wrwx.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ct3l1mhc9jct7q68zf1h.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxmxsi5mojzojlwa47ms.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umgah50gb072lvuou5a9.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pkhaz2ql3s1u0o3seura.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eb3swtd3lisze27a2y21.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rekdcrbz94s3gmzypy7.png)

#Clean-up
Delete of Amazon EKS(Node Group and Cluster), IAM role and Cloudwatch log group. 

#Pricing
I review the pricing and estimated cost of this example. 

Cost of Elastic Container Service for Kubernetes = $0.58

Cost of CloudWatch = $0.139

Cost of Elastic Compute Cloud = $1.21

Total Cost = $1.929

#Summary
In this post, I showed “how to deploy of application in nodes for amazon elastic kubernetes service”.

For more details on Amazon EKS, Checkout Get started Amazon EKS, open the [Amazon EKS console](https://us-east-1.console.aws.amazon.com/eks/home?region=us-east-1#/home). To learn more, read the [Amazon EKS documentation](https://docs.aws.amazon.com/eks/?icmpid=docs_homepage_containers).

Thanks for reading!

Connect with me: [Linkedin](https://www.linkedin.com/in/gargee-bhatnagar-6b7223114)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/38sdi4nsp89fnui8h7dk.png)