Injecting a Host Entry in podman-run

How does an application find its database? For all but the most embedded of solutions, the database exposes a port on a network. In a containerized development process, one container needs to find another container’s network address. But podman only exposes the IP address of a pod, not the hostname. How can we avoid hardcoding IP addresses of remote services into our containers?

Continue reading

Running the MariaDB Client on OpenShift

I set up a MariaDB server and wanted to test it out. There are many docs out there about how to set up the client. This is what worked for me.

First, find out the internal IP address of the Database server pod:

oc get pod -l name=mariadb -o json | jq  -r  '. | .items[0] | .status |  .podIP '

In my case, that returned Which lead to this command:

kubectl run -it --rm --image=mariadb:latest --restart=Never mariadb-client -- mysql  keystone -h --user keystone -pkeystone