Managing workloads
A workload is an application that operates in a Kubernetes environment. In the management console, you can manage workloads in Kubernetes without using kubectl.
Creating a workload
You can create workloads in the management console in the same way as when using the kubectl apply -f <manifest_file.yaml> -n <namespace_name> command.
To create a workload:
- In the management console
, navigate to the folder dashboard and select Managed Service for Kubernetes. - Click the cluster name and select
Workload in the left-hand panel. - In the top-right corner, click Create and select the workload type.
- In the drop-down list, select the Namespace to create the workload in.
- Fill out the manifest file according to the Kubernetes guides: pod
, Deployment controller , DaemonSet controller , StatefulSet controller , HPA , job , and cron job . - Click Create.
Editing a workload
In the management console, you can edit workload manifests in a visual editor. This approach is equivalent to running the kubectl apply -f <manifest_file.yaml> command and allows you to update the resource configuration without re-creating it.
The list of editable fields depends on the workload type and is available in this Kubernetes guide
To edit a workload:
- In the management console
, navigate to the folder dashboard and select Managed Service for Kubernetes. - Click the cluster name and select
Workload in the left-hand panel. - Select the tab containing the type of the workload you want to edit.
- In the workload row, click
and select Edit. - Edit the manifest file on the right side of the screen. Your changes will be highlighted with color.
- In the top-right corner, click Save.
If the manifest is correct, the changes will be applied. If the updated manifest contains an error or edits uneditable fields, an error message will appear.
Running or stopping a cron job
You can run and stop cron jobs in the management console in the same way when as using the kubectl patch cronjob > <cron_job_name> -p '{"spec":{"suspend":<true_or_false>}}' command.
- In the management console
, navigate to the folder dashboard and select Managed Service for Kubernetes. - Click the cluster name and select
Workload in the left-hand panel. - Select the Cron jobs tab.
- In the cron job row, click
and select Start or Stop. - Confirm the action.
Deleting a workload
Deleting a workload is equivalent to running the kubectl delete -f <manifest_file.yaml> command. When you delete a controller, all the pods it has created will also be deleted.
To delete a workload:
- In the management console
, navigate to the folder dashboard and select Managed Service for Kubernetes. - Click the cluster name and select
Workload in the left-hand panel. - Select the tab containing the type of the workload you want to delete.
- In the workload row, click
and select Delete. - Confirm the action.