新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: pi-job-random
|
||||
labels:
|
||||
kiamol: ch08
|
||||
spec:
|
||||
completions: 3
|
||||
parallelism: 3
|
||||
template:
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-dp
|
||||
image: kiamol/ch03-sleep
|
||||
command: ['sh', '-c', 'echo $RANDOM > /init/dp']
|
||||
volumeMounts:
|
||||
- name: init
|
||||
mountPath: /init
|
||||
containers:
|
||||
- name: pi
|
||||
image: kiamol/ch05-pi
|
||||
command: ['sh', '-c', 'dotnet Pi.Web.dll -m console -dp $(cat /init/dp)']
|
||||
volumeMounts:
|
||||
- name: init
|
||||
mountPath: /init
|
||||
readOnly: true
|
||||
restartPolicy: Never
|
||||
volumes:
|
||||
- name: init
|
||||
emptyDir: {}
|
||||
14
learn/learn-kubernetes-master/kiamol/ch08/pi/pi-job.yaml
Normal file
14
learn/learn-kubernetes-master/kiamol/ch08/pi/pi-job.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: pi-job
|
||||
labels:
|
||||
kiamol: ch08
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: pi
|
||||
image: kiamol/ch05-pi
|
||||
command: ["dotnet", "Pi.Web.dll", "-m", "console", "-dp", "50"]
|
||||
restartPolicy: Never
|
||||
Reference in New Issue
Block a user