This commit is contained in:
@@ -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 的版本
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
7
部署文档/Rancher/如何在国内使用Rancher.md
Normal file
7
部署文档/Rancher/如何在国内使用Rancher.md
Normal file
@@ -0,0 +1,7 @@
|
||||
> 本文作者:丁辉
|
||||
|
||||
# 如何在国内使用Rancher
|
||||
|
||||
> 网页地址记录
|
||||
|
||||
[官方文档](https://docs.rancher.cn/docs/rancher2/best-practices/use-in-china/)
|
||||
Reference in New Issue
Block a user