Now that you have a working cluster connected to your Kubernetic client you can continue with handling the namespaces.
{% hint style="info" %} Namespaces is a way to virtually split an existing cluster to separate environments. Most objects inside Kubernetes act inside a specific namespace, which means when you switch namespace a fresh environment will be provided. {% endhint %}
Go to screen Settings > Namespaces
You will see there your existing namespaces. Kubernetes creates an active "default" namespace automatically which is where your objects act on by default. It also creates a "kube-system" namespace where all cluster's management objects are stored (e.g. A DNS service).
Let's create a namespace:
- Fill name: kubernetic-tutorial
- Click Add Namespace button
{% hint style="info" %} To create a namespace using kubectl CLI:
kubectl create namespace kubernetic-tutorial
{% endhint %}
The active namespace can be seen on the top menu bar, you can switch to the new namespace by selecting the name:
{% hint style="info" %} Namespace selection affects only Kubernetic. In order to see the selected namespace using kubectl you need to configure the command properly.
e.g. to see the pods of kubernetic-tutorial
namespace:
kubectl get pods --namespace kubernetic-tutorial
{% endhint %}
Namespaces can be deleted from the menu:
A confirmation dialog is shown before deleting the namespace:
{% hint style="info" %} To delete a namespace using kubectl CLI:
kubectl delete namespace kubernetic-tutorial
{% endhint %}
{% hint style="danger" %} Deletion of a namespace propagates the deletion of all resources under that namespace. {% endhint %}