<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9caa525b-f69a-4647-a1f9-8fd0a6456ce9/docker-swarm.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/9caa525b-f69a-4647-a1f9-8fd0a6456ce9/docker-swarm.png" width="40px" /> Docker Swarm

<aside> ๐Ÿ“Œ

</aside>

Docker Swarm

Untitled

<aside> ๐Ÿ“Œ ์ •๋ฆฌ

Untitled

</aside>

Cluster ๋งŒ๋“ค๊ธฐ

# docker
docker swarm init --advertise-addr 192.168.0.5

# swarm join
docker swarm join --token SWMTKN-1-1crk8bosnrnoimba6nm8vcjnum0a7sxnyrcqsjmwrut9uoiud2-6h8gon76ibosip45cs23lp0lq 192.168.0.5:2377

# swarm ์‚ญ์ œ
docker swarm leave

# swarm node ํ™•์ธ
docker node ls

Untitled

Service ์ƒ์„ฑํ•˜๊ธฐ

# ์›น ์„œ๋น„์Šค ์ƒ์„ฑ
docker service create --name myweb --replicas 3 -p 80:80 nginx
# docker ์„œ๋น„์Šค ํ™•์ธ
docker service ls

# docker myweb ์„œ๋น„์Šค ํ™•์ธ
docker service ps myweb
# docker service๋ฅผ ํ•œ๊ฐœ๋กœ ์ค„์ž„
docker service scale myweb=1
[master์—์„œ ์‹คํ–‰์ค‘]

# docker service๋ฅผ 5๊ฐœ๋กœ ์„ค์ •
docker service scale myweb=5

<aside> ๐Ÿ“Œ

Network Utility

<aside> โž• ์ถ”๊ฐ€ ์ •๋ฆฌ

# command option ์ •๋ณด
route -?
route /?
route add
route delete
route print
# linux enviroment
# routing table
netstat -nr
# internet connection
netstat -nltup

ss

</aside>

</aside>

</aside>