Skip to content

Instantly share code, notes, and snippets.

@fawix
Created January 12, 2022 03:57
Show Gist options
  • Save fawix/ac0c64b545956747395f543fe06f8c7a to your computer and use it in GitHub Desktop.
Save fawix/ac0c64b545956747395f543fe06f8c7a to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
# this value goes away - we don't need to explicitly set the number of replicas anymore!
# replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:stable-alpine
ports:
- containerPort: 80
resources:
# You need to specify the metric the HPA object will reference
limits:
cpu: 200m
memory: 500Mi
requests:
cpu: 100m
memory: 200Mi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment