简体   繁体   English

在 Kubernetes 中运行多个 mysql pod

[英]run multiple mysql pods in kubernetes

I would like to create a kubernetes cluster to deploy mysql databases, like a mysql farm.我想创建一个 kubernetes 集群来部署 mysql 数据库,就像一个 mysql 农场。 These databases should be accessible from internet.这些数据库应该可以从互联网访问。

All databases on the same node will have the port 3306 listening, the kube-proxy or the DNS addon could redirect each request to an specific container?同一节点上的所有数据库都会监听 3306 端口,kube-proxy 或 DNS 插件可以将每个请求重定向到特定容器吗?

I would like to create url's like myDB1.example.com:3306, myDB2.example.com:3306 that goes to an specific container.我想创建像 myDB1.example.com:3306、myDB2.example.com:3306 这样的 URL,它会转到特定的容器。

I'm deploying this environment in AWS.我正在 AWS 中部署这个环境。

It's possible to create this cluster?可以创建这个集群吗?

Yes.是的。 Starting point would be a (customized) MySQL Docker image with EBS backed volumes and you'd be using it in an Replication Controller to handle failover.起点将是具有EBS 支持卷的(自定义) MySQL Docker 映像,您将在复制控制器中使用它来处理故障转移。 On top of that you would have a Service that provides a stable and routable interface to the outside world.最重要的是,您将拥有一个为外部世界提供稳定且可路由的接口的服务 Optionally, put an AWS Elastic Load Balancer in front of it.或者,在它前面放置一个AWS Elastic Load Balancer

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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