Skip to content

Commit

Permalink
Update Chinese docs (#174)
Browse files Browse the repository at this point in the history
Signed-off-by: vickyhella <[email protected]>
  • Loading branch information
vickyhella authored Sep 5, 2023
1 parent e3fffe5 commit 7011449
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ weight: 1
* `--disable-cloud-controller`
* `--disable-helm-controller`
* `--disable-network-policy`
* `--disable-servicelb`
* `--disable=servicelb` *注意:其他打包组件可能会在单独服务器上禁用*
* `--egress-selector-mode`
* `--flannel-backend`
* `--flannel-external-ip`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ spec:
| spec.bootstrap | False | 如果需要此 Chart 来引导集群(Cloud Controller Manager 等),请设置为 `True` | |
| spec.set | | 覆盖简单的默认 Chart 值。优先于通过 valuesContent 设置的选项。 | `--set` / `--set-string` |
| spec.jobImage | | 指定安装 helm chart 时要使用的镜像。例如:rancher/klipper-helm:v0.3.0 | |
| spec.timeout | 300 | Helm 操作的超时秒数 | `--timeout` |
| spec.timeout | 300s | Helm 操作的超时,作为 [duration string](https://pkg.go.dev/time#ParseDuration)(`300s`、`10m`、`1h` 等) | `--timeout` |
| spec.failurePolicy | reinstall | 如果设置为 `abort`,Helm 操作会被中止,等待操作人员的手动干预。 | |
| spec.valuesContent | | 通过 YAML 文件内容覆盖复杂的默认 Chart 值 | `--values` |
| spec.chartContent | | Base64 编码的 chart archive .tgz,覆盖 spec.chart | CHART |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,32 @@ kubectl -n system-upgrade get plans -o yaml
kubectl -n system-upgrade get jobs -o yaml
```


## 降级预防

:::info 版本
从 2023-07 版本([v1.27.4+k3s1](https://github.com/k3s-io/k3s-upgrade/releases/tag/v1.27.4%2Bk3s1)、[v1.26.7+k3s1](https://github.com/k3s-io/k3s-upgrade/releases/tag/v1.26.7%2Bk3s1)、[v1.25.12+k3s1](https://github.com/k3s-io/k3s-upgrade/releases/tag/v1.25.12%2Bk3s1)、[v1.24.16+k3s1](https://github.com/k3s-io/k3s-upgrade/releases/tag/v1.24.16%2Bk3s1))开始。
:::

Kubernetes 不支持 Control Plane 组件的降级。升级计划使用的 k3s-upgrade 镜像将拒绝降级 K3s,从而导致计划失败并让你的节点处于封锁状态。

以下是一个示例集群,显示了失败的升级 Pod 和封锁的节点:

```console
ubuntu@user:~$ kubectl get pods -n system-upgrade
NAME READY STATUS RESTARTS AGE
apply-k3s-server-on-ip-172-31-0-16-with-7af95590a5af8e8c3-2cdc6 0/1 Error 0 9m25s
apply-k3s-server-on-ip-172-31-10-23-with-7af95590a5af8e8c-9xvwg 0/1 Error 0 14m
apply-k3s-server-on-ip-172-31-13-213-with-7af95590a5af8e8-8j72v 0/1 Error 0 18m
system-upgrade-controller-7c4b84d5d9-kkzr6 1/1 Running 0 20m
ubuntu@user:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
ip-172-31-0-16 Ready,SchedulingDisabled control-plane,etcd,master 19h v1.27.4+k3s1
ip-172-31-10-23 Ready,SchedulingDisabled control-plane,etcd,master 19h v1.27.4+k3s1
ip-172-31-13-213 Ready,SchedulingDisabled control-plane,etcd,master 19h v1.27.4+k3s1
ip-172-31-2-13 Ready <none> 19h v1.27.4+k3s1
```
你可以通过以下任一方法让封锁的节点恢复服务:
* 更改计划中的版本或通道来定位与集群上当前运行的版本相同或更新的版本,以便计划成功。
* 删除计划并手动取消节点封锁。
使用 `kubectl get plan -n system-upgrade` 查找计划名称,然后使用 `kubectl delete plan -n system-upgrade PLAN_NAME` 将其删除。删除计划后,使用 `kubectl uncordon NODE_NAME` 取消对每个节点的封锁。

0 comments on commit 7011449

Please sign in to comment.