51. Docker Port Publishing Mode

Published: 21 July 2022
on channel: iMustLearn
39
0

Types of port publishing modes:
==============================
1. Ingress
2. Host

##Ingress:
----------
The default mode.
Publishes the port on all hosts i.e. all nodes of a swarm cluster . Routing mesh.
Create a service using ingress publishing port:
docker service create name mynginx p 8080:80 nginx

##Host:
--------
Publishes the port on host where containers are running.
Runs only one task of a service on the same node.
Create a service using host publishing port
docker service create name mynginxhost p mode= host,published =8081,target=80 nginx

ReferenceDoc:
https://docs.docker.com/engine/swarm/...


Watch video 51. Docker Port Publishing Mode online without registration, duration hours minute second in high quality. This video was added by user iMustLearn 21 July 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 39 once and liked it 0 people.