Skip to content

Commit

Permalink
Merge pull request #2551 from Icarus9913/doc/wk/statefulset
Browse files Browse the repository at this point in the history
statefulset doc
  • Loading branch information
Icarus9913 authored Nov 7, 2023
2 parents 2b72050 + 7399801 commit 7e33c1b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
12 changes: 9 additions & 3 deletions docs/usage/statefulset-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@

## 介绍

*Spiderpool 能保证 StatefulSet 的 Pod 在重启、重建场景下,持续获取到相同的 IP 地址。*
*由于 StatefulSet 多用在有状态的服务中,因此对网络稳定的标识信息有了更高的要求。Spiderpool 能保证 StatefulSet 的 Pod 在重启、重建场景下,持续获取到相同的 IP 地址。*

## StatefulSet 功能
## StatefulSet 固定地址

Deployment 和 StatefulSet 控制器,对于 IP 地址固定的需求是不一样的:
StatefulSet 会在以下一些场景中会出现固定地址的使用:

1. StatefulSet 对应的 Pod 出现的故障重建的情况

2. StatefulSet 在副本数量不变的情况下,删除 Pod 使其重启的情况

此外,StatefulSet 和 Deployment 控制器,对于 IP 地址固定的需求是不一样的:

- 对于 StatefulSet,Pod 副本重启前后,其 Pod 名保持不变,但是 Pod UUID 发生了变化,其是有状态的,应用管理员希望该 Pod 重启前后,仍能分配到相同的 IP 地址。

Expand Down
10 changes: 8 additions & 2 deletions docs/usage/statefulset.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@

## Introduction

*Spiderpool ensures that StatefulSet Pods consistently retain the same IP address, even in scenarios such as restarts or rebuilds.*
*Due to StatefulSet being commonly used for stateful services, there is a higher demand for stable network identifiers. Spiderpool ensures that StatefulSet Pods consistently retain the same IP address, even in scenarios such as restarts or rebuilds.*

## StatefulSet features

The requirements for fixed IP address differ between Deployment and StatefulSet:
StatefulSet utilizes fixed addresses in the following scenarios:

- When a StatefulSet Pod fails and needs to be reconstructed.

- Once a Pod is deleted and needs to be restarted and the replicas of the StatefulSet remains unchanged.

The requirements for fixed IP address differ between StatefulSet and Deployment:

- For StatefulSet, the Pod's name remains the same throughout Pod restarts despite its changed UUID. As the Pod is stateful, application administrators hope that each Pod continues to be assigned the same IP address after restarts.

Expand Down

0 comments on commit 7e33c1b

Please sign in to comment.