- an AWS account and a region that support EKS
- environment variables to access AWS account locally
eksctlinstalled locallykubectlinstalled locallyhelminstalled locally
Deploy an EKS cluster:
eksctl create cluster --name=<cluster name> --region=<region> --nodes=3 --version 1.21Import kubectl config
aws eks update-kubeconfig --region <region> --name <cluster name>Deploy Consul
helm repo add hashicorp https://helm.releases.hashicorp.com
helm install consul hashicorp/consul --values consul-values.yaml --create-namespace --namespace consulAdd deny all intention
kubectl apply -f denyall.yamlDeploy nginx ingress
git clone https://github.com/nginxinc/kubernetes-ingress.git
helm repo add nginx-stable https://helm.nginx.com/stable
helm upgrade --install nginx-ingress nginx-stable/nginx-ingress --namespace=nginx-ingress --create-namespace --values ../../../eks-consul-ingressnginx/nginxingress-values.yamlAdd configuration for Dialed Directly
kubectl apply -f sd-direct.yamlAdd configuration for ingress config to static-server. If there are issues with validating the ingress object see kubernetes/ingress-nginx#5968 for workarounds.
kubectl apply -f ingress.yamldeploy static-server
kubectl apply -f static-server.yamladd intention to static server from ingress
kubectl apply -f allow-static-server.yamlTo get the ingress endpoint provisioned in ELB:
kubectl get service -n nginx-ingressEnsure you get back a hello world response:
STATIC_SERVER_LB=$(kubectl get service -n nginx-ingress nginx-ingress-controller -o jsonpath="{.status.loadBalancer.ingress[*].hostname}")
curl $STATIC_SERVER_LB