Lab 4: Create an Overlay network

Homework Lab : https://labs.play-with-k8s.com/

Create an overlay network called myoverlay0

docker network create --driver=overlay --subnet=192.168.1.0/24 --gateway=192.168.1.100 myoverlay0

Listout the networks in the host

docker network ls

Sample Output

NETWORK ID          NAME                DRIVER              SCOPE
7bbea9e2f1c4        bridge              bridge              local
99e0866a81c5        docker_gwbridge     bridge              local
180292624b34        host                host                local
pp47xrb8x4da        ingress             overlay             swarm
1o0u8kqharpe        myoverlay0          overlay             swarm
e7e3f13ebea6        none                null                local

View the details of network myoverlay0

docker network inspect myoverlay0

Create an encrypted overlay network

By default application data is not encrypted, to encrypt application data as well, we need to add –opt encrypted while creating Overlaynetwork.

docker network create -d overlay --opt encrypted encrypted_overlay

Last updated

Was this helpful?