Last active
September 25, 2021 14:54
-
-
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%
This file contains hidden or 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-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