Docker swarm Flashcards
How do you initialise the cluster on the swarm manager?
docker swarm init –advertise-addr
How do you add workers to a swarm
docker swarm join –token :2377
How do you list nodes in a swarm?
docker node ls
How do you get the swarm token on the master node?
docker swarm join-token worker
docker swarm join-token manager
How do you backup docker swarm?
systemctl stop docker
tar -zvcf backup.tar.gz /var/lib/docker/swarm
systemctl start docker
How do restore from a docker swarm backup?
systemctl stop docker
rm -rf /var/lib/docker/swarm/*
tar -zxvf backup.tar.gz -C /var/lib/docker/swarm/
What namespaces does docker use to isolate containers?
pid - process isolation net - network isolation ipc - interprocess communication mnt - filesystem mount points uts - kernel and version identifiers
What does docker use to enforce resource limits?
cgroups - control groups