How to deploy your simple nginx service in AWS EKS.
You already have a Kubernetes Cluster running, or else you can read my article How to create your first AWS EKS cluster using eksctl and get up and running with Amazon EKS very quickly.
Published Dec 28, 2023
Introduction :
in this article demonstrate how you can get up and running with your first deployment into your Amazon EKS (Kubernetes) and how you can access this outside your cluster using the Amazon Elastic Load Balancer.
The only thing you need to know here should be how Kubernetes works and how you write your YAML files for Kubernetes, the rest will help you with this.
Start Creating your files deployment and service yaml. the deployment will contain our service, replicas, and so on or the service will be the part we use to link our Amazon Elastic Load Balancer into our Amazon EKS (Kubernetes) Cluster service.
Step 1: Create a Deployment
Deployments to create new ReplicaSets, or to remove existing Deployments and adopt all their resources with new Deployments.
- vim deployment.yaml
- After execute commnd below output:
Step 2: Create a service
Service is a method for exposing a network application that is running as one or more Pods in your cluster.
Each Pod gets its own IP address (Kubernetes expects network plugins to ensure this). For a given Deployment in your cluster, the set of Pods running in one moment in time could be different from the set of Pods running that application a moment later.
The Service API, part of Kubernetes, is an abstraction to help you expose groups of Pods over a network. Each Service object defines a logical set of endpoints (usually these endpoints are Pods) along with a policy about how to make those pods accessible.
- vim service.yaml
After execute commnd below output:
Command line Output:
Browser Output:
Conclusion :
This solution helps you quickly install simple application and access cluster using the Amazon Elastic Load Balancer