title: How to make Traefik compatible with Microk8s
body: <p>I have a working setup on Minikube with Traefik as ingress controller. I tried to use that setup on Microk8s but Traefik is not able to work and although I can see the Traefik dashboard and it says that everything is working but every time I try to use the ingress urls I face timeout but if I use the endpoint IP of that service (which I can see in the traefik dashboard) I am able to access to that service but not fully. I can have access to <code>IP/service1</code> but I can't have access to any of its sub urls, <code>IP/service1/sub-service1</code> not working.</p>
  
  <p>I also tried <code>microk8s.enable ingress</code> but it created an nginx ingress for me and then I disabled it because I want to use traefik.</p>
  
  <p>Do I need to change my configuration so it becomes compatible with Microk8s? If yes how?</p>
  
  <p>I have to mention that I have two ingress files:</p>
  
  <ul>
  <li><code>traefik-ui.yaml</code>: which contains both the service and ingress for my traefik. I use this service+ingress to access the traefik dashboard and as I mentioned it works</li>
  <li><code>wws-ingress.yaml</code>: is my main ingress which enables the communication with my components inside kubernetes and this is the part that doesn't work.</li>
  </ul>
  
  <p>My yaml files:</p>
  
  <p>traefik-ui.yaml:</p>
  
  <pre><code>---
  apiVersion: v1
  kind: Service
  metadata:
    name: traefik-web-ui
    namespace: kube-system
  spec:
    selector:
      k8s-app: traefik-ingress-lb
    ports:
    - name: web
      port: 80
      targetPort: 8080
  ---
  apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: traefik-web-ui
    namespace: kube-system
  spec:
    rules:
    - host: traefik-ui.minikube
      http:
        paths:
        - path: /
          backend:
            serviceName: traefik-web-ui
            servicePort: web
  </code></pre>
  
  <p>wws-ingress.yaml:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Ingress
  metadata:
    name: wws
    annotations:
      kubernetes.io/ingress.class: "traefik"
      traefik.frontend.rule.type: PathPrefixStrip
      traefik.frontend.passHostHeader: "true"
      traefik.backend.loadbalancer.sticky: "true"
      #traefik.ingress.kubernetes.io/rule-type: ReplacePathRegex
      traefik.wss.protocol: http
      traefik.wss.protocol: https
  spec:
    rules:
    - host: streambridge.local
      http:
        paths:
        - path: /streambridge
          backend:
            serviceName: streambridge
            servicePort: 9999
        - path: /dashboard
          backend:
            serviceName: dashboard
            servicePort: 9009
        - path: /gateway
          backend:
            serviceName: gateway
            servicePort: 8080
        - path: /rdb
          backend:
            serviceName: rethinkdb
            servicePort: 8085
  </code></pre>
  
  <p>Minikube commands (this works without a problem):</p>
  
  <pre><code>kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-rbac.yaml
  kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-ds.yaml
  
  kubectl apply -f traefik-ui.yaml
  kubectl apply -f wws-ingress.yaml
  </code></pre>
  
  <p>And in Microk8s I tried:</p>
  
  <pre><code>microk8s.kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-rbac.yaml
  microk8s.kubectl apply -f https://raw.githubusercontent.com/containous/traefik/v1.7/examples/k8s/traefik-ds.yaml
  microk8s.kubectl apply -f traefik-ui.yaml
  microk8s.kubectl apply -f wws-ingress.yaml
  </code></pre>