Merge pull request #1758 from Felixnoo/update-deployments

Update Doc: Deployments
This commit is contained in:
Patrick-LuoYu 2021-07-02 17:04:28 +08:00 committed by GitHub
commit ff1d717ed3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
33 changed files with 32 additions and 32 deletions

View File

@ -21,31 +21,31 @@ You need to create a workspace, a project and an account (`project-regular`). Th
Log in to the console as `project-regular`. Go to **Application Workloads** of a project, select **Workloads**, and click **Create** under the tab **Deployments**.
![deployments](/images/docs/project-user-guide/workloads/deployments.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/deployments.png)
### Step 2: Enter basic information
Specify a name for the Deployment (for example, `demo-deployment`) and click **Next** to continue.
![deployments](/images/docs/project-user-guide/workloads/deployments_form_1.jpg)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/enter-info.png)
### 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/deployments/plus-icon.png" width="20px" /> or <img src="/images/docs/project-user-guide/application-workloads/deployments/minus-icon.png" width="20px" />, which is indicated by the `.spec.replicas` field in the manifest file.
{{< notice tip >}}
You can see the Deployment 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 Deployment. Alternatively, you can follow the steps below to create a Deployment via the dashboard.
You can see the Deployment 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 Deployment. Alternatively, you can follow the steps below to create a Deployment via the dashboard.
{{</ notice >}}
![deployments](/images/docs/project-user-guide/workloads/deployments_form_2.jpg)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/set-replicas.png)
2. Click the **Add Container Image** box.
2. Click **Add Container Image**.
![deployments](/images/docs/project-user-guide/workloads/deployments_form_2_container_btn.jpg)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/add-container-image.png)
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**.
![deployments](/images/docs/project-user-guide/workloads/deployments_form_2_container_1.jpg)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/enter-nginx.png)
{{< notice note >}}
@ -56,15 +56,15 @@ You can see the Deployment 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).
![deployments](/images/docs/project-user-guide/workloads/deployments_form_2_container_2.jpg)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/set-requests-limits.png)
5. Click **Use Default Ports** for **Port Settings** or you can customize **Protocol**, **Name** and **Container Port**.
6. Select a policy for image pulling from the drop-down menu. For more information, see [Image Pull Policy in Container Image Settings](../container-image-settings/#add-container-image).
7. For other settings (**Health Checker**, **Start Command**, **Environment Variables**, **Container Security Context** and **Sync Host Timezone**), you can configure them on the dashboard as well. For more information, see detailed explanations of these properties in [Container Image Settings](../container-image-settings/#add-container-image). When you finish, click **√** in the bottom-right corner to continue.
7. For other settings (**Health Checker**, **Start Command**, **Environment Variables**, **Container Security Context** and **Sync Host Timezone**), you can configure them on the dashboard as well. For more information, see detailed explanations of these properties in [Container Image Settings](../container-image-settings/#add-container-image). When you finish, click **√** in the lower-right corner to continue.
8. Select an update strategy from the drop-down menu. It is recommended you choose **RollingUpdate**. For more information, see [Update Strategy](../container-image-settings/#update-strategy).
8. Select an update strategy from the drop-down menu. It is recommended that you choose **RollingUpdate**. For more information, see [Update Strategy](../container-image-settings/#update-strategy).
9. Select a deployment mode. For more information, see [Deployment Mode](../container-image-settings/#deployment-mode).
@ -74,7 +74,7 @@ You can see the Deployment manifest file in YAML format by enabling **Edit Mode*
You can add a volume directly or mount a ConfigMap or Secret. Alternatively, click **Next** directly to skip this step. For more information about volumes, visit [Volumes](../../storage/volumes/#mount-a-volume).
![deployments](/images/docs/project-user-guide/workloads/deployments_form_3.jpg)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/mount-volumes.png)
{{< notice note >}}
@ -86,7 +86,7 @@ Deployments can't use a volume template, which is used by StatefulSets.
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 Deployment.
![deployments](/images/docs/project-user-guide/workloads/deployments_form_4.jpg)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/advanced-settings.png)
- **Set Node Scheduling Policy**
@ -100,9 +100,9 @@ You can set a policy for node scheduling and add metadata in this section. When
### Detail page
1. After a Deployment is created, it displays in the list as below. You can click the three dots on the right and select actions from the menu to modify your Deployment.
1. After a Deployment is created, it will be displayed in the list as below. You can click <img src="/images/docs/project-user-guide/application-workloads/deployments/three-dots.png" width="20px" /> on the right and select options from the menu to modify your Deployment.
![deployments](/images/docs/project-user-guide/workloads/deployments_list.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/click-to-modify.png)
- **Edit**: View and edit the basic information.
- **Edit YAML**: View, upload, download, or update the YAML file.
@ -111,11 +111,11 @@ You can set a policy for node scheduling and add metadata in this section. When
2. Click the name of the Deployment and you can go to its detail page.
![deployments](/images/docs/project-user-guide/workloads/deployments_detail.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/deploy-details.png)
3. Click **More** to display what operations about this Deployment you can do.
3. Click **More** to display the operations about this Deployment you can do.
![deployments](/images/docs/project-user-guide/workloads/deployments_detail_operation_btn.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/click-more.png)
- **Revision Rollback**: Select the revision to roll back.
- **Horizontal Pod Autoscaling**: Autoscale the replicas according to CPU and memory usage. If both CPU and memory are specified, replicas are added or deleted if any of the conditions is met.
@ -126,12 +126,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 the Deployment.
![deployments](/images/docs/project-user-guide/workloads/deployments_detail_state.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/resource-status.png)
- **Replica Status**: Click the arrow in the image to increase or decrease the number of Pod replicas.
- **Replica Status**: Click <img src="/images/docs/project-user-guide/application-workloads/deployments/up-arrow.png" width="20px" /> or <img src="/images/docs/project-user-guide/application-workloads/deployments/down-arrow.png" width="20px" /> to increase or decrease the number of Pod replicas.
- **Pod detail**
![deployments](/images/docs/project-user-guide/workloads/deployments_detail_pod.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/pods.png)
- 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.
@ -146,30 +146,30 @@ After the resource template of workload is changed, a new log will be generated
Click the **Metadata** tab to view the labels and annotations of the Deployment.
![deployments](/images/docs/project-user-guide/workloads/deployments_metadata.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/meta-data.png)
### Monitoring
1. Click the **Monitoring** tab to view the CPU usage, memory usage, outbound traffic, and inbound traffic of the Deployment.
![deployments](/images/docs/project-user-guide/workloads/deployments_monitoring.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/monitoring.png)
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.
![deployments](/images/docs/project-user-guide/workloads/deployments_time_range.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/time-interval.png)
3. Click <img src="/images/docs/project-user-guide/workloads/deployments_autorefresh_start.png" width="20px" />/<img src="/images/docs/project-user-guide/workloads/deployments_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/deployments/deployments_autorefresh_start.png" width="20px" />/<img src="/images/docs/project-user-guide/application-workloads/deployments/deployments_autorefresh_stop.png" width="20px" /> in the upper-right corner to start/stop automatic data refreshing.
4. Click <img src="/images/docs/project-user-guide/workloads/deployments_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/deployments/deployments_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 Deployment.
![deployments](/images/docs/project-user-guide/workloads/deployments_env_variable.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/env-variables.png)
### Events
Click the **Events** tab to view the events of the Deployment.
![deployments](/images/docs/project-user-guide/workloads/deployments_events.png)
![deployments](/images/docs/project-user-guide/application-workloads/deployments/events.png)

View File

@ -31,7 +31,7 @@ weight: 10210
### 步骤 3设置镜像
1. 设置镜像前,请点击**容器组副本数量**中的**加号**或**减号**图标来定义 Pod 的副本数量,该参数显示在清单文件中的 `.spec.replicas` 字段。
1. 设置镜像前,请点击**容器组副本数量**中的 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/deployments/plus-icon.png" width="20px" /><img src="/images/docs/zh-cn/project-user-guide/application-workloads/deployments/minus-icon.png" width="20px" /> 来定义 Pod 的副本数量,该参数显示在清单文件中的 `.spec.replicas` 字段。
{{< notice tip >}}
您可以启用右上角的**编辑模式**,查看 YAML 格式的部署清单文件。KubeSphere 使您可以直接编辑清单文件创建部署,或者您可以按照下列步骤使用仪表板创建部署。
@ -100,7 +100,7 @@ weight: 10210
### 详情页面
1. 部署创建后会显示在下方的列表中。您可以点击右边的三个点,在弹出菜单中选择操作,修改您的部署。
1. 部署创建后会显示在下方的列表中。您可以点击右边的 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/deployments/three-dots.png" width="20px" />,在弹出菜单中选择操作,修改您的部署。
![部署列表](/images/docs/zh-cn/project-user-guide/application-workloads/deployments/deployment-listed.PNG)
@ -128,7 +128,7 @@ weight: 10210
![资源状态](/images/docs/zh-cn/project-user-guide/application-workloads/deployments/resource-status.PNG)
- **副本运行状态**:点击图像中的箭头增加或减少 Pod 副本数量。
- **副本运行状态**:点击 <img src="/images/docs/zh-cn/project-user-guide/application-workloads/deployments/up-arrow.png" width="20px" /><img src="/images/docs/zh-cn/project-user-guide/application-workloads/deployments/down-arrow.png" width="20px" />增加或减少 Pod 副本数量。
- **Pod 详情**
![Pod 详情](/images/docs/zh-cn/project-user-guide/application-workloads/deployments/pod-details.PNG)

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 612 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 526 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 147 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB