/eks-traefik

Demo of exposing public applications on AWS EKS with Traefik Proxy.

Primary LanguagePython

Exposing publicly applications on AWS EKS with Traefik Ingress Controller

Demo of exposing public applications on AWS EKS with Traefik Proxy. This repository is a part of Dev.to article

Prerequisites

Installation TL;DR

!!! Before install replace all occurrences of <YOUR_CERTIFICATE_ARN> and <YOUR_DOMAIN> in all repo resources.

Install Traefik

helm repo add traefik https://helm.traefik.io/traefik
helm install traefik traefik/traefik --create-namespace --namespace=network --values=helm/traefik.yaml 

Install samples apps (RabbitMQ and PostgreSQL):

helm repo add bitnami https://charts.bitnami.com/bitnami
helm install rabbitmq bitnami/rabbitmq --create-namespace --namespace=messaging -f helm/rabbitmq.yaml
helm install postgres bitnami/postgresql --create-namespace --namespace=database -f helm/postgres.yaml

Apply Traefik route resources:

kubectl apply -f network/traefik-dashboard-route.yaml
kubectl apply -f network/postgres-route.yaml
kubectl apply -f network/rabbitmq-route.yaml

Testing utils

psql -h postgres.<YOUR_DOMAIN> -p 5432 -U root
# pass 'root' password

python3 utils/rabbitmq_ampq_test.py

#In browser:
https://rabbitmq.<YOUR_DOMAIN>
https://traefik.<YOUR_DOMAIN>:9000/dashboard/

Cleanup

helm uninstall rabbitmq -n messaging
helm uninstall postgres -n database
helm uninstall traefik -n network

# Delete cluster create with eksctl-labs-cluster repo
eksctl delete cluster -f cluster.yaml --disable-nodegroup-eviction