Job
Jobs are used to deploy jobs that are executed only once. The pods orchestrated by jobs handle the jobs according to user settings, and the pods are automatically exited after the jobs are completed. For more details about jobs, please see kubernets official documentation-Jobs
Entry: In the cloud management platform click the top left corner navigation menu, and click “Containers/Applications/Jobs” menu item in the left menu bar that pops up to enter the jobs page.
View Jobs
This function is used to filter jobs information based on clusters and namespaces.
-
In the jobs page, by default, you can view the jobs information of all namespaces under a cluster.
-
When there are multiple clusters in the environment, click the input box on the right side of the cluster at the top of the list and select other clusters to view the jobs information of all the namespaces under other clusters.
-
When there are multiple namespaces under the cluster, click the input box on the right side of the namespace above the list, select the namespace, and view the jobs information under the specified namespace.
Create Jobs
This function is used to create a jobs Job by mirroring.
-
On the Jobs page, click the “Create” button at the top of the list to enter the Create Jobs page.
-
Set the following parameters.
- Name: The name of the jobs.
- Cluster: Select the cluster to which the jobs belongs.
- Namespace: Select the namespace to which the jobs belongs. Namespaces are used to logically divide the cluster. deployment, pod, service, etc. all belong to a namespace. Kubernetes cluster will generate default, kube-system, and kube-public namespaces by default after the cluster is created.
- Image key: You need to set the key when accessing private repository, support new and select existing key.
- Restart policy: only support never, that is, will not restart the container.
- Advanced configuration: configure tags and notes according to requirements.
- Tag: Customize the tag of the set jobs.
- Remarks: Customize setting the remarks information of the jobs.
- Containers: You can set one or more different containers for a pod in deployment according to the requirements.
-
Name: customize the container name.
-
Container image: If you only enter the image name, the image on dockerhub will be used by default. If you need to use private repository image, you need to set the repository/image.
-
CPU/Memory: set the CPU and memory size occupied by the container.
-
Container commands, command parameters: set the container commands and parameters. The container naming corresponds to spec.containers.command, and the parameters correspond to spec.containers.args. e.g. command: [“perl”, “-Mbignum=bpi”, “-wle”, “print bpi(2000)"] in the yaml file, you need to enter the following information in form container command to enter the following information.
$ perl -Mbignum=bpi -wle print bpi(2000)
-
Data volume: Set the storage declaration and mount point for the container in Pod by key-value pair, you need to create the storage volume declaration in the namespace under the cluster in advance.
-
Environment variables: Configure environment variables for Pods in the form of key-value pairs. Used to add environment flags to Pods or pass configuration, etc.
-
Privileged mode: Privileged mode has the same privileges for processes inside the container as for processes outside the container.
-
-
Click the “Deploy” button to complete the operation.
View/Edit
This function is used to view or edit the jobs’s yaml file.
- On the jobs page, click the “More” button in the action bar on the right side of the jobs, and select the drop-down menu “View/Edit” menu item to bring up the View/Update dialog box.
- Support viewing and editing yaml file information of the jobs.
- After editing the yaml file, click the “OK” button to take effect.
Delete Jobs
This function is used to delete jobs, as well as container groups (pods) created by jobs.
Delete
- On the jobs page, click the “Delete” button in the action column on the right side of the jobs, and the action confirmation dialog box pops up.
- Click the “OK” button to delete the jobs and its related resources.
Batch Delete
- Select one or more jobs in the jobs list, and click the “Delete” button at the top of the list to bring up the action confirmation dialog.
- Click the “OK” button to delete the jobs and its related resources.
View Jobs Details
This function is used to view jobs-related information.
- On the jobs page, click the jobs name item to enter the jobs details page.
- View the following information: Cloud ID, ID, name, status, cluster, namespace, container group, image, initialized image, tag, created at, etc.
View container group
This function is used to view the container groups created by the jobs and supports managing container groups.
View/Edit
This function is used to view the yaml file of a container group.
- On the jobs page, click the jobs name item to enter the jobs details page.
- Click the Container Groups tab to enter the Container Groups page.
- Click the “View/Edit” button on the right column of the container group to bring up the View/Update dialog box.
- Support viewing and editing the yaml file information of the jobs.
- After editing the yaml file, click the “OK” button to take effect.
Delete
This function is used to delete a container group. After the container group is deleted, a new container group will be redeployed according to the yaml file settings.
- On the jobs page, click the jobs name item to enter the jobs details page.
- Click the “Container Group” tab to enter the container group page.
- Click the “Delete” button on the right action bar of the container group to bring up the action confirmation dialog box.
- Click the “OK” button to complete the operation.
View Events
This function is used to record the occurrence of resource object events, including the content, source, cause, and created at, for troubleshooting.
- On the Jobs page, click the Jobs Name item to enter the Jobs Details page.
- Click the Events tab to enter the Events page.
- View the content, source, reason, and created at of the event.
View source information
This function is used to view and edit the yaml information of a jobs.
- On the jobs page, click the jobs name item to enter the jobs details page.
- Click the “Source Information” tab to enter the source information page.
- Click the “Copy Content” button to copy the yaml file information of the node.
- After updating the yaml file, click the “Update” button.
View Operation Log
This function is used to view the operation log related to a jobs.
- On the jobs page, click the jobs name item to enter the jobs details page.
- Click the Operation Log tab to enter the Operation Log page.
- Load More Logs: In the Operation Log page, the list shows 20 operation logs by default. To view more operation logs, click the “Load More” button to get more logs.
- View Log Details: Click the “View” button on the right column of the operation log to view the log details. Copy details are supported.
- View logs of specified time period: If you want to view the operation logs of a certain time period, set the specific date in the start date and end date at the top right of the list to query the log information of the specified time period.
- Export logs: Currently, only the logs displayed on this page are supported to be exported. Click the upper-right corner of icon, set the export data column in the pop-up export data dialog, and click the “OK” button to export the logs.