Minio pods get stuck with ContainerCreating status

When Minio is deployed in any mode, the first Minio pod might get stuck with the status as ContainerCreating.

Gather information about the issue

  1. Get the list of pods.

     kubectl get po
    

    The following code is a sample output:

     NAME                                           READY     STATUS              RESTARTS   AGE
     mc2                                            1/1       Running             53         2d
     minio-ibm-minio-objectstore-848fbcb6f5-2wpq2   0/1       ContainerCreating   0          3m
    
  2. Check the logs. If the logs are empty, describe the pod.

     kubectl logs minio-ibm-minio-objectstore-848fbcb6f5-2wpq2
    

    The following code is a sample output:

     Error from server (BadRequest): container "ibm-minio-objectstore" in pod "minio-ibm-minio-objectstore-848fbcb6f5-2wpq2" is waiting to start: ContainerCreating
    
  3. Get pod description.

     kubectl describe po minio-ibm-minio-objectstore-848fbcb6f5-2wpq2
    

    The following code is a sample output:

     Name:               minio-ibm-minio-objectstore-848fbcb6f5-2wpq2
     Namespace:          default
     Priority:           0
     PriorityClassName:  <none>
     Node:               10.41.4.202/10.41.4.202
     Start Time:         Fri, 14 Sep 2018 05:52:01 -0700
     ...
    
     ...
     Events:
       Type     Reason       Age               From                  Message
       ----     ------       ----              ----                  -------
       Normal   Scheduled    5m                default-scheduler     Successfully assigned default/minio-ibm-minio-objectstore-848fbcb6f5-2wpq2 to 10.41.4.202
       Warning  FailedMount  1m (x10 over 5m)  kubelet, 10.41.4.202  MountVolume.SetUp failed for volume "minio-user" : secrets "minio" not found
       Warning  FailedMount  1m (x2 over 3m)   kubelet, 10.41.4.202  Unable to mount volumes for pod "minio-ibm-minio-objectstore-848fbcb6f5-2wpq2_default(f9036aa0-b81c-11e8-bc28-00000a2901b6)": timeout expired waiting for volumes to attach or mount for pod "default"/"minio-ibm-minio-objectstore-848fbcb6f5-2wpq2". list of unmounted volumes=[minio-user]. list of unattached volumes=[export minio-server-config minio-user minio-config-dir default-token-tzxvl]
    

    The pod description indicates that the pod is unable to mount volume as Minio secret is unavailable.

  4. Check whether the secret is available in the namespace where Minio is deployed.

       kubectl get secret minio
    

    The following code is a sample output:

       No resources found.
       Error from server (NotFound): secrets "minio" not found
    

    The output indicates that the secret is not available in the namespace. Create the secret by following instructions that are in the readme file Opens in a new tab.

Resolve the issue

To resolve the issue, complete the following steps:

  1. Delete the Helm release.
  2. Add the secret to the Helm chart configuration.
  3. Deploy the Helm chart.