Merge pull request #1762 from Felixnoo/update-stateful
Update Doc: StatefulSets
|
|
@ -33,33 +33,33 @@ In KubeSphere, a **Headless** service is also created when you create a Stateful
|
|||
|
||||
Log in to the console as `project-regular`. Go to **Application Workloads** of a project, select **Workloads**, and click **Create** under the tab **StatefulSets**.
|
||||
|
||||

|
||||

|
||||
|
||||
### Step 2: Enter basic information
|
||||
|
||||
Specify a name for the StatefulSet (for example, `demo-stateful`) and click **Next** to continue.
|
||||
|
||||

|
||||

|
||||
|
||||
### Step 3: Set an image
|
||||
|
||||
1. Before you set an image, define the number of replicated Pods in **Pod Replicas** by clicking the **plus** or **minus** icon, which is indicated by the `.spec.replicas` field in the manifest file.
|
||||
1. Before you set an image, define the number of replicated Pods in **Pod Replicas** by clicking <img src="/images/docs/project-user-guide/application-workloads/statefulsets/plus-icon.png" width="20px" /> or <img src="/images/docs/project-user-guide/application-workloads/statefulsets/minus-icon.png" width="20px" />, which is indicated by the `.spec.replicas` field in the manifest file.
|
||||
|
||||
{{< notice tip >}}
|
||||
|
||||
You can see the StatefulSet manifest file in YAML format by enabling **Edit Mode** in the top-right corner. KubeSphere allows you to edit the manifest file directly to create a StatefulSet. Alternatively, you can follow the steps below to create a StatefulSet via the dashboard.
|
||||
You can see the StatefulSet manifest file in YAML format by enabling **Edit Mode** in the upper-right corner. KubeSphere allows you to edit the manifest file directly to create a StatefulSet. Alternatively, you can follow the steps below to create a StatefulSet via the dashboard.
|
||||
|
||||
{{</ notice >}}
|
||||
|
||||

|
||||

|
||||
|
||||
2. Click the **Add Container Image** box.
|
||||
2. Click **Add Container Image**.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Enter an image name from public Docker Hub or from a [private repository](../../configuration/image-registry/) you specified. For example, enter `nginx` in the search bar and press **Enter**.
|
||||
|
||||

|
||||

