-
Notifications
You must be signed in to change notification settings - Fork 4
/
k8s.yaml
55 lines (52 loc) · 1.23 KB
/
k8s.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
# This file deploys Gurobi Modeling Examples
#
# 1- Create the license file as a secret (optional)
# kubectl create secret generic gurobi-lic --from-file="gurobi.lic=$PWD/gurobi.lic"
#
# 2- Deploy the Modeling Examples
# kubectl apply -f k8s.yaml
#
# 3- A Jupiter Notebook instance will start, and you can open a browser at:
# http://localhost:8888
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: gurobi-modeling-examples
name: gurobi-modeling-examples
spec:
replicas: 1
selector:
matchLabels:
app: gurobi-modeling-examples
template:
metadata:
labels:
app: gurobi-modeling-examples
spec:
volumes:
- name: gurobi-lic
secret:
secretName: gurobi-lic
optional: true
containers:
- name: gurobi-modeling-examples
image: gurobi/modeling-examples:11.0.3
ports:
- containerPort: 8888
volumeMounts:
- name: gurobi-lic
mountPath: "/opt/gurobi"
readOnly: true
---
apiVersion: v1
kind: Service
metadata:
name: gurobi-modeling-examples
spec:
type: LoadBalancer
selector:
app: gurobi-modeling-examples
ports:
- port: 8888
targetPort: 8888