Kubernetes V1DeleteOptions useless for namespace delete?

6/7/2017

Seems like V1DeleteOptions in Kubernetes namespace delete API is useless.

For example,

  • I created a service in a namespace. Later on, I tried to delete the namespace and setting V1DeleteOptions.propagationPolicy to false.

  • But turns out the namespace and the service are both deleted immediately.

  • I also tried setting V1DeleteOptions.GracePeriodSeconds to 100 just to test the grace period. But still, the namespace and the service are deleted immediately.

So, does the V1DeleteOptions in Kubernetes namespace delete API do anything at all?

-- jbox
kubernetes

1 Answer

6/7/2017

look like this flag is used for 'how garbage collection will be performed'

https://github.com/kubernetes-incubator/client-python/blob/master/kubernetes/docs/V1DeleteOptions.md

Note: when we delete the namespace, it should cleanup the all object inside the name. I think delete command worked properly.

-- sfgroups
Source: StackOverflow