At the moment, I've tried to learn the Traefik with Kubernetes by using Traefik Helm  and minikube. Everything also works like a charm until I try to make it to be a load balancer for my demo web application by using dynamic configuration.
At this point, I have no any clue how to add host mapping to /etc/hosts for Traefik Helm. Could you please help to advise?
I recommend you to have a look on the workshop I prepared entitled: Getting started with Traefik on Kubernetes. In the workshop I presented how to start with Traefik using the official Helm chart.
If you use Minikube and you would like to create a service type load balancer you need to start tunnel by executing command minikube tunnel and Traefik exposed ports will be binded to localhost belonging to your workstation.
Please note that in my workshop I use K3D - it is another alternative solution of deploying K8S cluster for learning purposes. Personally, I prefer that solution to deploy a cluster for testing / learning purposes.
If I correctly understood you, Traefik is deployed on Kubernetes and Tomcat is running as a standalne instance outside the cluster. You would like to use Traefik to act as load balancer for the Tomcat instance.
If so, you need to add to the Traefik's configuration FILE provider and create the configuration manually using Kubernetes ConfigMap.
In your file config you have to create router and service manually. You can of course follow our official docs to the File provider , routers and services that I highly encourage you to review. You can also use that example as a reference:
Thank you for quick reply. May I ask further about the url: http://10.11.0.2:8080 ? Am I able to use the host name rather than the IP address? Something like append the additional to the /etc/hosts inside the traefik pod ? Or the only way is having to use the IP address ? Could you please help to advise further?
Ahhh Yes . That's my question and my trying to achieve. How to make that URL to be reachable by the Traefik?
I have no any clue and hope that there is a way to edit the /etc/hosts via values.yaml. e.g. by using hostAliases . But sadly, the Traefik _podtemplate.tpl  does not provide this to be happened and lead me to post this topic here.