Why are Kubernetes Custom Resource Definitions cluster wide

7/19/2018

Hello StackOverflow users,

I've started working in the Kubernetes space recently and saw that Custom Resource Definitions(CRDs) types are not namespaced and are available to to all namespaces.

I was wondering why it isn't possible to make a CRD type scoped to a namespace. Any help would be appreciated!

-- agreene
kubernetes
kubernetes-custom-resources

1 Answer

7/19/2018

See https://github.com/kubernetes/kubernetes/issues/65551#issuecomment-400909534 for a discussion of this issue.

A particular CRD can define a custom resource that is namespaced or cluster-wide, but the type definition (the CRD itself) is cluster-wide and applies uniformly to all namespaces.

-- Jordan Liggitt
Source: StackOverflow