Skip to content

Namespaces

The RCTL utility provides the means to manage the lifecycle of namespaces across Rafay managed clusters. The following operations can be performed on namespaces managed by Rafay on the fleet of clusters.

Resource Create Get Update Delete Publish Unpublish
Namespace YES YES NO YES N/A N/A

Managed Namespaces

As a multi cluster operations platform, the Rafay Controller creates/deletes namespaces on managed Kubernetes clusters dynamically in a just in time (JIT) manner. For example, namespaces will be created on target clusters when a workload or blueprint is deployed to it based on specified policy.

For explicit and immediate operations on a namespace on a cluster, use Rafay's Zero Trust KubeCTL to manage these directly.


Create Namespace

Create a new "managed" namespace in the current Project in the Rafay Controller.

./rctl create namespace <namespace yaml>

The namespace yaml file should look like the following

name: my-namespace 
description: "My Namespace"

Important

Avoid upper case characters for the name because Kubernetes does not support it.


List Namespaces

Use this to retrieve/list all "managed namespaces" in the currently specified "Project". An illustrative example is shown below.

./rctl get namespace

NAME                    TIER
security                NoLimits
ingress-nginx           NoLimits
amazon-cloudwatch       NoLimits
newrelic                NoLimits

Delete Namespace

Delete a "managed namespace" in the current project context using the following command.

./rctl delete namespace <name of namespace>

Important

Managed namespaces cannot be deleted if they are in active use by workloads or blueprints.