Skip to content

Instantly share code, notes, and snippets.

@tdshipley
Created June 5, 2019 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tdshipley/9d801e3d6f92b4510e9af7eaa1472420 to your computer and use it in GitHub Desktop.
Save tdshipley/9d801e3d6f92b4510e9af7eaa1472420 to your computer and use it in GitHub Desktop.
k8s_job_example
apiVersion: batch/v1
kind: Job
metadata:
labels:
job-name: run-perf-test-latest-${VERSION}
name: run-perf-test-latest-${VERSION}
namespace: my-gcp-namespace
spec:
backoffLimit: 1
completions: 1
parallelism: 1
selector:
matchLabels:
job-name: run-perf-test-latest-${VERSION}
template:
metadata:
creationTimestamp: null
labels:
job-name: run-perf-test-latest-${VERSION}
spec:
containers:
- image: eu.gcr.io/my-images/my-perf-tests-image:latest
imagePullPolicy: Always
name: run-perf-tests-latest-${VERSION}
resources:
requests:
cpu: "3"
memory: "6Gi"
securityContext:
runAsUser: 1000
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
restartPolicy: Never
terminationGracePeriodSeconds: 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment