export POOL_NAME='preempt-1'
export CLUSTER_NAME='cluster-1'
gcloud beta container node-pools create ${POOL_NAME} --preemptible \
	   --cluster ${CLUSTER_NAME} --enable-autoscaling \
	   --min-nodes=0 --max-nodes=50 \
	   --machine-type=n1-standard-2                                    
apiVersion: v1
kind: Job
spec:
  nodeSelector:
    cloud.google.com/gke-preemptible: "true"
  template:
    spec:
      containers:
      - name: pyversion
        image: python:3.7
        command: ["python",  "--version"]
      restartPolicy: Never
  backoffLimit: 4
Avatar
Sean Davis
Senior Associate Scientist

My interests include biomedical data science, open data, genomics, and cancer research.

Related

comments powered by Disqus