-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
job-team-b.yaml
48 lines (47 loc) · 1.71 KB
/
job-team-b.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# [START gke_batch_kueue_intro_team_b_job]
apiVersion: batch/v1
kind: Job
metadata:
namespace: team-b # Job under team-b namespace
generateName: sample-job-team-b-
annotations:
kueue.x-k8s.io/queue-name: lq-team-b # Point to the LocalQueue
spec:
ttlSecondsAfterFinished: 60 # Job will be deleted after 60 seconds
parallelism: 3 # This Job will have 3 replicas running at the same time
completions: 3 # This Job requires 3 completions
suspend: true # Set to true to allow Kueue to control the Job when it starts
template:
spec:
nodeSelector:
cloud.google.com/gke-accelerator: "nvidia-tesla-t4" # Specify the GPU hardware
containers:
- name: dummy-job
image: gcr.io/k8s-staging-perf-tests/sleep:latest
args: ["10s"] # Sleep for 10 seconds
resources:
requests:
cpu: "500m"
memory: "512Mi"
ephemeral-storage: "512Mi"
nvidia.com/gpu: "1"
limits:
cpu: "500m"
memory: "512Mi"
ephemeral-storage: "512Mi"
nvidia.com/gpu: "1"
restartPolicy: Never
# [END gke_batch_kueue_intro_team_b_job]