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.
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 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"
Avoid upper case characters for the name because Kubernetes does not support it.
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 a "managed namespace" in the current project context using the following command.
./rctl delete namespace <name of namespace>
Managed namespaces cannot be deleted if they are in active use by workloads or blueprints.