forked from allenai/allennlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes-webdemo.yaml
66 lines (66 loc) · 1.72 KB
/
kubernetes-webdemo.yaml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: allennlp-webdemo
namespace: allennlp
labels:
contact: allennlp
spec:
replicas: 4
template:
metadata:
labels:
app: allennlp-webdemo
spec:
containers:
- name: allennlp-webdemo
image: "allennlp/webdemo:2017-11-13-2"
# See
# https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
# for documentation on the resources section.
env:
- name: DEMO_POSTGRES_HOST
valueFrom:
secretKeyRef:
name: allennlp-demo-postgres
key: host
- name: DEMO_POSTGRES_DBNAME
valueFrom:
secretKeyRef:
name: allennlp-demo-postgres
key: dbname
- name: DEMO_POSTGRES_USER
valueFrom:
secretKeyRef:
name: allennlp-demo-postgres
key: user
- name: DEMO_POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: allennlp-demo-postgres
key: password
resources:
limits:
cpu: 1000m
memory: 2000Mi
# "requests" specify how much your container will be granted as a baseline.
requests:
cpu: 1000m
memory: 2000Mi
command:
- /bin/bash
- -c
- "allennlp/run serve"
---
apiVersion: v1
kind: Service
metadata:
name: allennlp-webdemo
namespace: allennlp
spec:
type: LoadBalancer
selector:
app: allennlp-webdemo
ports:
- port: 80
targetPort: 8000