I have created a MySQL deployment in kubernetes and exposed it as nodes-port.
what I can do: access it from inside the cluster using kubectl run -it --rm --image=mysql:5.6 --restart=Never mysql-client -- mysql -h mysql -ppassword
what I want to do: access the MySQL server from outside the cluster(like accessing a normal MySQL server).
Guide me, please. I'm using Kubernetes v1.13 in Digital Ocean Cloud.
You need to specify the MYSQL_ROOT_PASSWORD while bringing up the pod. How were you able to bring it up in Docker without it?
You can access it by mysql -u {username} -p {password} -h {any kubernetes worker ip} -P {nodePort}
. After you start mysql container and expose it ad node port through a service.