Unabel to deploy mariadb on kubernetes using openstack-helm charts

10/5/2018

I am trying to deploy OpenStack on kubernetes using helm charts. I am seeing the below error when trying to deploy MariaDB. Mariadb-server-0 looks for PVC which is in LOST state. I tried creating the PersistentVolume and assign the same but still, the pod looks for a lost PVC as shown in the error below.

2018-10-05T17:05:04.087573+00:00 node2: kubelet[9897]: E1005 17:05:04.087449    9897 desired_state_of_world_populator.go:273] Error processing volume "mysql-data" for pod "mariadb-server-0_openstack(c259471b-c8c0-11e8-9636-441ea14dfc98)": error processing PVC "openstack"/"mysql-data-mariadb-server-0": PVC openstack/mysql-data-mariadb-server-0 has non-bound phase ("Lost") or empty pvc.Spec.VolumeName ("pvc-74e81ef0-bb97-11e8-9636-441ea14dfc98")

Is there a way we can delete the old PVC entry from a cluster, so MariaDB doesn't look for the same while deploying ??

Thanks, Ab

-- Abhi Ram
kubernetes
kubernetes-helm
openstack

1 Answer

10/5/2018

To delete a PVC, you can just use the typical kubectl commands.

See all the PVCs:

kubectl -n <namespace> get pvcs

To delete PVCs:

kubectl -n <namespace> delete pvc <pvc-id-from-the-previous-command>

Similarly, I would try PVs, to see if there are any dangling PVs.

See all the PVs:

kubectl -n <namespace> get pvcs

To delete PVs:

kubectl -n <namespace> delete pv <pv-id-from-the-previous-command>
-- Rico
Source: StackOverflow