Docker_Kubernetes_Nginx_Ingress_Controller
-
'Git' to clone this repo from github.
-
You need to have aws programmatic credentials in place with permissions that can mananage ec2/r53 in aws.
-
Terraform latest version on your local manchine.
-
R53 zone-ID if you want to bind with domain.(Optional).
After terraform sucessfully created resources, immediatly export below shown env variables IP from the same output.
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
Outputs:
minikube_ip = "123.123.123.123"
➜ remote-mini-k8s git:(main) ✗ export RMK_EC2_PUBLIC_IP=123.123.123.123
➜ remote-mini-k8s git:(main) ✗ export DOMAIN_ZONE_ID=Z12345678890 (Get value from AWS console)
ssh $RMK_EC2_PUBLIC_IP -l ubuntu sudo htpasswd -c /etc/nginx/.htpasswd minikube
aws route53 change-resource-record-sets --hosted-zone-id $DOMAIN_ZONE_ID --change-batch file://r53.json
minikube addons enable ingress
kubectl get pods --namespace=ingress-nginx