我想知道Mesos或K8s是否可以提供来自多个网络接口的资源?我想在mesos (或K8s)从节点上附加多个网络接口(公共eth0、私有eth1),并想在特定接口上绑定我在Mesos从节点上运行的特定应用程序?像OpenStack有四个不同的物理网络一样,mesos或K8s不需要不同的物理网络吗?是否有任何参考指南或文档?
发布于 2016-07-08 00:09:24
在Kubernetes上,没有一种完全受支持的方法来实现这一点。我认为这也不被docker支持(https://github.com/docker/docker/issues/1824)
作为一种变通办法,你可以这样做:
”参数,Kubernetes不会将pod放入网络容器中。这些pods
- can bind to either interface.
- will not get a "podIP", but use the IPs of whichever interface they use.
- you will have to manage port conflicts yourself. You may want to use DaemonSet for these pods.
- you won't get any NetworkPolicy protection between pods with `hostNet`.
- all the pods on the same node with `hostNet` will be able to talk to each other on localhost, so you get less isolation.
如果只有一个或几个应用程序需要“非默认”联网,并且这些应用程序是“系统应用程序”,由管理集群的同一个团队管理,而不是由“不太受信任的”应用程序团队管理,则这种解决方法是很好的。或者,如果您有一个只有几个人运行Kubernetes集群的小型组织。
https://stackoverflow.com/questions/38176856
复制相似问题