-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathinstall-traefik.sh
21 lines (16 loc) · 1.08 KB
/
install-traefik.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
#Until Traefik 2.0 makes into k3s, we need to install it separately with helm #https://github.com/rancher/k3s/issues/1141
#as Traefik 2.0
#also, https://github.com/traefik/traefik/issues/7414 hence /data/acme.json
echo "Adding and updating Traefik helm repo, if you don't have it already, won't hurt"
helm repo add traefik https://helm.traefik.io/traefik
helm repo update
export KUBECONFIG=./config
helm upgrade --install --create-namespace \
-n ingress --wait \
--set rbac.enabled=true \
--set metrics.prometheus.enabled=true \
--set="additionalArguments={--certificatesresolvers.default.acme.httpChallenge.entryPoint=web,--certificatesresolvers.default.acme.storage=/data/acme.json,--certificatesresolvers.default.acme.email=alessandro.vozza@microsoft.com,--certificatesresolvers.default.acme.httpChallenge=true,--providers.kubernetesingress.ingressclass=traefik,--log.level=DEBUG}" \
traefik traefik/traefik
#kubectl port-forward -n ingress $(kubectl get pods -n ingress --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000 &
#open http://127.0.0.1:9000/dashboard/