# 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 |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rexs-organization.gitbook.io/kubernetes-installation-steps/kubernetes-an-zhuang-bu-zhou.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
