Skip to content

Instantly share code, notes, and snippets.

@stevenfeltner
Created November 18, 2020 19:23
Show Gist options
  • Save stevenfeltner/9e11f49cca9385baebe10e3fe7fbc17b to your computer and use it in GitHub Desktop.
Save stevenfeltner/9e11f49cca9385baebe10e3fe7fbc17b to your computer and use it in GitHub Desktop.
eks-workshop-medium-on-demand-deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: eks-workshop-medium-od
labels:
app: nginx
namespace: default
spec:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
lifecycle:
preStop:
exec:
# SIGTERM triggers a quick exit; gracefully terminate instead
command: ["/usr/sbin/nginx","-s","quit"]
resources:
requests:
memory: "2000Mi"
cpu: "800m"
nodeSelector:
spotinst.io/node-lifecycle: "od"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment