I am using Rancher to manage Kubernetes which orchestrates my Docker containers.
Each of our microservices (running in a container) that requires persistence has a corresponding MySQL container. E.g. MyApp is running in a container called MyApp and persists to a MySQL container called MySQL-MyApp.
We have many of these. We don't want to define which nodes the MySQL containers runs on, and therefore can't publish/expose the port on the host in case it clashes with any other ports on that host.
However, if something goes wrong with some data for one of our microservices, we need to be able to access the MySQL instance in the relevant container using MySQL Workbench to view/edit the data in the database from an external machine on our physical network.
Any ideas how we would go about doing this? Are we able to somehow temporarily expose/publish a port on the fly for a MySQL container that is running so that we can connect to it via MySQL Workbench, or are there other ways to get this done?