Search code examples
kubernetesdocker-swarm

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

Solution

  • I found that Kubernetes is up for this task: https://kubernetes.io/docs/tutorials/stateless-application/expose-external-ip-address/