Traefik-ingress dashboard return 404
Solution
I apply this
kubectl create serviceaccount --namespace kube-system tillerkubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tillerkubectl patch deploy --namespace kube-system tiller-deploy -p '{"spec":{"template":{"spec":{"serviceAccount":"tiller"}}}}'
and then installed the stable/traefik template with helm
helm install stable/traefik --name=traefik-ingress-controller --values values.yaml
values.yaml
file is:
dashboard: enabled: true domain: traefik-ui.k8s.io rbac: enabled: true kubernetes: namespaces: - default - kube-system
Thanks for help
I tried this myself. So basically when you create your Ingress it gets created with a host
of traefik-ui.minikube
(default), so you won't be able to access the dashboard with <elb-address>/dashboard/
.
You will have to access it with traefik-ui.minikube/dashboard/
. As an example:
$ kubectl -n kube-system get ingressNAME HOSTS ADDRESS PORTS AGEtraefik-ingress * 80 8m13straefik-web-ui traefik-ui.minikube xxxx.elb.amazonaws.com 80 71d$ curl -H 'Host: traefik-ui.minikube' xxxx.elb.amazonaws.com/dashboard/<!doctype html><html class="has-navbar-fixed-top">...</html>
You can also add an entry to your /etc/hosts
file if you'd like to see it on your browser.
<one-of-the-ips-of-your-elb> traefik-ui.minikube
And you can also use the host
to the rules
in your Ingress definition:
apiVersion: extensions/v1beta1kind: Ingressmetadata: namespace: kube-system name: traefik-ingress annotations: kubernetes.io/ingress.class: traefikspec: rules: - host: yourown.hostname.com http: paths: - path: /dashboard backend: serviceName: traefik-web-ui servicePort: web