How to access object storage using Charmed MinIO

In Charmed Kubeflow, object storage access can be achieved with MinIO. Access via MinIO requires some special configuration. It is relevant for local workstations as well as private cloud deployments.

See more: Charmhub | MinIO

Contents:

  1. Configure the keys for MinIO
  2. Create the “allow-minio.yaml” file
  3. Configure the “allow-minio.yaml” file
  4. Refresh Juju

Configure the keys for MinIO

First, check if the access key is configured:

juju config minio access-key

Then, check if the secret key is configured:

juju config minio secret-key

In case they are set, please remember the set credentials. Otherwise, please go ahead and set a new username and password:

juju config minio access-key=<username>
juju config minio secret-key=<password>

Please bear in mind that both username and password need to have a minimum of 8 characters.

See also: Juju OLM | juju config, Charmhub > minio > Configure

Create the “allow-minio.yaml” file

In order to gain access to MinIO, it has to be added to the pod and configured. In order to do that, a YAML needs to be created and configured.

In the terminal, please run: touch allow-minio.yaml.

After that, please run: nano allow-minio.yaml.

Configure the “allow-minio.yaml” file

Once the “allow-minio.yaml” file opens, please update the information within it as below:

apiVersion: kubeflow.org/v1alpha1
kind: PodDefault
metadata:
 name: access-minio
spec:
 desc: Allow access to Minio
 selector:
   matchLabels:
     access-minio: "true"
 env:
   - name: AWS_ACCESS_KEY_ID
     valueFrom:
       secretKeyRef:
         name: mlpipeline-minio-artifact
         key: accesskey
         optional: false
   - name: AWS_SECRET_ACCESS_KEY
     valueFrom:
       secretKeyRef:
         name: mlpipeline-minio-artifact
         key: secretkey
         optional: false
   - name: MINIO_ENDPOINT_URL
     value: http://minio.kubeflow.svc.cluster.local:9000

Please save it and then close it. After that, please run in the terminal the following command: kubectl apply -f allow-minio.yaml -n <user-namespace>

Refresh Juju

In the terminal please run juju refresh –kubeflow.

After that, you should be able to access Minio. If you would like to check if it is added to the model, please run it in the terminal.

sudo microk8s kubectl get PodDefault -n admin

There you should see “allow-minio” .

Another option is to access the MinIO dashboard. By doing this you need to run juju status and take the IP address of MinIO <>. Go to your browser, where you already set up the Proxy for Kubeflow and enter it. In order to login, please use the username and password that you previously set.