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