Member-only story
Kubernetes + Envoy… so how load balance connections from inside the cluster to servers outside the cluster
Introduction
When we think about connecting from a pod in a Kubernetes cluster to a some server for example MySQL outside the cluster, I think that Envoy seems to be a good idea 🙂
In this article I will describe method how do it, so I hope it will be helpful for those who are wondering how do it.
Example diagram
Configuration
In configmap we have summarized envoy settings.
Deployment and service configuration for Envoy and Nginx+php-fpm
Now just apply these configurations
$ kubectl apply -f envoy.yaml
$ kubectl apply -f envoy_nginx_phpfpm.yaml
Now we can connect to external MySQL from the php-fpm container.