Docker swarm Flashcards

1
Q

How do you initialise the cluster on the swarm manager?

A

docker swarm init –advertise-addr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you add workers to a swarm

A

docker swarm join –token :2377

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you list nodes in a swarm?

A

docker node ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you get the swarm token on the master node?

A

docker swarm join-token worker

docker swarm join-token manager

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you backup docker swarm?

A

systemctl stop docker
tar -zvcf backup.tar.gz /var/lib/docker/swarm
systemctl start docker

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How do restore from a docker swarm backup?

A

systemctl stop docker
rm -rf /var/lib/docker/swarm/*
tar -zxvf backup.tar.gz -C /var/lib/docker/swarm/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What namespaces does docker use to isolate containers?

A
pid - process isolation
net - network isolation
ipc - interprocess communication
mnt - filesystem mount points
uts - kernel and version identifiers
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What does docker use to enforce resource limits?

A

cgroups - control groups

How well did you know this?
1
Not at all
2
3
4
5
Perfectly