-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathfrontend.deployment.yml
35 lines (35 loc) · 1.14 KB
/
frontend.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
apiVersion: apps/v1
# The "kind" is used to determine what this file is describing.
kind: Deployment
metadata:
# NOTE: https://kubernetes.io/docs/concepts/services-networking/dns-pod-service/#what-things-get-dns-names
name: frontend
spec:
selector:
matchLabels:
app: frontend
# This is a number of replicas of pods for this deployment.
# Note: This defaults to 1; I am leaving it here just as an example.
replicas: 1
template:
metadata:
labels:
# This label will be selected by the frontend service
# and thus route requests to the container specified here.
app: frontend
spec:
containers:
- name: frontend # Used for generating the DNS name.
image: localhost:5000/frontend
resources:
# Setting just the limits also set the requests to the same values.
limits:
memory: "128Mi"
cpu: "500m"
env:
- name: PORT
value: "80"
- name: DATE_API
value: dateapplication # Service name of the date application
ports:
- containerPort: 80 # A port binding to the container.