Skip to content

Commit

Permalink
提交笔记
Browse files Browse the repository at this point in the history
  • Loading branch information
kino committed Feb 12, 2022
1 parent 0a6ad77 commit 74930e2
Show file tree
Hide file tree
Showing 9 changed files with 1,438 additions and 239 deletions.
22 changes: 12 additions & 10 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@

* [CentOS7 YUM安装 docker](note/docker/CentOS7安装Docker.md)
* [CentOS7 离线安装 docker](note/docker/CentOS7离线安装Docker.md)
* [CentOS7 降级 Docker](note/docker/CentOS7降级Docker.md)
* [Docker 常用命令](note/docker/Docker常用命令.md)
* [Docker 镜像](note/docker/Docker镜像.md)
* [Docker 容器数据卷](note/docker/Docker容器数据卷.md)
Expand Down Expand Up @@ -409,9 +410,10 @@
* [Kubernetes 部署 Dashboard](note/Kubernetes/k8s-dashboard.md)
* [Kubernetes 工作负载 | Pod实践](note/Kubernetes/k8s-pod.md)
* [Kubernetes 工作负载 | Deployment实践](note/Kubernetes/k8s-Deployment.md)
* [Kubernetes 工作负载 | Service实践](note/Kubernetes/k8s-Service.md)
* [Kubernetes 工作负载 | 服务网络和负载均衡](note/Kubernetes/k8s-Service.md)
* [Kubernetes 工作负载 | RS、RC、DaemonSet、StatefulSet、Job、CronJob实践](note/Kubernetes/k8s-RS&RC.md)
* [Kubernetes 存储 | 卷的实践](note/Kubernetes/volume.md)
* [Kubernetes 常用服务部署](note/Kubernetes/常用服务部署.md)
* [Kubernetes label](note/Kubernetes/k8s-label.md)
* [Kubernetes Volume挂载相关](note/Kubernetes/k8s-Volume.md)
* [Kubernetes 特殊 Volume](note/Kubernetes/k8s-特殊Volume.md)
Expand Down
17 changes: 16 additions & 1 deletion note/Kubernetes/k8s-Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,22 @@ $ kubectl rollout undo deployment deployment-test -n day11
$ kubectl rollout undo deployment deployment-test -n day11 -to-revision=1
```

# 五、比例缩放
# 五、deployment 更新策略

当升级 deployment 时,可以使用 `.spec.strategy` 指定新 Pod 替换旧 Pod 的策略。

`.spec.strategy.type` 可以是 `Recreate``RollingUpdate``RollingUpdate` 是默认值。



## 5.1 Recreate 重新创建

如果 `.spec.strategy.type==Recreate`,在创建新 Pods 之前,所有现有的 Pods 会被杀死。

## 5.2 RollingUpdate 滚动更新

`.spec.strategy.type==RollingUpdate` 有两个参数: `maxSurge`, `maxUnavailable`

```yaml
apiVersion: apps/v1
kind: Deployment
Expand Down
Loading

0 comments on commit 74930e2

Please sign in to comment.