百度智能云

All Product Document

          Cloud Container Engine

          Job Management

          Users can create normal tasks through forms based on image, or create and modify normal tasks through the YAML file template provided by Baidu AI Cloud, and conduct control and management to the container group (Pod) and events associated with normal tasks.

          About Job

          Job is responsible for batch processing of short one-time tasks, i.e. tasks that are executed only once, which ensures the successful completion of one or more pods of batch tasks. Kubernetes supports the following Jobs:

          • Non-parallel job: Usually a Pod is created until it ends successfully.
          • Jobs with fixed end times: Set spec.completions and create multiple pods, and end operation until spec.completions succeed.
          • Parallel Job: Set spec.Parallelism but not spec.completions to create spec.Parallelism pods. When all pods end and at least one succeeds, the Job is considered successful.

          Typical Use Scenarios

          According to the settings of spec.Parallelism and spec.completions, jobs can be divided into the following modes:

          Job type Use case Behavior completions Parallelism
          One-time job Database migration Create a Pod until it succeeds 1 1
          Jobs with fixed end times Pod processing work queues Create one Pod at a time and run until the completion is successful 2+ 1
          Parallel jobs with fixed end times Multiple pods processing work queues at the same time Create multiple pods in turn and run until the completion is successful 2+ 2+
          Parallel Job Multiple pods processing work queues at the same time Create one or more Pods until one succeeds 1 2+

          View General Task List

          Enter "Product Services > Cloud Container Engine (CCE)", click "Working Load > General Task" in the left navigation bar to enter the general task page. The contents include:

          • List data: Display the list information of all common tasks, and create, delete, modify.

          New Common Task

          Click "New Norma Task", users can choose to create a new timed task through forms or Yaml.

          (1)Create through forms:

          • Fill in the name of the normal task and name space;
          • Click the Add Container Configuration button, fill in the container name and image address, and click OK, the creation page displays the added container configuration information;
          • Click Create to confirm the Yaml file generated based on the configuration information and complete the creation.

          (2) Create through Yaml file:

          • Select cluster and name space, fill in yaml file, and click OK.
          • Copy: Copy the contents of the current yaml file.
          • Cancel: Return to list page.

          Field Interpretation

          • completions: Indicate the number of pods that need to run successfully when Job ends. The default is 1.
          • parallelism: Indicate the number of pods running in parallel. The default is 1.
          • backoffLimit: Indicate the number of retries when Job fails. 6 by default.

          View General Task Details

          Click the common task name in any line of the list page to enter the common task details page, which includes:

          • General task details: Including basic information, associated container group, associated service and event list.

          Modify Common Tasks

          On the common task list page, click "Modify" in the common task line to modify, and then click "Confirm" to submit after the modification.

          Delete Normal Task

          On the common tasks list page, check the common tasks to delete, click "Delete", confirm the information, and then click "OK".

          Note: Currently, only single deletion is supported.

          Previous
          Statefulset Management
          Next
          CronJob Management