Skip to content

Latest commit

 

History

History
71 lines (43 loc) · 2.22 KB

3.0.-namespaces.md

File metadata and controls

71 lines (43 loc) · 2.22 KB

Namespaces

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

List 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).

Settings > Namespaces: Manage namespaces

Creating Namespace

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 %}

Switching Namespace

The active namespace can be seen on the top menu bar, you can switch to the new namespace by selecting the name:

Switching Namespace

{% 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 %}

Deleting Namespace

Namespaces can be deleted from the menu:

Settings > Namespaces Menu

A confirmation dialog is shown before deleting the namespace:

Settings > Namespace deletion confirmation

{% 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 %}