I am deploying a kubernetes cluster always in the demo namespace. However, even after deleting my namespace, google cloud shows almost full persistent disk usage. This behaviour does not happen every time, and is likely to occour, after I did multiple deployments as below: (always 1 deployment at the same time)
kubectl create namespace demo
helm install ...
kubectl delete namespace demo
I see the image above, which shows that I am using almost 1 T, after deleting my namespace. There are no other deployments in this project.
To make sure there are no logs overflowing, I run the command:
PROJECT=""
LOGS="$(gcloud logging logs list --project=${PROJECT})"
for LOG in ${LOGS}
do
gcloud logging logs delete ${LOG} \
--project=${PROJECT} \
--quiet
done
To make sure the namespace is deleted correctly, I run:
kubectl get ns
kubectl get all -n demo
What else can I do to clean up disks in google cloud?