Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@matthewpalmer
Created February 12, 2019 02:36
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save matthewpalmer/3a63fc20ecbf5d82ffe5bf1a8ec968ac to your computer and use it in GitHub Desktop.
Save matthewpalmer/3a63fc20ecbf5d82ffe5bf1a8ec968ac to your computer and use it in GitHub Desktop.
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: nginx-deployment
spec:
# A deployment's specification really only
# has a few useful options
# 1. How many copies of each pod do we want?
replicas: 3
# 2. How do want to update the pods?
strategy: Recreate
# 3. Which pods are managed by this deployment?
selector:
# This must match the labels we set on the pod!
matchLabels:
deploy: example
# This template field is a regular pod configuration
# nested inside the deployment spec
template:
metadata:
# Set labels on the pod.
# This is used in the deployment selector.
labels:
deploy: example
spec:
containers:
- name: nginx
image: nginx:1.7.9
Copy link

ghost commented Feb 19, 2020

Very helpful file, although I had to change the strategy to work

strategy: type: Recreate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment