Cài K8S bằng Kubespray thì Control plane node hay Master node cần bao nhiêu RAM?

Cài K8S bằng Kubespray thì Control Plane node hay Master node cần bao nhiêu RAM là câu hỏi nhiều người thắc mắc.

Nói cách khác

Máy ảo chạy K8S Control plane cần ít nhất bao nhiêu RAM?

Nếu Control plane ít RAM quá khi chạy Kubespray cài K8S thì bạn sẽ gặp lỗi sau

TASK [kubernetes/preinstall : Stop if memory is too small for masters] *********
fatal: [master1]: FAILED! => {
    "assertion": "ansible_memtotal_mb >= minimal_master_memory_mb",
    "changed": false,
    "evaluated_to": false,
    "msg": "Assertion failed"
}

PLAY RECAP *********************************************************************
localhost                  : ok=3    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
master1                    : ok=56   changed=2    unreachable=0    failed=1    skipped=55   rescued=0    ignored=0
worker1                    : ok=50   changed=2    unreachable=0    failed=0    skipped=47   rescued=0    ignored=0
worker2                    : ok=50   changed=2    unreachable=0    failed=0    skipped=47   rescued=0    ignored=0

Tuesday 28 November 2023  09:52:26 +0000 (0:00:00.037)       0:00:14.187 ******
===============================================================================
kubespray-defaults : Gather ansible_default_ipv4 from all hosts --------- 3.03s
Gather necessary facts (hardware) --------------------------------------- 0.90s
bootstrap-os : Install dbus for the hostname module --------------------- 0.75s
bootstrap-os : Assign inventory name to unconfigured hostnames (non-CoreOS, non-Flatcar, Suse and ClearLinux, non-Fedora) --- 0.57s
download : Download | Download files / images --------------------------- 0.52s
bootstrap-os : Gather host facts to get ansible_os_family --------------- 0.40s
kubernetes/preinstall : Remove swapfile from /etc/fstab ----------------- 0.38s
Gather necessary facts (network) ---------------------------------------- 0.34s
adduser : User | Create User Group -------------------------------------- 0.31s
adduser : User | Create User -------------------------------------------- 0.30s
bootstrap-os : Create remote_tmp for it is used by another module ------- 0.29s
bootstrap-os : Ensure bash_completion.d folder exists ------------------- 0.28s
kubernetes/preinstall : Check if booted with ostree --------------------- 0.28s
Gather minimal facts ---------------------------------------------------- 0.27s
kubernetes/preinstall : Check swap -------------------------------------- 0.26s
kubernetes/preinstall : Set is_fedora_coreos ---------------------------- 0.24s
kubernetes/preinstall : Get content of /etc/resolv.conf ----------------- 0.23s
kubernetes/preinstall : Check systemd-resolved -------------------------- 0.19s
kubernetes/preinstall : Check existence of /etc/resolvconf/resolv.conf.d --- 0.18s
kubernetes/preinstall : Check status of /etc/resolv.conf ---------------- 0.18s

Bạn có muốn

Học lập trình thực chiến

Học DevOps thực chiến

Học Ansible automation thực chiến

hãy mua khóa học này của chúng tôi

Build K8S Cluster bằng Kubespray – Tự động 100%