Cluster Resources in Kubernetes provide foundational constructs for organizing and managing workloads within a cluster. They include Namespaces for resource isolation, ensuring efficient multi-tenancy and access control. These resources help structure Kubernetes environments, enabling better organization, security, and policy enforcement. Configuration templates are available in this version.
Authentication
Add API authentication details
Readme
User instructions for this resource
A namespace in Kubernetes is a logical partition within a cluster that allows you to group and isolate resources. It is commonly used for organizing workloads, separating environments (e.g., dev, test, prod), and managing resource quotas.
Key Features of Namespaces
- Resource Isolation:
- Namespaces provide a way to isolate resources like Pods, Services, and ConfigMaps from each other.
- One namespace cannot directly access resources in another unless explicitly allowed.
- Multi-Tenancy:
- Multiple teams can share a single Kubernetes cluster while keeping their applications separate.
- Resource Quotas & Limits:
- You can enforce CPU, memory, and storage limits per namespace using ResourceQuota and LimitRange objects.
- Scoped Names:
- Names of resources must be unique within a namespace but can be the same across different namespaces.
Configfacets namespace collection is designed to be flexible and can be used to generate Namespace resource as per user needs.
Collection Breakdown
Check Source Tab in the API section for details on the collection items
The Base collection provides a generic namespace resource. Users can opt not to use any "addon" filters and instead rely on
and overrides
to create a custom namespace configuration.values
If only the namespace name needs to be specified, the addon:name filter can be used. Refer to the example.
To include labels, the
filter can be combined with addon:name to construct a Namespace resource template with metadata labels.addon:labels
Examples
Check Request Body tab section and
dropdown to play around with interactive examples.Examples
Install(
)Example
The Curl tab in the request section below provides the curl command for your resource.
curl -s -X POST "https://configfacets.com/apis/repos/kubernetes/cluster-resources/v1/resources/collections/namespace/exec?format=json" -d '{"facets":[],"values":{"cert-manager":{"metadata":{"name":"cert-manager","lables":{"istio-injection":"enabled"}}}},"globalvars":{"__NS_ID__":"cert-manager"}}' | kubectl apply -f -