본문 바로가기
kubenetes

mlflow helm 설치

by kyeongseo.oh 2024. 8. 29.

주의 사항

yaml 파일을 보면 대부분의 service type이 LoadBalancer로 되어 있음.
on-prem 환경에서 설치 시 metallb가 설치되어 있지 않다면 LoadBalancer를 사용할 수 없으니, NodePort로 service type을 변경해야한다.

username / password를 재설정하는 경우에는 pvc를 모두 삭제 후에 재설치 해야한다.
pvc에 데이터가 남아있으면 변경되지 않는다.

 

1. mlflow의 values.yaml 다운로드

helm show values oci://registry-1.docker.io/bitnamicharts/mlflow > mlflow-values.yaml

 

 

2. values.yaml 수정

2-1. 관리자 인증을 비활성화한다.

  auth:
    enabled: false
    username: user
    password: ""
    existingSecret: ""
    existingSecretUserKey: ""
    existingSecretPasswordKey: ""
    extraOverrides: {}
    overridesConfigMap: ""

 

2-2. ingress 설정

  ingress:
    ## @param tracking.ingress.enabled Enable ingress record generation for mlflow
    ##
    enabled: true
    ## @param tracking.ingress.pathType Ingress path type
    ##
    pathType: Prefix
    ## @param tracking.ingress.hostname Default host for the ingress record
    ##
    hostname: mlflow.dd.io
    ## @param tracking.ingress.ingressClassName IngressClass that will be be used to implement the Ingress (Kubernetes 1.18+)
    ## This is supported in Kubernetes 1.18+ and required if you have more than one IngressClass marked as the default for your cluster .
    ## ref: https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/
    ##
    ingressClassName: "nginx"
    ## @param tracking.ingress.path Default path for the ingress record
    ## NOTE: You may need to set this to '/*' in order to use this with ALB ingress controllers
    ##
    path: /

 

2-3. mlflow가 pv를 사용하도록 설정

  persistence:
    ## @param tracking.persistence.enabled Enable persistence using Persistent Volume Claims
    ##
    enabled: true
    ## @param tracking.persistence.mountPath Path to mount the volume at.
    ##
    mountPath: /bitnami/mlflow
    ## @param tracking.persistence.subPath The subdirectory of the volume to mount to, useful in dev environments and one PV for multiple services
    ##
    subPath: ""
    ## @param tracking.persistence.storageClass Storage class of backing PVC
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is
    ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
    ##   GKE, AWS & OpenStack)
    ##
    storageClass: "nfs-client"
    ## @param tracking.persistence.labels Persistent Volume labels
    ##
    labels: {}
    ## @param tracking.persistence.annotations Persistent Volume Claim annotations
    ##
    annotations: {}
    ## @param tracking.persistence.accessModes Persistent Volume Access Modes
    ##
    accessModes:
      - ReadWriteOnce
    ## @param tracking.persistence.size Size of data volume
    ##
    size: 8Gi

 

2-4. mlflow 실행 파라미터 등을 pv에 저장하도록 설정

  persistence:
    ## @param run.persistence.enabled Use a PVC to persist data
    ##
    enabled: true
    ## @param run.persistence.storageClass discourse & sidekiq data Persistent Volume Storage Class
    ## If defined, storageClassName: <storageClass>
    ## If set to "-", storageClassName: "", which disables dynamic provisioning
    ## If undefined (the default) or set to null, no storageClassName spec is
    ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
    ##   GKE, AWS & OpenStack)
    ##
    storageClass: "nfs-client"

 

2-5. postgresql 설정

postgresql:
  enabled: true
  auth:
    username: mlflow
    password: "mlflow"
    database: mlflow
    existingSecret: ""

 

2-6. minio 설정

minio:
  ## @param minio.enabled Enable/disable MinIO&reg; chart installation
  ## to be used as an objstore for Mlflow
  ##
  enabled: true
  ## MinIO&reg; authentication parameters
  ##
  auth:
    ## @param minio.auth.rootUser MinIO&reg; root username
    ##
    rootUser: admin
    ## @param minio.auth.rootPassword Password for MinIO&reg; root user
    ##
    rootPassword: "Changeme$9"
    ## @param minio.auth.existingSecret Name of an existing secret containing the MinIO&reg; credentials
    ##
    existingSecret: ""
  ## @param minio.defaultBuckets Comma, semi-colon or space separated list of MinIO&reg; buckets to create
  ##
  defaultBuckets: "mlflow"
  ## @param minio.provisioning.enabled Enable/disable MinIO&reg; provisioning job
  ## @param minio.provisioning.extraCommands Extra commands to run on MinIO&reg; provisioning job
  ##
  provisioning:
    enabled: true
    # We need to allow downloads in order for the UI to work
    extraCommands: ["mc anonymous set download provisioning/mlflow"]
  ## @param minio.tls.enabled Enable/disable MinIO&reg; TLS support
  ##
  tls:
    enabled: false
  ## @param minio.service.type MinIO&reg; service type
  ## @param minio.service.loadBalancerIP MinIO&reg; service LoadBalancer IP
  ## @param minio.service.ports.api MinIO&reg; service port
  ##
  service:
    type: LoadBalancer
    loadBalancerIP: ""
    ports:
      api: 80

 

3. mlflow 설치

helm install mlflow oci://registry-1.docker.io/bitnamicharts/mlflow --namespace mlflow --create-namespace -f mlflow-values.yaml

'kubenetes' 카테고리의 다른 글

tekton 설치  (0) 2024.08.29
argocd 설치  (0) 2024.08.29
airflow helm 설치  (0) 2024.08.29
kubeflow 1.9.0 설치하기  (0) 2024.08.26
coredns에 host 등록하기  (0) 2023.12.21

댓글