Demo on setting up Traefik in K8s. This demo also spins up a new MS AKS cluster.
- Clone/Fork this repo
- Create an RG in Azure and note down the name
- Create a GitHub secret holding an Azure Service Principal following this guide: https://github.com/Azure/actions-workflow-samples/blob/master/assets/create-secrets-for-GitHub-workflows.md giving it access to the RG in step 2.
- Kick off the Deploy to AKS GitHub action to create AKS
- If you want to use middlewares in K8s, you need to enable the KubernetesCRD provider regardless, even if you use the KubernetesIngress provider for Traefik configuration, e.g., https://github.com/fredrkl/traefik-k8s-setup/commit/fcdba1a878c815249e07ba711a0e9429572882ff
- Also, make sure that the middleware name does not include -. Traefik uses - in its naming convention to find the middlewares namespace.
- When using Cert-Manager without Helm, do not add kustomize namespace as the kube-system ns is hardcoded for the leader election role