Access Traefik UI from Kubernetes hosted in Azure

1/9/2019

I'm deploying Kubernetes Ingress Controller as per documentation on Traefik website. Everything goes well and I can see that Ingress, respective pods and services are up and running. The only problem - I can't get how to access Traefik UI (the dashboard).

The mentioned documentation is very unclear and I can't find anything specific in the internet. There are no external IPs for the service: see the image attached Should it be 'proxied' to a localhost or a static IP or domain name somehow? Deployment scripts are taken from the official source.

-- John Bull
azure
azure-kubernetes
traefik
traefik-ingress

2 Answers

1/9/2019

Thanks @jakaruna-msft, in fact it was the 'type' definition. I have changed the config so the .yaml file looks as the one below. I see that the IP's were provisioned so now I can access the dashboard and bind a custom one along with DNS.

---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: traefik-ingress-controller
  namespace: kube-system
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
  name: traefik-ingress-controller
  namespace: kube-system
  labels:
    k8s-app: traefik-ingress-lb
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: traefik-ingress-lb
  template:
    metadata:
      labels:
        k8s-app: traefik-ingress-lb
        name: traefik-ingress-lb
    spec:
      serviceAccountName: traefik-ingress-controller
      terminationGracePeriodSeconds: 60
      containers:
      - image: traefik
        name: traefik-ingress-lb
        ports:
        - name: http
          containerPort: 80
        - name: admin
          containerPort: 8080
        args:
        - --api
        - --kubernetes
        - --logLevel=INFO
---
kind: Service
apiVersion: v1
metadata:
  name: traefik-ingress-service
  namespace: kube-system
spec:
  selector:
    k8s-app: traefik-ingress-lb
  ports:
    - protocol: TCP
      port: 80
      name: web
    - protocol: TCP
      port: 8080
      name: admin
  type: LoadBalancer
-- John Bull
Source: StackOverflow

1/9/2019

The example used deploys "traefik-ingress-service" with cluster ip which is deployed in kube-system namespace. That example is targeted for minikube. To get it work on AKS, edit the "traefik-ingress-service" and find the type and change

"type": "ClusterIP"

to

"type": "LoadBalancer"

and save it.

After that your service will get a public ip. Then with that public ip you will be able to access the admin endpoint with port 8080.

-- jakaruna-msft
Source: StackOverflow