美文网首页小资料工程师乐园
Kubernetes:cronjob部署yaml档

Kubernetes:cronjob部署yaml档

作者: luffynoonepiece | 来源:发表于2020-07-19 08:34 被阅读0次

    For example:

    apiVersion: batch/v1beta1
    kind: CronJob
    metadata:
      name: py3-xxx-plant
      labels:
        name: py3-xxx-plant
        role: job
    spec:
      schedule: "0 * * * *"
      concurrencyPolicy: "Forbid"
      suspend: false
      successfulJobsHistoryLimit: 5
      failedJobsHistoryLimit: 3
      jobTemplate:
        metadata:
          name: py3-xxx-plant
          labels:
            basename: py3-xxx-plant
            role: job
        spec:
          template:
            metadata:
              name: py3-xxx-plant
              labels:
                basename: py3-xxx-plant
                role: job
            spec:
              containers:
              - name: py3-xxx-plant
                image: harbor.wzs.wistron.com.cn/xxxx/xxx/xxxxxx:latest
                imagePullPolicy: Always
                resources:
                  limits:
                    cpu: 1000m
                    memory: 512Mi
                tty: true
              restartPolicy: Never
    

    相关文章

      网友评论

        本文标题:Kubernetes:cronjob部署yaml档

        本文链接:https://www.haomeiwen.com/subject/wyxekktx.html