"쿠버네티스 CronJob"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>))
28번째 줄: 28번째 줄:
             - date; echo Hello from the Kubernetes cluster
             - date; echo Hello from the Kubernetes cluster
           restartPolicy: OnFailure
           restartPolicy: OnFailure
</source>
</syntaxhighlight>


==같이 보기==
==같이 보기==

2020년 11월 2일 (월) 00:44 판

1 개요

쿠버네티스 CronJob
Kubernetes 크론잡
  • 정기 스케줄에 따라 작업이 수행되도록 관리하는 k8s 객체
  • 지정한 스케줄에 따라 정기적으로 수행되는 Job
  • 실행시각이 되면 Pod이 생성된다.
  • 크론잡 객체는 crontab 파일과 유사하게 Cron 형식에 따라 스케줄을 지정한다.
시간 설정 구문이 리눅스 cron job과 동일하다.
  • 직렬 또는 병렬로 지정하여 수행시킬 수 있다.

<source lang='yaml'> apiVersion: batch/v1beta1 kind: CronJob metadata:

 name: hello

spec:

 schedule: "*/1 * * * *"
 jobTemplate:
   spec:
     template:
       spec:
         containers:
         - name: hello
           image: busybox
           args:
           - /bin/sh
           - -c
           - date; echo Hello from the Kubernetes cluster
         restartPolicy: OnFailure

</syntaxhighlight>

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}