-
Notifications
You must be signed in to change notification settings - Fork 0
/
httpbin_deployment.yml
39 lines (39 loc) · 1.32 KB
/
httpbin_deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# DEPLOYMENT DEFINITION
# ===
# This will represent a set of containers (a pod) working together
---
apiVersion: apps/v1 # note here, not the same version as the namespace.
kind: Deployment
metadata:
# object name, notice `-deployment`. Although so far is not used anywhere
name: httpbin-deployment
# notice here, we want to use the same "universe" defined in httpbin.yml
namespace: httpbin-ns
# We'll use this later for filtering resources
labels:
target: httpbin
# This is the actual definition of the deployment
spec:
# we want to have $replicas containers running
replicas: 2
# we want this for targeting which pods to scale it should match pods created
# with labels app=httpbin-app
selector:
matchLabels:
app: httpbin-app
# This is the template for creating the pod, which has only one container.
template:
metadata:
labels:
# Mind the -app, this needs to match with the selector above, and with
# the service (so we have access to this later).
app: httpbin-app
spec:
# Each replica will be consisting of the following containers.
containers:
- image: docker.io/kennethreitz/httpbin
imagePullPolicy: IfNotPresent
name: httpbin-pod-container
# expose the http service port of our image.
ports:
- containerPort: 80