Skip to content

Instantly share code, notes, and snippets.

@initcron
Created April 14, 2025 02:57
Show Gist options
  • Save initcron/53d53d3d5bf7584e4da69489fbf15209 to your computer and use it in GitHub Desktop.
Save initcron/53d53d3d5bf7584e4da69489fbf15209 to your computer and use it in GitHub Desktop.
Vote Deployment with RollingUpdate Strategy
apiVersion: apps/v1
kind: Deployment
metadata:
name: vote
labels:
role: vote
spec:
minReadySeconds: 20
replicas: 4
strategy:
type: RollingUpdate
rollingUpdate:
maxUnavailable: 1
maxSurge: 2
selector:
matchLabels:
app: python
role: vote
matchExpressions:
- key: version
operator: Exists
template:
metadata:
name: vote
labels:
app: python
role: vote
version: v1
spec:
containers:
- name: app
image: schoolofdevops/vote:v1
resources:
requests:
memory: "64Mi"
cpu: "50m"
limits:
memory: "128Mi"
cpu: "250m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment