apiVersion : apps/v1
kind : Deployment
metadata :
name : dummy
namespace : default
spec :
replicas : 1
selector :
matchLabels :
app : dummy
template :
metadata :
labels :
app : dummy
spec :
containers :
- name : whoami
image : traefik/whoami
ports :
- containerPort : 80
---
apiVersion : v1
kind : Service
metadata :
name : dummy
namespace : default
spec :
selector :
app : dummy
ports :
- protocol : TCP
port : 8080
targetPort : 80
Traefik values, example middleware
ingressRoute :
dashboard :
enabled : false
ports :
web :
http :
redirections :
entryPoint :
to : websecure
scheme : https
websecure :
http :
tls :
enabled : true
apiVersion : traefik.io/v1alpha1
kind : Middleware
metadata :
name : test-ratelimit
namespace : default
spec :
rateLimit :
average : 100
burst : 50
Traffic routing, IngressRoute
apiVersion : traefik.io/v1alpha1
kind : IngressRoute
metadata :
name : example-adathor-com
namespace : default
spec :
entryPoints :
- websecure
routes :
- match : Host(`example.adathor.com`)
kind : Rule
services :
- name : dummy
port : 8080
middlewares :
- name : test-ratelimit
tls :
secretName : example-adathor-com-tls
LE certs with cert-manager
apiVersion : cert-manager.io/v1
kind : Certificate
metadata :
name : example-adathor-com-tls
namespace : default
spec :
secretName : example-adathor-com-tls
dnsNames :
- example.adathor.com
issuerRef :
name : letsencrypt-prod
kind : ClusterIssuer
apiVersion : kustomize.config.k8s.io/v1beta1
kind : Kustomization
resources :
- dummy-app.yaml
- certificate.yaml
- ingressroute.yaml
- middlewares.yaml
helmCharts :
- name : traefik
repo : https://traefik.github.io/charts
version : 39.0.5
releaseName : traefik
namespace : traefik
valuesFile : traefik-values.yaml