|
||||
|
||||
{{< notice note >}}
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ You can see the StatefulSet manifest file in YAML format by enabling **Edit Mode
|
|||
|
||||
4. Set requests and limits for CPU and memory resources based on your needs. For more information, see [Resource Request and Resource Limit in Container Image Settings](../container-image-settings/#add-container-image).
|
||||
|
||||

|
||||

|
||||
|
||||
5. Click **Use Default Ports** for **Service Settings** or you can customize **Protocol**, **Name** and **Container Port**.
|
||||
|
||||
|
|
@ -88,13 +88,13 @@ You can see the StatefulSet manifest file in YAML format by enabling **Edit Mode
|
|||
|
||||
StatefulSets can use the volume template, but you must create it in **Storage** in advance. For more information about volumes, visit [Volumes](../../storage/volumes/#mount-a-volume). When you finish, click **Next** to continue.
|
||||
|
||||

|
||||

|
||||
|
||||
### Step 5: Configure advanced settings
|
||||
|
||||
You can set a policy for node scheduling and add metadata in this section. When you finish, click **Create** to complete the whole process of creating a StatefulSet.
|
||||
|
||||

|
||||

|
||||
|
||||
- **Set Node Scheduling Policy**
|
||||
|
||||
|
|
@ -108,9 +108,9 @@ You can set a policy for node scheduling and add metadata in this section. When
|
|||
|
||||
### Detail page
|
||||
|
||||
1. After a StatefulSet is created, it displays in the list as below. You can click the three dots on the right to select actions from the menu to modify your StatefulSet.
|
||||
1. After a StatefulSet is created, it will be displayed in the list as below. You can click <img src="/images/docs/project-user-guide/application-workloads/statefulsets/three-dots.png" width="20px" /> on the right to select options from the menu to modify your StatefulSet.
|
||||
|
||||

|
||||

|
||||
|
||||
- **Edit**: View and edit the basic information.
|
||||
- **Edit YAMl**: View, upload, download, or update the YAML file.
|
||||
|
|
@ -119,11 +119,11 @@ You can set a policy for node scheduling and add metadata in this section. When
|
|||
|
||||
2. Click the name of the StatefulSet and you can go to its detail page.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Click **More** to display what operations about this StatefulSet you can do.
|
||||
|
||||

|
||||

|
||||
|
||||
- **Revision Rollback**: Select the revision to roll back.
|
||||
- **Edit Service**: Set the port to expose the container image and the service port.
|
||||
|
|
@ -134,12 +134,12 @@ You can set a policy for node scheduling and add metadata in this section. When
|
|||
|
||||
4. Click the **Resource Status** tab to view the port and Pod information of a StatefulSet.
|
||||
|
||||

|
||||

|
||||
|
||||
- **Replica Status**: Click the arrow in the image to increase or decrease the number of Pod replicas.
|
||||
- **Replica Status**: Click or to increase or decrease the number of Pod replicas.
|
||||
- **Pod detail**
|
||||
|
||||

|
||||

|
||||
|
||||
- The Pod list provides detailed information of the Pod (status, node, Pod IP and resource usage).
|
||||
- You can view the container information by clicking a Pod item.
|
||||
|
|
@ -150,35 +150,35 @@ You can set a policy for node scheduling and add metadata in this section. When
|
|||
|
||||
After the resource template of workload is changed, a new log will be generated and Pods will be rescheduled for a version update. The latest 10 versions will be saved by default. You can implement a redeployment based on the change log.
|
||||
|
||||
### Matadata
|
||||
### Metadata
|
||||
|
||||
Click the **Metadata** tab to view the labels and annotations of the StatefulSet.
|
||||
|
||||

|
||||

|
||||
|
||||
### Monitoring
|
||||
|
||||
1. Click the **Monitoring** tab to view the CPU usage, memory usage, outbound traffic, and inbound traffic of the StatefulSet.
|
||||
|
||||

|
||||

|
||||
|
||||
2. Click the drop-down menu in the top-right corner to customize the time range and time interval.
|
||||
2. Click the drop-down menu in the upper-right corner to customize the time range and time interval.
|
||||
|
||||

|
||||

|
||||
|
||||
3. Click <img src="/images/docs/project-user-guide/workloads/statefulsets_autorefresh_start.png" width="20px" />/<img src="/images/docs/project-user-guide/workloads/statefulsets_autorefresh_stop.png" width="20px" /> in the top-right corner to start/stop automatic data refreshing.
|
||||
3. Click <img src="/images/docs/project-user-guide/application-workloads/statefulsets/start-refresh.png" width="20px" />/<img src="/images/docs/project-user-guide/application-workloads/statefulsets/stop-refresh.png" width="20px" /> in the upper-right corner to start/stop automatic data refreshing.
|
||||
|
||||
4. Click <img src="/images/docs/project-user-guide/workloads/statefulsets_refresh.png" width="20px" /> in the top-right corner to manually refresh the data.
|
||||
4. Click <img src="/images/docs/project-user-guide/application-workloads/statefulsets/refresh.png" width="20px" /> in the upper-right corner to manually refresh the data.
|
||||
|
||||
### Environment variables
|
||||
|
||||
Click the **Environment Variables** tab to view the environment variables of the StatefulSet.
|
||||
|
||||

|
||||

|
||||
|
||||
### Events
|
||||
|
||||
Click the **Events** tab to view the events of the StatefulSet.
|
||||
|
||||

|
||||

|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ weight: 10220
|
|||
|
||||
### 步骤 3:设置镜像
|
||||
|
||||
1. 设置镜像前,请点击**容器组副本数量**中的**加号**或**减号**图标来定义 Pod(即容器组)的副本数量,该参数显示在清单文件中的 `.spec.replicas` 字段。
|
||||
1. 设置镜像前,请点击**容器组副本数量**中的 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/statefulsets/plus-icon.png" width="20px" /> 或 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/statefulsets/minus-icon.png" width="20px" /> 来定义 Pod(即容器组)的副本数量,该参数显示在清单文件中的 `.spec.replicas` 字段。
|
||||
|
||||
{{< notice tip >}}
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ weight: 10220
|
|||
|
||||
### 详情页面
|
||||
|
||||
1. 有状态副本集创建后会显示在下方的列表中。您可以点击右边的三个点,在弹出菜单中选择操作,修改您的有状态副本集。
|
||||
1. 有状态副本集创建后会显示在下方的列表中。您可以点击右边的 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/statefulsets/three-dots.png" width="20px" />,在弹出菜单中选择操作,修改您的有状态副本集。
|
||||
|
||||

|
||||
|
||||
|
|
@ -137,7 +137,7 @@ weight: 10220
|
|||
|
||||

|
||||
|
||||
- **副本运行状态**:点击图像中的箭头增加或减少 Pod 副本数量。
|
||||
- **副本运行状态**:点击 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/statefulsets/up-arrow.png" width="20px" /> 或 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/statefulsets/down-arrow.png" width="20px" /> 来增加或减少 Pod 副本数量。
|
||||
- **Pod 详情**
|
||||
|
||||

|
||||
|
|
|
|||
|
After Width: | Height: | Size: 310 KiB |
|
After Width: | Height: | Size: 410 KiB |
|
After Width: | Height: | Size: 624 KiB |
|
After Width: | Height: | Size: 356 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 294 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 135 KiB |
|
After Width: | Height: | Size: 470 KiB |
|
After Width: | Height: | Size: 52 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
After Width: | Height: | Size: 167 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 457 KiB |
|
After Width: | Height: | Size: 359 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 227 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 197 KiB |
|
After Width: | Height: | Size: 566 KiB |
|
After Width: | Height: | Size: 414 KiB |
|
After Width: | Height: | Size: 466 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 1.5 KiB |