Kubernetes Cluster Scoped Object Organization
Kubernetes Cluster Scoped Object Organization defines how cluster-level resources are structured, managed, and accessed across the entire Kubernetes environment.
Kubernetes Cluster Scoped Object Organization is the practice of managing and governing resource types that exist outside the namespace boundary entirely — Node, PersistentVolume, StorageClass, ClusterRole, ClusterRoleBinding, CustomResourceDefinition, and the Namespace object itself — which have no namespace of their own and are therefore visible and addressable identically from anywhere in the cluster. Because these objects sit outside the namespace-based organizational scheme entirely, they require a distinct organizational approach: naming conventions and labels remain useful, but the namespace-based access control and quota mechanisms that govern namespaced resources do not apply to them at all.
Recognizing which resources fall into this category — and managing them with the heightened care their cluster-wide visibility demands — is essential, since a mistake affecting a cluster-scoped object potentially impacts every namespace simultaneously, unlike a mistake confined to a single namespace's resources.
Identifying Cluster-Scoped Resource Types
Checking Scope Directly
kubectl api-resources --namespaced=false
This command lists every cluster-scoped resource type registered with the API server, including built-in types (Node, PersistentVolume, StorageClass, ClusterRole, ClusterRoleBinding, CustomResourceDefinition, Namespace itself) and any cluster-scoped custom resources a CRD has registered.
Why Certain Resources Are Cluster-Scoped
Resources are cluster-scoped specifically because their meaning or identity does not naturally belong to any single namespace — a Node represents a physical or virtual machine shared by workloads across every namespace; a StorageClass defines a storage provisioning template usable by claims in any namespace; a ClusterRole defines a reusable permission set that may be bound within any specific namespace via a namespace-scoped RoleBinding.
Governance Implications of Cluster Scope
No Namespace-Based RBAC Boundary
Because these resources have no namespace, RBAC permissions over them can only be granted through ClusterRole and ClusterRoleBinding, never through a namespace-scoped Role/RoleBinding — an important distinction when designing least-privilege access, since granting broad permissions over a cluster-scoped resource type inherently grants cluster-wide reach, with no way to further restrict it to "just my namespace's nodes" (there is no such thing).
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: codartium-node-viewer
rules:
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get", "list", "watch"]
No ResourceQuota Applicability
ResourceQuota objects, being namespace-scoped themselves, have no mechanism for bounding consumption of cluster-scoped resources like PersistentVolume objects directly (quota instead governs PersistentVolumeClaim consumption, which is namespaced) — governance over cluster-scoped resource creation and management typically relies on RBAC restriction (limiting who can create them at all) rather than quantity-based quota.
Naming and Labeling Cluster-Scoped Resources
Naming Still Matters, Cluster-Wide
Because cluster-scoped resource names must be unique across the entire cluster (not merely within a namespace), naming conventions for these resources carry even more weight than namespace-scoped naming — a naming collision here is a hard validation failure with no namespace to disambiguate it.
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: codartium-ssd-us-east
Labels for Cross-Cutting Organization
Labels remain useful for organizing cluster-scoped resources even without namespace boundaries to lean on — labeling Node objects by instance type, zone, or hardware class (gpu: "true", zone: us-east-1a) is the primary mechanism enabling the nodeSelector and affinity-based scheduling patterns that depend on this metadata.
kubectl label node node-worker-05 zone=us-east-1a instance-type=m5.xlarge
Managing Cluster-Scoped Resource Changes Carefully
Elevated Review for Cluster-Wide Impact
Because a change to a cluster-scoped resource (a StorageClass default change, a ClusterRole permission expansion) affects every namespace simultaneously, changes here typically warrant more deliberate review than an equivalent change confined to a single namespace's resources — the blast radius consideration that governs DaemonSet or platform-namespace changes applies equally here.
Centralizing Ownership
Cluster-scoped resources are commonly managed by a dedicated platform team through a centrally governed GitOps repository, distinct from the per-team or per-application repositories managing namespace-scoped resources, reflecting the difference in blast radius and the corresponding difference in who should be authorized to change them.
Example
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: codartium-cluster-scoped-example
provisioner: ebs.csi.aws.com
volumeBindingMode: WaitForFirstConsumer
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: codartium-storageclass-viewer
rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list"]