Can you resolve the domain from within the container? The mattermost application container should have the nc
binary available and this connection should work without issues actually. I’ve set up the same environment on my testhost now, here’s what I am seeing:
### on the linux machine directly, mysql is running on port 3306 listening on all possible interfaces (*:3306)
# lsof -i :3306
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mariadbd 295207 mysql 36u IPv6 9447442 0t0 TCP *:mysql (LISTEN)
### Connecting to my mattermost application docker container and executing a shell there
# docker exec -ti 17 /bin/sh
### trying to connect to "the outside" on port 3306 with the nc binary
$ nc 172.17.0.1 3306
c
5.5.5-10.5.15-MariaDB-0+deb11u127[F,HfJ▒▒-▒▒!`BjnlQ2DAUkmysql_native_password
^C
→ The connection to my local MariaDB server outside the container is working, as you can see in the greeting string. If you do not get this connection working, then something else is the problem, maybe some firewall rules or container network limitations. You said you connected to the pod - are we talking about a podman deployment here or did you at some point decide to use k8s or something similar which might be the reason for the difference in behaviour?