> For the complete documentation index, see [llms.txt](https://rexs-organization.gitbook.io/kubernetes-installation-steps/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rexs-organization.gitbook.io/kubernetes-installation-steps/kubernetes-an-zhuang-bu-zhou.md).

# Kubernetes 安裝步驟

**Before you begin**

> Rocky Linux ISO 載點: [link](https://rockylinux.org/)
>
> Kubernetes 安裝建議高於 2 core CPU 及 2 GB or more RAM: [link](https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/)

* 準備 5 台 node, OS 選擇 `Rocky Linux 8`
* 每台 node 需要 4 core CPU & 8 GB memory (非必要)
* 6 組 IP (node \* 5 + VIP \* 1)

**Kubernetes Interface**

| interface | service    | version |
| --------- | ---------- | ------- |
| CRI       | containerd | 1.6.19  |
| CNI       | calico     | 3.25.0  |

**nodes**

> 建議登入每台主機, 並使用 `hostnamectl set-hostname xxx` 修改 hostname
>
> 選擇 192.168.50.125 作為 VIP

| node    | ip             | name            |
| ------- | -------------- | --------------- |
| master0 | 192.168.50.120 | cns-k8s-master0 |
| master1 | 192.168.50.121 | cns-k8s-master1 |
| master2 | 192.168.50.122 | cns-k8s-master2 |
| worker0 | 192.168.50.123 | cns-k8s-worker0 |
| worker1 | 192.168.50.124 | cns-k8s-worker1 |
