Updated on 2024-06-17 GMT+08:00

Managing a Workload

Scenarios

After a workload is created, you can view its details, upgrade it, edit YAML, redeploy it, reschedule it, and delete it.
Table 1 Workload management

Operation

Description

Viewing Workload Details

You can view the basic information, events, and status of pods and workloads, and modify workload settings.

Editing a YAML File

You can modify and download the YAML file of a workload online. YAML files of common jobs can only be viewed, copied, and downloaded.

Upgrading a Workload

You can quickly upgrade a workload by replacing its image or image version without interrupting services.

Redeploying a Workload

You can redeploy a workload. After the workload is redeployed, all pods in the workload will be restarted. Only Deployments can be redeployed.

Rescheduling a Workload

You can reschedule a workload. After being rescheduled, workloads are scheduled based on existing scheduling policies. Only Deployments can be redeployed.

Deleting a Workload

If a workload is no longer used, you can delete it. Deleted workloads or tasks cannot be restored.

Viewing Workload Details

Click the name of a created workload to go to its details page. On this page, you can view the basic information, events, and status of pods and workloads, and modify workload settings.

Figure 1 Workload details page

Editing a YAML File

You can modify and download the YAML files of Deployments, StatefulSets, DaemonSets, CronJobs, and pods. YAML files of jobs can only be viewed, copied, and downloaded. This section uses a Deployment as an example to describe how to edit the YAML file.

  1. Log in to the UCS console, access an existing fleet, and choose Workloads in the navigation pane.
  2. Click the Deployments tab, locate your Deployment, and click Edit YAML in the Operation column. In the dialog box displayed, modify the YAML file.
  3. Click OK.
  4. (Optional) In the Edit YAML window, click Download to download the YAML file.

Upgrading a Workload

You can quickly upgrade a workload on the UCS console. This section uses a Deployment as an example to describe how to upgrade a workload.

  1. Log in to the UCS console, access an existing fleet, and choose Workloads in the navigation pane.
  2. Click the Deployments tab, locate your workload, and click Upgrade in the Operation column.
  3. Upgrade the workload based on service requirements. The method for setting parameters is the same as that for creating a workload.
  4. After the update is complete, click Upgrade Workload, manually confirm the YAML file, and submit the upgrade.

Redeploying a Workload (Available Only for Deployments)

After you redeploy a workload, all pods in the workload will be restarted. This section uses a Deployment as an example to describe how to redeploy a workload.

  1. Log in to the UCS console, access an existing fleet, and choose Workloads in the navigation pane.
  2. Click the Deployments tab, locate your workload, and choose More > Redeploy in the Operation column.
  3. In the displayed dialog box, click Yes.

Rescheduling a Workload (Available Only for Deployments)

A workload can be rescheduled to a cluster based on the scheduling policy. This section uses a Deployment as an example to describe how to reschedule a workload.

  1. Log in to the UCS console, access an existing fleet, and choose Workloads in the navigation pane.
  2. Click the Deployments tab, locate your workload, and choose More > Reschedule in the Operation column.
  3. In the displayed dialog box, click Yes.

A workload can be rescheduled based on the original scheduling policy after a faulty cluster is recovered.

Deleting a Workload

You can delete a workload or job that is no longer needed. Deleted workloads or jobs cannot be recovered. This section uses a Deployment as an example to describe how to delete a workload.

  1. Log in to the UCS console, access an existing fleet, and choose Workloads in the navigation pane.
  2. Click the Deployments tab, locate your workload, and choose More > Delete in the Operation column.
  3. In the displayed dialog box, click Yes.