Skip to content

Instantly share code, notes, and snippets.

@bharatmicrosystems
Created October 8, 2020 13:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bharatmicrosystems/33e44fa1683856aadbf61dd7b6c31cdb to your computer and use it in GitHub Desktop.
Save bharatmicrosystems/33e44fa1683856aadbf61dd7b6c31cdb to your computer and use it in GitHub Desktop.
cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: nginx
name: nginx-v2
spec:
replicas: 2
selector:
matchLabels:
app: nginx
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 20%
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: bharamicrosystems/nginx:v2
name: nginx
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment