following guide on kubernetes, keeps running into problems

5/28/2018

i've been following a guide on kubernetes to eventually have myself a MySQL pod running, i've been following the guide on https://kubernetes.io/docs/tasks/run-application/run-single-instance-stateful-application/

The first problem i had with this is that I dont have dynamic PV's enabled, mainly because I cannot use kube-apiserver to enable it, since this command is not known on my Ubuntu 16.04 system.

After manually making the PV and PVC, it kept crashing, so I added a command to keep it online and running.

Now it will run without crashing, but when i exec into the pod the MySQL server is not running and can't be started. Anybody has any clue what i do wrong?

The goal is having a pod run MySQL and have it communicate with another pod running glassfish with an application on this pod.

yaml file code

-- kubernoobus
kubernetes
yaml

1 Answer

5/28/2018

I just changed my mountPath: from /var/lib/mysql to /mount because i couldnt get any logs since that map is not a map, and now my pod stopped crashing alltogether.

Thanks for Ignacio Millán to prompt me to dig in the right direction and stumble onto the answer. it now runs without crashing, but has left me confused as to why the guide suggests the path /var/lib/mysql.

-- kubernoobus
Source: StackOverflow