Here are the high level steps which are followed by AWS CLI Commands.
-
Connect to AWS EKS Cluster.
-
Create one Ingress Controller in the Cluster.
-
Update the Ingress YAML file.
-
Execute/Apply the YAML files and test the application.
#Connect to AWS from CLI (either local machine or VM) - in case, AWS CLI not present, install
aws --version
#Check if it is connected
aws sts get-caller-identity
#If connected to AWS, skip this command or else, use this and connect
aws configure
#Connect to AWS EKS Cluster
aws eks --region <region> update-kubeconfig --name <clusterName>
#Sample
aws eks --region eu-west-1 update-kubeconfig --name hangar-test-eks
#Install Ingress Controller by Nginx using helm command - in case, helm not present, install
helm upgrade --install nginx-ingress nginx-ingress-controller --set ingressClassResource.default=true --set containerSecurityContext.allowPrivilegeEscalation=false --repo https://charts.bitnami.com/bitnami --namespace nginx-ingress --create-namespace
#Get the DomainName/HostName from the below command - Nginx Ingress Controller's LoadBalancer
kubectl get svc --all-namespaces
-
Update the Ingress YAML File present in the k8s folder with the DomainName came as the output of the above command
...
spec:
tls:
- hosts:
- ab1c2d1001xxxxxxxxxxxxxxxxxxx101-1000000001.eu-west-1.elb.amazonaws.com
rules:
- host: ab1c2d1001xxxxxxxxxxxxxxxxxxx101-1000000001.eu-west-1.elb.amazonaws.com
...
#Execute the Kubernetes YAML Files
kubectl apply -f ./
#Check the status of the Deployments, Services, Pods
kubectl get all
-
Once the Services and Pods are up and running, use the DomainName URL and test the Application.
-
Application Sample URLs for Reference