docker-swarm
Table of Contents
-
<<<<<<< Updated upstream
- 1. TODO Swarm in 2022
- 2. commands
- 3. Networking =======
- 1. TODO Swarm in 2022
- 2. commands
- 3. Networking >>>>>>> Stashed changes
1. TODO Swarm in 2022
=======1. TODO Swarm in 2022
>>>>>>> Stashed changes2. commands
=======2. commands
>>>>>>> Stashed changesinit a swarm on wireguard interface with a default address pool
docker swarm init \ --listen-addr wg0:2377 \ --advertise-addr wg0:2377 \ --default-addr-pool 10.2.0.0/16
docker node demote|inspect|ls|promote|ps|rm|update
- list all nodes in a swarm
- https://docs.docker.com/engine/reference/commandline/node/
- add label to a node, to use in deploy/constraints
docker config create|inspect|ls|rm
- manage configurations on a swarm
- store non-sensitive configuration data, for sensitive data use docker secret
- https://docs.docker.com/engine/swarm/configs/
docker secret create|inspect|ls|rm
- manage secrets on a swarm
docker stack config|deploy|ls|ps|rm|services
- manage stacks on a swarm
docker stack ps --no-trunc {serviceName}
- to see non-truncated error messages for all stack services
docker service create|inspect|logs|ls|ps|rollback|rm|scale|update
- manage
services on a swarm
docker service ps --no-trunc {serviceName}
- to see non-truncated error messages for a service
3. Networking
=======3. Networking
>>>>>>> Stashed changesports from: https://gist.github.com/BretFisher/7233b7ecf14bc49eb47715bbeb2a2769 Inbound Traffic for Swarm Management
- TCP port 2377 for cluster management & raft sync communications
- TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
- UDP port 4789 for "data plane" VXLAN overlay network traffic
- IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option
Inbound to Swarm Managers (superset of worker ports)
Type | Protocol | Ports | Source |
---|---|---|---|
Custom TCP Rule | TCP | 2377 | swarm + remote mgmt |
Custom TCP Rule | TCP | 7946 | swarm |
Custom UDP Rule | UDP | 7946 | swarm |
Custom UDP Rule | UDP | 4789 | swarm |
Custom Protocol | 50 | all | swarm |
a deep dive including ip netns
and iptables
:
https://blog.neuvector.com/article/docker-swarm-container-networking
<<<<<<< Updated upstream
Created: 2023-04-04 Tue 23:50
=======Created: 2023-04-19 Wed 13:47
>>>>>>> Stashed changes