kubernetes-marketplace
                                
                                
                                
                                    kubernetes-marketplace copied to clipboard
                            
                            
                            
                        Minio pod failing create
Minio Pod is failing to create with the following error (pod coming up on the master node which has no NodeD):
  Type     Reason              Age                From                       Message
  ----     ------              ----               ----                       -------
  Normal   Scheduled           2m50s              default-scheduler          Successfully assigned default/minio-65c68b8ffb-wj6lb to kube-master-449c
  Warning  FailedAttachVolume  67s (x3 over 69s)  attachdetach-controller    AttachVolume.Attach failed for volume "minio-pv" : node "kube-master-449c" has no NodeID annotation
  Warning  FailedMount         47s                kubelet, kube-master-449c  Unable to mount volumes for pod "minio-65c68b8ffb-wj6lb_default(dacf858f-5418-4f8f-af81-d46a4489d78c)": timeout expired waiting for volumes to attach or mount for pod "default"/"minio-65c68b8ffb-wj6lb". list of unmounted volumes=[minio-data]. list of unattached volumes=[minio-data default-token-c729p]
  Warning  FailedAttachVolume  4s (x5 over 65s)   attachdetach-controller    AttachVolume.Attach failed for volume "minio-pv" : rpc error: code = NotFound desc = ControllerPublishVolume: the volume minio-data not exists
                                    
                                    
                                    
                                
Have you changed something from the default installation? Normally the master is perfectly fine to bring pods up on.
Does this still happen after today's upgrade to Longhorn 0.7.0?
I got the same issue. I managed to 'fix' it by creating pvc via longhorn UI and editing minio deployment to use it
I had a similar issue with Jenkins.
Tested with minio and removing the PersistentVolume section and adding metadata to PersistentVolumeClaim worked for me.
With a default install:
> kubectl get pods
NAME                     READY   STATUS              RESTARTS   AGE
minio-6d8f9dd7cd-hqgtx   0/1     ContainerCreating   0          7m27s
Pod events:
Events:
  Type     Reason              Age                   From                     Message
  ----     ------              ----                  ----                     -------
  Normal   Scheduled           <unknown>             default-scheduler        Successfully assigned default/minio-6d8f9dd7cd-hqgtx to kube-node-4843
  Warning  FailedMount         2m3s (x2 over 4m17s)  kubelet, kube-node-4843  Unable to attach or mount volumes: unmounted volumes=[minio-data], unattached volumes=[minio-data default-token-wkm77]: timed out waiting for the condition
  Warning  FailedAttachVolume  8s (x11 over 6m20s)   attachdetach-controller  AttachVolume.Attach failed for volume "minio-pv" : rpc error: code = NotFound desc = ControllerPublishVolume: the volume minio-data not exists
When removing PersistentVolume:
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: minio-pv-claim
  labels:
    type: longhorn
    app: minio
spec:
  storageClassName: longhorn
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: minio
...
It goes into a running state.
After creating a bucket, I deleted the pod and waited for the pod to be assigned to another node and the data persisted.
I haven't figured out why having the PersistentVolume definition is raising the issue
Experienced the same issue here installing Minio on a fresh cluster using:
civo applications add MinIO:5GB --cluster=cluster-name
The same problem exists after installing MinIO through the web interface.