server# docker run --name webd0N -h webd0N -itd -v /var/www/:/var/www/ --rm -P test/webd
node1,2,3# mkdir /var/www node1,2,3# cat /etc/fstab ... server:/var/www /var/www nfs rw,soft 0 0 root@node1:~# systemctl daemon-reload node1,2,3# mount /var/www
node1,2,3# cat docker-compose.yml
services: webd: image: server.corpX.un:5000/student/webd ports: - "80" volumes: - /var/www/:/var/www/ deploy: mode: replicated replicas: 3
node1,2,3# docker compose up -d node1,2,3# docker ps -q | xargs -l docker port | sort -n node1,2,3# docker compose logs webd -f
node1,2,3# docker compose down
root@node1:~# kubectl get pods -n my-ns -o wide --watch