Minio Kubernetes Intstallation no memory error

8/6/2021

I am trying to install the minio storage using kubernetes on my local .

Following the link , However i am facing error with no memory in all types of install ..

I am not sure how to set up the presistantVolume in my case.

https://github.com/minio/operator/blob/master/README.md

enter image description here

I am trying to create persistent volume so that enough memory will be available in the path i am selecting

     cat pv.yaml
    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
        name: local-storage
    provisioner: kubernetes.io/no-provisioner
    volumeBindingMode: WaitForFirstConsumer
kubectl create -f pv.yaml

kubectl get sc

  kubectl get sc
NAME                 PROVISIONER                    RECLAIMPOLICY   VOLUMEBINDINGMODE      ALLOWVOLUMEEXPANSION   AGE
hostpath (default)   docker.io/hostpath             Delete          Immediate              false                  131m
local-storage        kubernetes.io/no-provisioner   Delete          WaitForFirstConsumer   false                  56m

apiVersion: v1
kind: PersistentVolume
metadata:
   name: pv-node
spec:
   capacity:
      storage: 10Gi
   volumeMode: Filesystem
   accessModes:
   - ReadWriteOnce
   persistentVolumeReclaimPolicy: Retain
   storage-class: local-storage
   local:
      path: /mnt/d/minio
   nodeAffinity:
      required:
         nodeSelectorTerms:
         - matchExpressions:
            - key: kubernetes.io/hostname
               operator: In
               values:
               - docker-desktop

        kubectl create -f pvc.yaml
        error: error parsing pvc.yaml: error converting YAML to JSON: yaml: line 8: mapping values are not allowed in this context

:~$ kubectl get nodes
NAME             STATUS   ROLES                  AGE    VERSION
docker-desktop   Ready    control-plane,master   126m   v1.21.2
See 'kubectl get --help' for usage.
:~$ kubectl get pods --all-namespaces
NAMESPACE        NAME                                     READY   STATUS    RESTARTS   AGE
kube-system      coredns-558bd4d5db-j72z4                 1/1     Running   1          128m
kube-system      coredns-558bd4d5db-vw98z                 1/1     Running   1          128m
kube-system      etcd-docker-desktop                      1/1     Running   1          128m
kube-system      kube-apiserver-docker-desktop            1/1     Running   1          128m
kube-system      kube-controller-manager-docker-desktop   1/1     Running   1          128m
kube-system      kube-proxy-tqfnr                         1/1     Running   1          128m
kube-system      kube-scheduler-docker-desktop            1/1     Running   1          128m
kube-system      storage-provisioner                      1/1     Running   2          127m
kube-system      vpnkit-controller                        1/1     Running   12         127m
minio-operator   console-6b6cf8946c-vxcqh                 1/1     Running   0          76m
minio-operator   minio-operator-69fd675557-s62nl          1/1     Running   0          76m

:/$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb        251G  1.9G  237G   1% /
tmpfs           6.2G  401M  5.8G   7% /mnt/wsl
tools           477G   69G  409G  15% /init
none            6.1G     0  6.1G   0% /dev
none            6.2G   12K  6.2G   1% /run
none            6.2G     0  6.2G   0% /run/lock
none            6.2G     0  6.2G   0% /run/shm
none            6.2G     0  6.2G   0% /run/user
tmpfs           6.2G     0  6.2G   0% /sys/fs/cgroup
C:\             477G   69G  409G  15% /mnt/c
D:\             932G  132M  932G   1% /mnt/d
/dev/sdd        251G  2.7G  236G   2% /mnt/wsl/docker-desktop-data/isocache
none            6.2G   12K  6.2G   1% /mnt/wsl/docker-desktop/shared-sockets/host-services
/dev/sdc        251G  132M  239G   1% /mnt/wsl/docker-desktop/docker-desktop-proxy
/dev/loop0      396M  396M     0 100% /mnt/wsl/docker-desktop/cli-tools

I beeilve creating a persistent volume and using that in a namesapce and using that namespace whil creating a tenant should solve this issue. But i am stuck with the error of no memory available

-- Rafa
kubernetes
minio

1 Answer

8/30/2021

As per the code:

  if (memReqSize < minMemReq) {
    return {
      error: "The requested memory size must be greater than 2Gi",
      request: 0,
      limit: 0,
    };
  }

You need 2GB of RAM per node. Since you have 4 nodes, you need 8 GB of RAM for Minio alone. It's likely that you don't have the enough RAM to run this.

-- sinhaashish
Source: StackOverflow