See if a specific resource exists in a Kubernetes namespace
Without knowing more about the kubernetes API that's hard to say, maybe you'd be more lucky on StackOverflow instead.

That said, if there's no explicit function to check, probably not.

Especially the status code 404 sounds like it would probably mean "not present", so this doesn't seem overly bad actually.



Is it intentional that all other ApiExceptions also return false?  If so, than there's no point to check for the 404.  If not, they should be thrown again.