I’m playing around with rancher as a platform for hosting multiple cms app containers. There’s one thing I just don’t get right:
I’m using a rather simple stack with an application container linked to a database container, referring the database as ‘db’, and using a load balancer to point my external domain to the application container, as in this image:
When it comes to configurig my app to enter the database credentials, I’m able to use the db container using it’s internal IP address, but I’m not able to use the given service name ‘db’. When I open a shell inside the app container and do something like ‘ping db’, it won’t resolve.
FYI, rancher server and agent are running on the same host.
So what am I missing? I’d like to use a kind of hostname for the database service, as the internal IP might change.
Thx a lot,
Boris