已合并
Merge remote-tracking branch 'upstream24/openEuler-24.03-LTS-SP4' into openEuler-26.09 #37
zhourenjian创建于 8月21日
Merge remote-tracking branch 'upstream24/openEuler-24.03-LTS-SP4' into openEuler-26.09 #37
已合并
共 4 个文件变更+28-23
| @@ -31,15 +31,15 @@ The resources required for running K3s are small. Therefore, K3s is also suitabl | |||
| 31 | 31 | ||
| 32 | - Ensure that the host names of the server node and agent node are different. | 32 | - Ensure that the host names of the server node and agent node are different. |
| 33 | 33 | ||
| 34 | - You can run the `hostnamectl set-hostname "host name"` command to change the host name. | 34 | +You can run the `hostnamectl set-hostname "host name"` command to change the host name. |
| 35 | 35 | ||
| 36 | -  | 36 | + |
| 37 | 37 | ||
| 38 | - Install K3s on each node using Yum. | 38 | - Install K3s on each node using Yum. |
| 39 | 39 | ||
| 40 | The K3s official website provides binary executable files of different architectures and the **install.sh** script for offline installation. The openEuler community migrates the compilation process of the binary file to the community and releases the compiled RPM package. You can run the `yum` command to download and install K3s. | 40 | The K3s official website provides binary executable files of different architectures and the **install.sh** script for offline installation. The openEuler community migrates the compilation process of the binary file to the community and releases the compiled RPM package. You can run the `yum` command to download and install K3s. |
| 41 | 41 | ||
| 42 | -  | 42 | + |
| 43 | 43 | ||
| 44 | ### Deploying the Server Node | 44 | ### Deploying the Server Node |
| 45 | 45 | ||
| @@ -59,7 +59,7 @@ INSTALL_K3S_SKIP_DOWNLOAD=true k3s-install.sh | |||
| 59 | 59 | ||
| 60 | Query the token value of the server node. The token is stored in the **/var/lib/rancher/k3s/server/node-token** file on the server node. | 60 | Query the token value of the server node. The token is stored in the **/var/lib/rancher/k3s/server/node-token** file on the server node. |
| 61 | 61 | ||
| 62 | -> [!NOTE]NOTE: | 62 | +> **Note**: |
| 63 | > | 63 | > |
| 64 | > Only the second half of the token is used. | 64 | > Only the second half of the token is used. |
| 65 | 65 | ||
| @@ -71,7 +71,7 @@ Add agents. Run the following command on each agent node: | |||
| 71 | INSTALL_K3S_SKIP_DOWNLOAD=true K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken k3s-install.sh | 71 | INSTALL_K3S_SKIP_DOWNLOAD=true K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken k3s-install.sh |
| 72 | ``` | 72 | ``` |
| 73 | 73 | ||
| 74 | -> [!NOTE]NOTE: | 74 | +> **Note:** |
| 75 | > | 75 | > |
| 76 | > Replace **myserver** with the IP address of the server or a valid DNS, and replace **mynodetoken** with the token of the server node. | 76 | > Replace **myserver** with the IP address of the server or a valid DNS, and replace **mynodetoken** with the token of the server node. |
| 77 | 77 | ||
| @@ -1,6 +1,6 @@ | |||
| 1 | label: K3s部署指南 | 1 | label: K3s部署指南 |
| 2 | isManual: true | 2 | isManual: true |
| 3 | -description: K3s 是一个轻量级的 Kubernetes 发行版,针对边缘计算等场景进行了优化 | 3 | +description: K3s 是一个轻量级的 Kubernetes 发行版 |
| 4 | sections: | 4 | sections: |
| 5 | - label: K3s部署指南 | 5 | - label: K3s部署指南 |
| 6 | href: ./k3s_deployment_guide.md | 6 | href: ./k3s_deployment_guide.md |
| @@ -16,12 +16,12 @@ K3s 是一个轻量级的 Kubernetes 发行版,它针对边缘计算、物联 | |||
| 16 | 16 | ||
| 17 | K3s 适用于以下场景: | 17 | K3s 适用于以下场景: |
| 18 | 18 | ||
| 19 | -- 边缘计算(Edge Computing) | 19 | +- 边缘计算-Edge |
| 20 | -- 物联网(Internet of Things,IoT) | 20 | +- 物联网-IoT |
| 21 | -- 持续集成(Continuous Integration,CI) | 21 | +- CI |
| 22 | -- 开发(Development) | 22 | +- Development |
| 23 | -- 基于ARM的单板计算机(ARM-based single-board computers) | 23 | +- ARM |
| 24 | -- 嵌入式K8s(Embedded K8s) | 24 | +- 嵌入 K8s |
| 25 | 25 | ||
| 26 | 由于运行 K3s 所需的资源相对较少,所以 K3s 也适用于开发和测试场景。在这些场景中,如果开发或测试人员需要对某些功能进行验证,或对某些问题进行重现,那么使用 K3s 不仅能够缩短启动集群的时间,还能够减少集群需要消耗的资源。 | 26 | 由于运行 K3s 所需的资源相对较少,所以 K3s 也适用于开发和测试场景。在这些场景中,如果开发或测试人员需要对某些功能进行验证,或对某些问题进行重现,那么使用 K3s 不仅能够缩短启动集群的时间,还能够减少集群需要消耗的资源。 |
| 27 | 27 | ||
| @@ -31,21 +31,21 @@ K3s 适用于以下场景: | |||
| 31 | 31 | ||
| 32 | - 确保server节点及agent节点主机名不一致: | 32 | - 确保server节点及agent节点主机名不一致: |
| 33 | 33 | ||
| 34 | - 可以通过 `hostnamectl set-hostname "主机名"` 进行主机名的修改。 | 34 | +可以通过 hostnamectl set-hostname “主机名” 进行主机名的修改。 |
| 35 | 35 | ||
| 36 | -  | 36 | + |
| 37 | 37 | ||
| 38 | - 在各节点yum 安装 K3s: | 38 | - 在各节点yum 安装 K3s: |
| 39 | 39 | ||
| 40 | K3s官网采用下载对应架构二进制可执行文件的格式,通过install.sh脚本进行离线安装,openEuler社区将该二进制文件的编译过程移植到社区中,并编译出RPM包。此处可通过yum命令直接进行下载安装。 | 40 | K3s官网采用下载对应架构二进制可执行文件的格式,通过install.sh脚本进行离线安装,openEuler社区将该二进制文件的编译过程移植到社区中,并编译出RPM包。此处可通过yum命令直接进行下载安装。 |
| 41 | 41 | ||
| 42 | -  | 42 | + |
| 43 | 43 | ||
| 44 | ### 部署server节点 | 44 | ### 部署server节点 |
| 45 | 45 | ||
| 46 | 如需在单个服务器上安装 K3s,可以在 server 节点上执行如下操作: | 46 | 如需在单个服务器上安装 K3s,可以在 server 节点上执行如下操作: |
| 47 | 47 | ||
| 48 | -```sh | 48 | +```shell |
| 49 | INSTALL_K3S_SKIP_DOWNLOAD=true k3s-install.sh | 49 | INSTALL_K3S_SKIP_DOWNLOAD=true k3s-install.sh |
| 50 | ``` | 50 | ``` |
| 51 | 51 | ||
| @@ -59,7 +59,7 @@ INSTALL_K3S_SKIP_DOWNLOAD=true k3s-install.sh | |||
| 59 | 59 | ||
| 60 | 首先查询server节点的token值,该token可在server节点的/var/lib/rancher/k3s/server/node-token查到。 | 60 | 首先查询server节点的token值,该token可在server节点的/var/lib/rancher/k3s/server/node-token查到。 |
| 61 | 61 | ||
| 62 | -> [!NOTE]说明: | 62 | +> **注意**: |
| 63 | > | 63 | > |
| 64 | > 后续我们只用到该token的后半部分。 | 64 | > 后续我们只用到该token的后半部分。 |
| 65 | 65 | ||
| @@ -67,13 +67,13 @@ INSTALL_K3S_SKIP_DOWNLOAD=true k3s-install.sh | |||
| 67 | 67 | ||
| 68 | 选择添加其他 agent,请在每个 agent 节点上执行以下操作。 | 68 | 选择添加其他 agent,请在每个 agent 节点上执行以下操作。 |
| 69 | 69 | ||
| 70 | -```sh | 70 | +```shell |
| 71 | INSTALL_K3S_SKIP_DOWNLOAD=true K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken k3s-install.sh | 71 | INSTALL_K3S_SKIP_DOWNLOAD=true K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetoken k3s-install.sh |
| 72 | ``` | 72 | ``` |
| 73 | 73 | ||
| 74 | -> [!NOTE]说明: | 74 | +> **注意** |
| 75 | > | 75 | > |
| 76 | -> 将 myserver 替换为 server 的 IP 或有效的 DNS,并将 mynodetoken 替换 server 节点的 token。 | 76 | +> 将 myserver 替换为 server 的 IP 或有效的 DNS,并将 mynodetoken 替换 server 节点的 token: |
| 77 | 77 | ||
| 78 |  | 78 |  |
| 79 | 79 | ||
| @@ -87,4 +87,4 @@ INSTALL_K3S_SKIP_DOWNLOAD=true K3S_URL=https://myserver:6443 K3S_TOKEN=mynodetok | |||
| 87 | 87 | ||
| 88 | ### 更多用法 | 88 | ### 更多用法 |
| 89 | 89 | ||
| 90 | -K3s的更多用法可以参考K3s官网,<https://rancher.com/docs/k3s/latest/en/> ,<https://docs.rancher.cn/k3s/> | 90 | +K3s的更多用法可以参考K3s官网,<https://rancher.com/docs/k3s/latest/en> ,<https://docs.rancher.cn/k3s> |
| @@ -3,7 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | Name: k3s | 4 | Name: k3s |
| 5 | Version: 1.24.2+rc1+k3s2 | 5 | Version: 1.24.2+rc1+k3s2 |
| 6 | -Release: 4 | 6 | +Release: 6 |
| 7 | Summary: Installer for k3s optimised for openSUSE MicroOS | 7 | Summary: Installer for k3s optimised for openSUSE MicroOS |
| 8 | License: Apache-2.0 | 8 | License: Apache-2.0 |
| 9 | Group: System/Management | 9 | Group: System/Management |
| @@ -24,7 +24,6 @@ Requires: k3s-selinux | |||
| 24 | Requires: iptables | 24 | Requires: iptables |
| 25 | Conflicts: cri-tools | 25 | Conflicts: cri-tools |
| 26 | Conflicts: kubectl | 26 | Conflicts: kubectl |
| 27 | -Conflicts: kubernetes-client | ||
| 28 | Conflicts: kubernetes-client-provider | 27 | Conflicts: kubernetes-client-provider |
| 29 | 28 | ||
| 30 | Requires(post): systemd | 29 | Requires(post): systemd |
| @@ -93,6 +92,12 @@ cp install.sh %{buildroot}%{_sbindir}/k3s-install.sh | |||
| 93 | %{_sbindir}/k3s-install.sh | 92 | %{_sbindir}/k3s-install.sh |
| 94 | 93 | ||
| 95 | %changelog | 94 | %changelog |
| 95 | +* Mon Apr 27 2026 Renjian Zhou <zhourenjian@huawei.com> - 1.24.2+rc1+k3s2-6 | ||
| 96 | +- sync from 24.03-LTS-SP3 | ||
| 97 | + | ||
| 98 | +* Tue Jun 24 2025 Renjian Zhou <zhourenjian@huawei.com> - 1.24.2+rc1+k3s2-5 | ||
| 99 | +- delete conflict of kubernetes-client | ||
| 100 | + | ||
| 96 | * Sun Apr 21 2024 Yuncheng Zhu <zhuyuncheng@huawei.com> - 1.24.2+rc1+k3s2-4 | 101 | * Sun Apr 21 2024 Yuncheng Zhu <zhuyuncheng@huawei.com> - 1.24.2+rc1+k3s2-4 |
| 97 | - change requirement docker-runc to runc | 102 | - change requirement docker-runc to runc |
| 98 | 103 | ||