KubeCon EU 2016: Getting the Jobs Done With Kubernetes
-
Upload
kubeacademy -
Category
Technology
-
view
498 -
download
2
Transcript of KubeCon EU 2016: Getting the Jobs Done With Kubernetes
![Page 1: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/1.jpg)
Getting the Jobs Done With
Kubernetes / OpenShift
Maciej Szulik, KubeCon 2016
1 / 20
![Page 2: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/2.jpg)
soltysh @
https://github.com/soltysh/talks/
2 / 20
![Page 3: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/3.jpg)
3 / 20
![Page 4: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/4.jpg)
Job
4 / 20
![Page 5: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/5.jpg)
Job apiVersion: batch/v1kind: Jobmetadata: name: hellospec: template: metadata: name: hello spec: containers: - name: hello image: python:3.5.1 command: ["python", "-c", "print('Hello world!')"] restartPolicy: Never
5 / 20
![Page 6: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/6.jpg)
Job
- api
-> apiVersion: batch/v1
kind: Jobmetadata: name: jobspec: template: metadata: name: job spec: containers: - name: job image: python:3.5.1 command: ["python", "-c", "print('Hello world!')"] restartPolicy: Never
6 / 20
![Page 7: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/7.jpg)
Job
- api
- command
apiVersion: batch/v1kind: Jobmetadata: name: jobspec: template: metadata: name: job spec: containers:
-> - name: job image: python:3.5.1 command: ["python", "-c", "print('Hello world!')"]
restartPolicy: Never
7 / 20
![Page 8: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/8.jpg)
Job
- api
- command
- restart policy
apiVersion: batch/v1kind: Jobmetadata: name: jobspec: template: metadata: name: job spec: containers: - name: job image: python:3.5.1 command: ["python", "-c", "print('Hello world!')"]
-> restartPolicy: Never
8 / 20
![Page 9: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/9.jpg)
Job
- api
- command
- restart policy
Always
OnFailure
Never
9 / 20
![Page 10: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/10.jpg)
Job
- api
- command
- restart policy
Always
OnFailure
Never
10 / 20
![Page 11: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/11.jpg)
Job
- api
- command
- restart policy
- pod selector?
apiVersion: batch/v1kind: Jobmetadata: name: jobspec: template: metadata: name: job spec: containers: - name: job image: python:3.5.1 command: ["python", "-c", "print('Hello world!')"] restartPolicy: Never
11 / 20
![Page 12: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/12.jpg)
Job
- api
- command
- restart policy
- pod selector?
- parallelism /completions
single jobs.spec.completions: 1.spec.parallelism: 1
12 / 20
![Page 13: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/13.jpg)
Job
- api
- command
- restart policy
- pod selector?
- parallelism /completions
single jobs.spec.completions: 1.spec.parallelism: 1
parallel job with a fixed completions count.spec.completions: 8.spec.parallelism: 4
13 / 20
![Page 14: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/14.jpg)
Job
- api
- command
- restart policy
- pod selector?
- parallelism /completions
single jobs.spec.completions: 1.spec.parallelism: 1
parallel job with a fixed completions count.spec.completions: 8.spec.parallelism: 4
parallel job with a work queue.spec.completions: <unset>
.spec.parallelism: 4
14 / 20
![Page 15: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/15.jpg)
Use Cases- data calculations
- image rendering
etc.
15 / 20
![Page 16: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/16.jpg)
Rendering
16 / 20
![Page 17: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/17.jpg)
Render demo
17 / 20
![Page 18: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/18.jpg)
Future workflow by @sdminonne
indexed jobs by @erictune
scheduled jobs by @soltysh
18 / 20
![Page 20: KubeCon EU 2016: Getting the Jobs Done With Kubernetes](https://reader035.fdocuments.in/reader035/viewer/2022081900/587d54451a28abee158b5419/html5/thumbnails/20.jpg)
Links
soltysh @
http://releases.k8s.io/master/docs/proposals/job.md
http://releases.k8s.io/master/docs/user-guide/jobs.md
20 / 20