☸️Namespaces

Describe about What is Namespaces ?

It like a house that group all of the component such as Pod Service and we can create the separate rule of each house . In Kubernetes there are 3 namespaces that are created automatically when we first set up

  1. kube-system

  2. default

  3. kube-public

kube-system

It is the namespace that store all configuration about the K8s system , this namespace will not allow the normal user to access

default

It is normal namespace when everytime you created new pod it will create in this namespace

kube-public

It is namespace that stored resoure and everyone can access

Why we need to isolate namespace ?

Ans: Because we can determine the Resource Quota for each namespace

CheatSheet Command

  1. Change default name space: kubectl config set-context $(kubectl config current-context) --namespace=<namespace_name>

  2. Get namespace: kubectl get ns

  3. Get pod specify namespace : kubectl get po -n research

  4. Create pod specify namespace: kubectl run <pod_name> --image=<image_name> -n <namespace_name>

Last updated