쿠버네티스 워크로드 잡 테스트
로컬에서 테스트 하기 위해 마니쿠베를 인스톨 한다.
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 
 | apiVersion: batch/v1
 kind: Job
 metadata:
 name: pi
 spec:
 template:
 spec:
 containers:
 - name: pi
 image: perl:5.34.0
 command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
 restartPolicy: Never
 backoffLimit: 4
 
 
 | 
| 1
 | kubectl apply -f https://kubernetes.io/examples/controllers/job.yaml
 | 
위 처럼 간단하게 테스트 해볼수 있다.
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 
 | apiVersion: batch/v1
 kind: Job
 metadata:
 name: pi-with-ttl
 spec:
 ttlSecondsAfterFinished: 100
 template:
 spec:
 containers:
 - name: pi
 image: perl:5.34.0
 command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
 restartPolicy: Never
 
 
 
 | 
참조