This document describes how to run your service through various workloads in an edge cluster.
A Deployment declares a template for a pod and a policy for controlling how the pod runs. It is used to deploy stateless applications. You can specify the number of replicas, scheduling policy, and update policy for a pod running in the Deployment as required.
A StatefulSet is primarily used to manage stateful applications. Pods created will come with a persistent identifier according to the specification. The identifier will not change even if the pod is migrated or restarted after termination.
When persistent storage is required, you can use the identifiers to map to the corresponding storage volumes. If the application does not require persistent identifiers, we recommend that you use Deployment to deploy the application.
A Job creates one or more pods and ensures that these pods run according to the specified rules until a specified number of them successfully terminate. Jobs can be used in many scenarios, such as batch computing and data analysis. You can specify the required number of completions, concurrency (the number of pods running at any instant), and the restart policy as required.
When a Job is completed, no more pods are created, but existing pods will be retained. You can view the logs of the completed pods in Logs. Deleting a Job cleans up the pods it created, and the logs of these pods will be invisible.
A CronJob object resembles one line of a crontab (cron table) file. It runs a Job periodically on a given schedule and uses the Cron format.
The cron format is as follows:
# File format description
# ——minute (0 - 59)
# | ——hour (0 - 23)
# | | ——day (1 - 31)
# | | | ——month (1 - 12)
# | | | | ——day of week (0 - 6)
# | | | | |
# * * * * *
Was this page helpful?