Skip to content

Publishing a Service

This document demonstrates how to deploy a service online using Traefik Hub and its tunneling feature.


Before getting started, make sure you have the following:

  • An account registered on the Traefik Hub platform
  • A cluster running with Docker or Kubernetes
  • The Traefik Hub Agent running on your cluster

Publishing an Example Application

In this getting started guide, we will be using a demo application called whoami. Whoami is a web server answering with host-related information. You can also use any other web application.

The first step is to install whoami on your cluster. You can use the following commands:

docker run -d -p 8080:80 --name whoami traefik/whoami
kubectl create deployment whoami --image=traefik/whoami
kubectl create service loadbalancer whoami --tcp=8080:80

Find and Publish

Now that the application is running, go back to the Traefik Hub UI. Find the services page on the navigation menu, search for the service called whoami, and select it.

Cannot find the service?

You can use the search bar in the top right corner of this page. The search bar filters by service name. service search

On the service detail page, click on the Publish the service button. Use the form to configure the behavior. You have two options:

  • The service port, which is normally detected by Traefik Hub automatically
  • The Access Control Policies, which secures the application with credentials, granting access only to certain users (see more details here)

Finish the process by clicking on the Publish button. The service will be accessible in a few moments.

exposed whoami

Once ready, you are redirected to the service details page, and a new section now displays the details of the service publication. You can now see the Traefik Hub autogenerated and unique domain name allocated for your service.

The application is now accessible.

Bonus: the traffic is fully secured with TLS.

What do to next?