--- # ПРЕСЕТ: Kubernetes кластер (8-12 машин) # # Описание: Полноценный Kubernetes кластер с различными ролями # - 3 master ноды (control-plane) - управление кластером # - 3 worker ноды - выполнение workload # - 1 etcd кластер (3 ноды) - хранение состояния # - 1 ingress контроллер - маршрутизация трафика # - 1 мониторинг (Prometheus) - метрики кластера # # Использование: make lab-test SCENARIO=universal LAB_SPEC=molecule/presets/k8s-cluster.yml # # Автор: Сергей Антропов # Сайт: https://devops.org.ru docker_network: labnet images: debian: "ghcr.io/ansible-community/molecule-ubuntu-systemd:jammy" rhel: "quay.io/centos/centos:stream9-systemd" systemd_defaults: privileged: true command: "/sbin/init" volumes: - "/sys/fs/cgroup:/sys/fs/cgroup:ro" tmpfs: - "/run" - "/run/lock" capabilities: - "SYS_ADMIN" hosts: - name: master1 group: masters family: debian publish: - "6443:6443" - name: master2 group: masters family: rhel publish: - "6444:6443" - name: master3 group: masters family: debian publish: - "6445:6443" - name: worker1 group: workers family: rhel publish: - "30000:30000" - name: worker2 group: workers family: debian publish: - "30001:30000" - name: worker3 group: workers family: rhel publish: - "30002:30000" - name: etcd1 group: etcd family: debian publish: - "2379:2379" - name: etcd2 group: etcd family: rhel publish: - "2380:2379" - name: etcd3 group: etcd family: debian publish: - "2381:2379" - name: ingress group: ingress family: rhel publish: - "80:80" - "443:443" - name: monitoring group: monitoring family: debian publish: - "9090:9090"