kspacr Icon

Namespaces

Connect to Namespace

Once your namespace has been successfully created via the User Interface (UI) or Command Line Interface (CLI) and configured in your chosen region, the next step is to obtain the kubectl configuration. This is necessary to establish a connection to the namespace and begin utilizing it.


Connect to Namespace

The kubectl configuration, or kubeconfig, is a file that stores the information about clusters, namespaces, users, and authentication mechanisms. The Kubernetes command-line tool, kubectl, uses this file to communicate with the cluster and perform tasks within the namespace.

You need to fetch the kubeconfig context that connects to the Kubernetes cluster hosting your namespace. The command below allows you to select from available namespaces (of your currently active project) and merges the context into your main kubeconfig file:

kspacr ns connect

This makes it possible for you to interact with your namespace using kubectl commands.

To fetch the context without merging into the main kubeconfig file:

kspacr ns connect --no-merge

To fetch the context for a given namespace and merge with given kubeconfig file:

kspacr ns connect -n my-name-space -k /home/johndoe/.kube/my-config

Get Namespaces

Get a list of all namespaces available for your currently active project:

kspacr ns list
Previous
Namespace Isolation