최신 버전 MLflow v3.16.1 — 2026-09-20 확인. https://github.com/mlflow/mlflow/releases/latest . 아래 이미지(
pdemeulenaer/mlflow-server:537)와 PostgreSQL 11 은 사설 레지스트리 기준의 옛 조합이다. 공식 이미지는ghcr.io/mlflow/mlflow다.
Kubernetes 환경에서 MLflow 설치를 위한 매뉴얼이다.
vi mlflow-component.yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: mlflow-postgres-config
namespace: mlflow
labels:
app: mlflow-postgres
data:
POSTGRES_DB: mlflow_db
POSTGRES_USER: mlflow_user
POSTGRES_PASSWORD: ${REDACTED}
PGDATA: /var/lib/postgresql/mlflow/data
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mlflow-postgres
namespace: mlflow
labels:
app: mlflow-postgres
spec:
selector:
matchLabels:
app: mlflow-postgres
serviceName: "mlflow-postgres-service"
replicas: 1
template:
metadata:
labels:
app: mlflow-postgres
spec:
containers:
- name: mlflow-postgres
image: encore.sec/library/postgres:11
ports:
- containerPort: 5432
protocol: TCP
envFrom:
- configMapRef:
name: mlflow-postgres-config
resources:
requests:
memory: "1Gi"
cpu: "500m"
volumeMounts:
- name: mlflow-pvc
mountPath: /var/lib/postgresql/mlflow
volumeClaimTemplates:
- metadata:
name: mlflow-pvc
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 100Mi
---
apiVersion: v1
kind: Service
metadata:
name: mlflow-postgres-service
namespace: mlflow
labels:
svc: mlflow-postgres-service
spec:
type: NodePort
ports:
- port: 5432
targetPort: 5432
protocol: TCP
selector:
app: mlflow-postgres
kubectl apply -f mlflow-component.yaml
vi mlflow.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: mlflow-deployment
namespace: mlflow
spec:
selector:
matchLabels:
app: mlflow-deployment
template:
metadata:
labels:
app: mlflow-deployment
spec:
containers:
- name: mlflow-deployment
image: encore.sec/library/pdemeulenaer/mlflow-server:537
imagePullPolicy: IfNotPresent #Always
args:
- --host=0.0.0.0
- --port=5000
- --backend-store-uri=postgresql://mlflow_user:mlflow_pwd@mlflow-postgres-service:5432/mlflow_db
- --default-artifact-root=s3://gtc/mlflow/
- --workers=2
env:
- name: MLFLOW_S3_ENDPOINT_URL
value: http://10.40.74.170:30071/
- name: AWS_ACCESS_KEY_ID
value: "access-key"
- name: AWS_SECRET_ACCESS_KEY
value: "secret-key"
ports:
- name: http
containerPort: 5000
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: mlflow-service
namespace: mlflow
spec:
type: NodePort
ports:
- port: 5000
targetPort: 5000
protocol: TCP
name: http
nodePort: 30050
selector:
app: mlflow-deployment
kubectl apply -f mlflow.yaml