forked from allenai/allennlp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kubernetes-webdemo.yaml
45 lines (45 loc) · 1.06 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
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-09-12-2"
# See
# https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/
# for documentation on the resources section.
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
- "source activate allennlp && 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