Created
May 10, 2024 05:11
-
-
Save initcron/b025760548dd079a24f2c88d1e60851c to your computer and use it in GitHub Desktop.
vote deployment with resources and strategy defined
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: | |
creationTimestamp: null | |
labels: | |
app: vote | |
name: vote | |
annotations: | |
kubernetes.io/change-cause: "updated image to v2" | |
spec: | |
replicas: 12 | |
minReadySeconds: 20 | |
selector: | |
matchLabels: | |
app: vote | |
strategy: | |
type: RollingUpdate | |
rollingUpdate: | |
maxSurge: 2 | |
maxUnavailable: 1 | |
template: | |
metadata: | |
creationTimestamp: null | |
labels: | |
app: vote | |
role: vote | |
spec: | |
containers: | |
- image: schoolofdevops/vote:v3 | |
name: vote | |
envFrom: | |
- configMapRef: | |
name: vote | |
optional: true | |
resources: | |
requests: | |
cpu: "50m" | |
memory: "64Mi" | |
limits: | |
cpu: "250m" | |
memory: "128Mi" | |
volumeMounts: | |
- name: config | |
mountPath: "/app/config" | |
readOnly: true | |
volumes: | |
- name: config | |
configMap: | |
name: vote | |
items: | |
- key: "development_config.py" | |
path: "development_config.py" | |
- key: "production_config.py" | |
path: "production_config.py" | |
optional: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment