Add traefik

This commit is contained in:
Sambo Chea 2021-12-28 16:12:12 +07:00
parent b0f9564c21
commit 0b20e0db1b
Signed by: sombochea
GPG Key ID: 3C7CF22A05D95490
2 changed files with 26 additions and 0 deletions

12
traefik/README.md Normal file
View File

@ -0,0 +1,12 @@
# Traefik Installation
```shell
kubectl create ns traefik-v2
helm install --namespace=traefik-v2 \
--set="additionalArguments={--log.level=DEBUG}" \
traefik traefik/traefik
```
```shell
kubectl port-forward $(kubectl get pods --namespace traefik-v2 --selector "app.kubernetes.io/name=traefik" --output=name) --namespace traefik-v2 9000:9000
```

14
traefik/dashboard.yaml Normal file
View File

@ -0,0 +1,14 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
namespace: traefik-v2
name: dashboard
spec:
entryPoints:
- web
routes:
- match: Host(`traefik.ct.host`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
kind: Rule
services:
- name: api@internal
kind: TraefikService