简体   繁体   中英

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

I am considering running docker swarm(see the version below) or Kubernetes.

Is it possible to attach or set a static IP address to at service?

I am looking for a way to run multiple web sites in containers:

I understand that in Docker Swarm you can have Ingress network layer populating each nodes port 80. But that will only work for one IP address. What is I have more ip addresses that I would like to connect to different containers running different websites?

Docker version:

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/

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