Setup an NGiNX Ingress Router on EKS k8s

?
R
Bash

Quick recipe to setup K8s Ingress Router

1# HPA
2The Horizontal Pod Autoscaler (HPA) and Kubernetes Metrics Server are now supported by Amazon Elastic Container Service for Kubernetes (EKS).
3`kubectl autoscale deployment compiler-deployment --min=1 --max=5 --cpu-percent=50`
4
5# NGINX Ingress Router for K8s
6Your Amazon EKS cluster must be configured to use at least one private subnet in your VPC.
7service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
8
9a) Mandatory
10`kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml`
11
12b) For L7 AWS ELB
13`kubectl apply -f service-l7.yaml`
14`kubectl apply -f patch-configmap-l7.yaml`
15
16c) Verify
17`kubectl get pods --all-namespaces -l app.kubernetes.io/name=ingress-nginx --watch`
18
19d) Exec into the POD
20`kubectl --namespace=ingress-nginx exec -it nginx-ingress-controller-6584c6c78-rkmhc -- /bin/bash`
21`nginx-ingress-controller version`
220.20.0
23
24e) NGiNX Configuration
25`kubectl create secret tls bw-certificate-2018 --key bw.key --cert bw.crt`
26
27https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/

Created on 1/28/2019