About Adam Young

Once upon a time I was an Army Officer, but that was long ago. Now I work as a Software Engineer. I climb rocks, play saxophone, and spend way too much time in front of a computer.

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 10.131.0.81. Which lead to this command:

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