0

I have an ubuntu host, hosting a minikube cluster and a mysql server.

What I need is the pods running in the minikube service to access the mysql on the host which in this case is running outside of the cluster.

On the host mysql server is hosted on localhost:3306

Thanks in advance

Illegal Operator
  • 656
  • 6
  • 14

1 Answers1

0

Try to access MySQL with hosts IP address instead of "localhost". For example, If your hosts IP address is 192.168.0.1 then try to access MySQL with address "192.168.0.1:3306".

Inside a pod, localhost refers to its own local environment but not the host where MySQL is installed. Each pod will have its own IP address and also it will act as a separate host.

pcsutar
  • 1,715
  • 2
  • 9
  • 14