Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to...

30
Docker Networking

Transcript of Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to...

Page 1: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

Docker Networking

Page 2: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 3: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 4: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 5: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 6: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 7: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 8: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 9: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 10: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 11: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 12: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 13: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 14: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 15: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 16: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 17: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 18: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

Create NetWorkDocker network create -d bridge --subnet 10.1.0.0/24 qt-bridge

Page 19: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

CREATE NETWORK (contd..)

Page 20: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

Create Containers in custom Bridgedocker run -dt --name c1 --network ps-bridge ubuntu sleep 1d

docker run -dt --name c2 --network ps-bridge ubuntu sleep 1d

Inspect network (docker network inspect ps-bridge)

Page 21: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

Create Containers in custom Bridge

Page 22: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

NETWORK TOpoloGy For bridge

Page 23: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

Test Ping other container (c1) from c2

Page 24: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 25: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 26: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 27: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 28: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not
Page 29: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

Steps FOr multi-host networkingInstall docker on two or more hosts

On the first machine execute “docker swarm init”

Execute docker swarm join in other hosts

Execute docker network ls and you should be able to see

ingress with DRIVER as overlay

Execute “docker node ls” to find out nodes

Note: Following ports should be open ====>

Page 30: Docker Networking - Quality Thought€¦ · “Docker network create -d overlay qt-over” to create network Try executing “docker network ls” on other container you will not

CREATION of overlay network“Docker network create -d overlay qt-over” to create network

Try executing “docker network ls” on other container you will

not see the qt-over as docker follows lazy approach

To see the qt-over start a container.

“docker service create --name qt-svc --network qt-over --

replicas 3 hello-world sleep 1d”

To see the status execute on host1 “docker service ps ps-svc”