Skip to content

Instantly share code, notes, and snippets.

@shivamgupta-sg
Last active September 25, 2021 14:54
Show Gist options
  • Select an option

  • Save shivamgupta-sg/744fbd80982a8346cc60b3514aff2a4b to your computer and use it in GitHub Desktop.

Select an option

Save shivamgupta-sg/744fbd80982a8346cc60b3514aff2a4b to your computer and use it in GitHub Desktop.
nginx deployment using the rolling update deployment strategy with maxSurge of 50% and maxUnavailable of 25%
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment-rolling-update
namespace: nginx-app
labels:
app: nginx-rolling-update
spec:
selector:
matchLabels:
app: nginx-rolling-update
replicas: 10
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
template:
metadata:
name: nginx
labels:
app: nginx-rolling-update
spec:
containers:
- name: nginx
image: nginx:1.16-perl
ports:
- containerPort: 8080
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment