-
Notifications
You must be signed in to change notification settings - Fork 3
/
mlflow-deployment.yaml
64 lines (63 loc) · 1.45 KB
/
mlflow-deployment.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
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
namespace: mlflow
name: mlflow-server
spec:
replicas: 1
selector:
matchLabels:
app: mlflow-server
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
template:
metadata:
labels:
app: mlflow-server
spec:
containers:
- image: mlflow/server:latest
imagePullPolicy: IfNotPresent
name: mlflow-server
resources:
limits:
memory: "550Mi"
cpu: "500m"
args:
- --host=0.0.0.0
- --port=5001
- --backend-store-uri=mysql+pymysql://$(MYSQL_USER):$(MYSQL_PASSWORD)@mysql.mlflow.svc.cluster.local:3306/$(MYSQL_DATABASE)
- --default-artifact-root=s3://bucket-fex # put your bucket name in here
envFrom:
- secretRef:
name: mysql-secret
- secretRef:
name: aws-secret
ports:
# Opening Port 5001 for REST API
- name: http
containerPort: 5001
protocol: TCP
---
apiVersion: v1
# service type
kind: Service
metadata:
namespace: mlflow
# Service name
labels:
run: mlflow-service
name: mlflow-service
spec:
ports:
# port = Incoming Port, targetPort = Routed port
- port: 5001
targetPort: 5001
protocol: TCP
name: http
selector:
app: mlflow-server
clusterIP: None