docker swarm 服务或 Kubernetes 服务 ClusterIP - 将 IP 地址附加到服务

docker swarm service or Kubernetes services ClusterIP - attach IP address to service

我正在考虑 运行ning docker swarm(见下面的版本)或 Kubernetes。

是否可以在服务中附加或设置静态 IP 地址?

我正在寻找在容器中 运行 多个网站的方法:

我知道在 Docker Swarm 中,您可以让 Ingress 网络层填充每个节点的端口 80。但这只适用于一个 IP 地址。什么是我有更多的 ip 地址,我想连接到不同的容器 运行ning 不同的网站?

Docker版本:

Client:
 Version:      17.11.0-ce
 API version:  1.34
 Go version:   go1.8.3
 Git commit:   1caf76c
 Built:        Mon Nov 20 18:37:39 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.11.0-ce
 API version:  1.34 (minimum version 1.12)
 Go version:   go1.8.3
 Git commit:   1caf76c
 Built:        Mon Nov 20 18:36:09 2017
 OS/Arch:      linux/amd64
 Experimental: false

我发现 Kubernetes 可以胜任这项任务:https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address/