Repositories
v1v
Published by: Kubernetes3Updated

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.

v1
|

Authentication

Add API authentication details

HEADERS
X-APIKEY
string
Send X-APIKEY in Header

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

  1. 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.
  1. Multi-Tenancy:
  • Multiple teams can share a single Kubernetes cluster while keeping their applications separate.
  1. Resource Quotas & Limits:
  • You can enforce CPU, memory, and storage limits per namespace using ResourceQuota and LimitRange objects.
  1. 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

  1. Base

The Base collection provides a generic namespace resource. Users can opt not to use any "addon" filters and instead rely on overrides and values to create a custom namespace configuration.

  1. addon:name

If only the namespace name needs to be specified, the addon:name filter can be used. Refer to the example.

  1. addon:labels

To include labels, the addon:labels filter can be combined with addon:name to construct a Namespace resource template with metadata labels.

Examples

Check Request Body tab section and Examples dropdown to play around with interactive 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 -
POST/apis/repos/kubernetes/cluster-resources/v1/resources/collections/namespace/exec
REQUEST
QUERY-STRING PARAMETERS
format
string
No sources available.
API Server https://configfacets.com
API Key
Not set
RESPONSES
No content available.