Skip to content

Commit

Permalink
Merge pull request kubernetes#48329 from asa3311/sync-zh-155
Browse files Browse the repository at this point in the history
[zh] sync share-process-namespace horizontal-pod-autoscale  run-replicated-stateful-application
  • Loading branch information
k8s-ci-robot authored Oct 14, 2024
2 parents 32188f0 + 423967f commit bd8960a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Process namespace sharing is enabled using the `shareProcessNamespace` field of
2. 获取容器 `shell`,执行 `ps`

```shell
kubectl attach -it nginx -c shell
kubectl exec -it nginx -c shell -- /bin/sh
```

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ the Deployment and / or StatefulSet be removed from their
a change to that object is applied, for example via `kubectl apply -f
deployment.yaml`, this will instruct Kubernetes to scale the current number of Pods
to the value of the `spec.replicas` key. This may not be
desired and could be troublesome when an HPA is active.
desired and could be troublesome when an HPA is active, resulting in thrashing or flapping behavior.
-->

### 将 Deployment 和 StatefulSet 迁移到水平自动扩缩 {#migrating-deployments-and-statefulsets-to-horizontal-autoscaling}
Expand All @@ -991,7 +991,7 @@ desired and could be troublesome when an HPA is active.
Deployment 和/或 StatefulSet 的 `spec.replicas` 的值。
如果不这样做,则只要应用对该对象的更改,例如通过 `kubectl apply -f deployment.yaml`,
这将指示 Kubernetes 将当前 Pod 数量扩缩到 `spec.replicas` 键的值。这可能不是所希望的,
并且当 HPA 处于活动状态时可能会很麻烦
并且当 HPA 处于活动状态时,可能会导致波动或反复变化的行为,进而带来麻烦

<!--
Keep in mind that the removal of `spec.replicas` may incur a one-time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ MySQL 设置都使用的是不安全的默认值,这是因为我们想把重
- Some familiarity with MySQL helps, but this tutorial aims to present
general patterns that should be useful for other systems.
- You are using the default namespace or another namespace that does not contain any conflicting objects.
- You need to have a AMD64-compatible CPU.
-->
- 本教程假定你熟悉
[PersistentVolumes](/zh-cn/docs/concepts/storage/persistent-volumes/)
Expand All @@ -63,6 +64,7 @@ MySQL 设置都使用的是不安全的默认值,这是因为我们想把重
[ConfigMap](/zh-cn/docs/tasks/configure-pod-container/configure-pod-configmap/)
- 熟悉 MySQL 会有所帮助,但是本教程旨在介绍对其他系统应该有用的常规模式。
- 你正在使用默认命名空间或不包含任何冲突对象的另一个命名空间。
- 你需要拥有一块兼容 AMD64 架构的 CPU。

## {{% heading "objectives" %}}

Expand Down

0 comments on commit bd8960a

Please sign in to comment.