Traefik HTTPS ingress for application outside of cluster

I have an application that runs in it’s own vm on the same bare metal server. I also have a k8s setup which runs multiple applications behind traefik. I want to use the k8s traefik to reverse proxy the application running on the VM? Is that possible?

It looks like I can define a service which points to the IP address but it’s not recommended, instead it points to headless services but this doesn’t seem like it’ll work.

Go to Source
Author: digital

traefik two hosts in the same config

I’m trying to run Nexus in swarm with traefik, nexus has a admin interface that runs on port 8081 and also has a nexus docker registry repository running on port 9615.

My goal is access registry through registry.docker.domain and nexus by nexus.domain but I am not able to do this.

traefik config on compose

  - 8081
  - 9615
    - "traefik.enable=true"
    # Config Nexus
    - "'nexus.domain')"
    - ""
    - ""
    - ""

    # Config Registry
    - "traefik.http.router.registry.rule=Host('registry.docker')"
    - ""
    - "traefik.http.routers.registry.entrypoints=web-secure"
    - "traefik.http.routers.registry.tls=true"
    - "traefik.http.routers.registry.service=registry"

If I set up only registry labels I can access the registry by https.://registry.domanin and nexus by registry.domain:PORT

If I set up only nexus labels I can access nexus by http:.//Nexus.domain

But the config above, with labels for both at the same time, didn’t work, nexus and registry return 404.

Obs: I’m using traefik 2.2, the documentation and the use are very different from 1.6

Go to Source
Author: Joao Vitorino