Skip to content

Instantly share code, notes, and snippets.

@shivamgupta-sg
Created September 5, 2021 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shivamgupta-sg/8d55fb131de6b0ee1478da22a7e69807 to your computer and use it in GitHub Desktop.
Save shivamgupta-sg/8d55fb131de6b0ee1478da22a7e69807 to your computer and use it in GitHub Desktop.
nginx deployment using the recreate deployment strategy
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment-recreate
namespace: nginx-app
labels:
app: nginx-recreate
annotations:
description: "nginx deployment with recrete strategy"
spec:
selector:
matchLabels:
app: nginx-recreate
replicas: 4
strategy:
type: Recreate
template:
metadata:
name: nginx
labels:
app: nginx-recreate
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