简体   繁体   中英

Link between docker container and Minikube

Is is possible to link a docker container with a service running in minikube? I have a mysql container which I want to access using PMA pod in minikube. I have tried adding PMA_HOST is the yaml file while creating pod but getting an error on the PMA GUI page mentioning -

mysqli_real_connect(): (HY000/2002): Connection refused

If I understand you correctly, you want to access a service (mysql) running outside kube cluster (minikube) from that kube cluster.

You have two ways to achieve this:

  1. make sure your networking is configured in a way allowinf traffic passing both ways correctly. Then you should be able to access that mysql service directly by it's address or by creating external service inside kube cluster (create Service with no selector and manualy configure external Endpoint s

  2. Use something like ie. telepresence.io to expose localy developed service inside remote kubernetes cluster

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM