Created
January 12, 2022 03:57
-
-
Save fawix/ac0c64b545956747395f543fe06f8c7a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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