Configuring External MinIO

This article describes how to configure external MinIO for Kubeflow. You can perform this action before or after deploying Kubeflow on your Kubernetes cluster.

Before Deploying Kubeflow

To configure external MinIO before deploying Kubeflow on your Kubernetes cluster:
  1. Connect through ssh to the Kubernetes master node.
  2. Make sure the kubeflow-minio namespace exists. If it does not exist, create it now by executing the following in the shell:
    if ! kubectl get ns kubeflow-minio > /dev/null 2> /dev/null; then
     kubectl create ns kubeflow-minio
    fi
  3. Create a secret with the external MinIO config:
    • If minio is deployed in the kubeflow namespace, execute the following command:
      kubectl -n kubeflow-minio create secret generic  kubeflow-external-minio --from-literal='host=<minio service address>' --from-literal='port=<minio service port>' --from-literal='insecure=<true/false>' --from-literal='accesskey=<minio access key>' --from-literal='secretkey=<minio secret key>' -n kubeflow-minio
      For example:
      kubectl -n kubeflow-minio create secret generic  kubeflow-external-minio --from-literal='host=minio-service.minio.svc.cluster.local' --from-literal='port=9000' --from-literal='secure=false' --from-literal='accesskey=minio' --from-literal='secretkey=minio123'
    • If minio is not deployed in the kubeflow namespace, you must provide an additional option namespace to kubeflow-external-minio-secret. The default value is set to kubeflow.
      Execute the following command:
      kubectl create secret generic kubeflow-external-minio --from-literal='namespace=<minio namespace>' --from-literal='host=<minio service address>' --from-literal='port=<minio service port>' --from-literal='secure=<true/false>' --from-literal='accesskey=<minio access key>' --from-literal='secretkey=<minio secret key>' -n kubeflow-minio
  4. Transfer the artifacts from the Kubeflow MinIO to your external S3 storage. Find the necessary instructions and scripts here (link opens an external website in a new browser tab or window).
  5. Deploy Kubeflow, as described in Kubeflow Installation.

After Deploying Kubeflow

To configure external MinIO after deploying Kubeflow on your Kubernetes cluster:
  1. Edit the secret mlpipeline-minio-artifact in the namespace kubeflow:
    kubectl edit secret mlpipeline-minio-artifact -n kubeflow
    Edit the secret mlpipeline-minio-artifact in all other profile (user) namespaces:
    kubectl edit secret mlpipeline-minio-artifact -n <profile_namespace> 
    Change the data in the secret so that it matches your MinIO configuration. All values must be encoded in base64 format.

    For base64 encoding, you can use this tool.

  2. Transfer the artifacts from the Kubeflow MinIO to your external S3 storage. Find the necessary instructions and scripts here (link opens an external website in a new browser tab or window).
  3. Restart the ml-pipeline and workflow-controller deployments:
    kubectl rollout restart deploy -n kubeflow ml-pipeline
    kubectl rollout restart deploy -n kubeflow workflow-controller
  4. To apply changes, restart the ml-pipeline-ui-artifact pod in each profile namespace:
    kubectl delete ml-pipeline-ui-artifact-xxx -n <profile_namespace>