修改和新增
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
2025-12-23 01:53:01 +08:00
parent 89a07bc062
commit b44594def6
17 changed files with 922 additions and 110 deletions

View File

@@ -69,7 +69,7 @@
1. 下载 ezdown
```bash
wget https://github.com/easzlab/kubeasz/releases/download/3.6.2/ezdown && chmod 777 ezdown
wget https://github.com/easzlab/kubeasz/releases/download/3.6.8/ezdown && chmod 777 ezdown
```
> 下载支持 Docker 的版本

View File

@@ -17,6 +17,12 @@
ntpdate -u ntp.aliyun.com && date
```
3. 配置定时任务
```bash
0 2 * * * /usr/bin/ntpdate -u ntp.aliyun.com && /bin/date
```
> 离线环境使用此篇文档同步
>
> [NTP时间同步](https://gitee.com/offends/Linux/blob/main/Docs/NTP%E6%97%B6%E9%97%B4%E5%90%8C%E6%AD%A5.md)
@@ -120,13 +126,15 @@
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv4.ip_forward = 1
vm.swappiness = 0
EOF
```
加载
```bash
sysctl --system
```

View File

@@ -116,20 +116,20 @@
## 安装并初始化Rke
[RKE二进制文件](https://github.com/rancher/rke/releases/)
[RKE二进制文件](https://github.com/rancher/rke/releases/) [官方中国国内二进制文件](https://mirror.rancher.cn/#rke/)
1. 下载 RKE 二进制文件,并添加到可执行路径下
> 1.8 版本是 RKE 1.x 系列的最终版本
```bash
wget https://github.com/rancher/rke/releases/download/v1.8.6/rke_linux-amd64
wget https://github.com/rancher/rke/releases/download/v1.8.9/rke_linux-amd64
```
2. 授权
```bash
chmod 777 rke_linux-amd64 && mv rke_linux-amd64 /usr/local/bin/rke
install -o root -g root -m 0755 rke_linux-amd64 /usr/local/bin/rke
```
### 方法一 (不推荐怪麻烦的请看"方法二")
@@ -209,6 +209,16 @@ sed -i '/^ingress:$/,/^ provider:/ s/provider: ""/provider: "none"/' cluster.ym
...
```
**更换镜像仓库**(适用于离线环境)
```yaml
private_registries:
- url: registry.cn-hangzhou.aliyuncs.com # 仅为示例
is_default: true # 所有的系统镜像都将使用该镜像仓库进行拉取
user: $user
password: $password
```
3. 基础参数修改
```bash
@@ -390,7 +400,14 @@ rke etcd snapshot-restore --config cluster.yml --name <快照名称>
curl -sfL https://gitee.com/offends/Kubernetes/raw/main/File/Shell/restore-rkestate-config.sh | bash -s
```
## 基础命令
- 查看集群所需镜像
```bash
rke config --system-images
```

View File

@@ -0,0 +1,7 @@
> 本文作者:丁辉
# 如何在国内使用Rancher
> 网页地址记录
[官方文档](https://docs.rancher.cn/docs/rancher2/best-practices/use-in-china/)