Menu
Coddy logo textTech

Namespaces

Part of the Introduction to Kubernetes section of Coddy's Terminal journey. Lesson 30 of 45.

A cluster is shared by many applications and teams. Namespaces divide it into separate areas, so two teams can both have a Pod named web without clashing. Everything you have created so far lives in the default namespace.

List the namespaces:

kubectl get namespaces

Besides default you will see kube-system, where Kubernetes runs its own components, and a couple of others the cluster uses internally. The short form is ns.

Create a namespace of your own:

kubectl create namespace dev

Kubernetes answers namespace/dev created. Deleting a namespace deletes everything inside it, so it is also a tidy way to clean up an experiment.

challenge icon

Challenge

Beginner

Create a namespace named dev, then list the namespaces to see it next to default and kube-system.

Try it yourself

Terminal
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Introduction to Kubernetes

Practice on your own: Terminal playground