What is a namespace
A mechanism for isolating groups of resources within a single cluster
What are the four automatically generated namespaces
What does the kube-system namespace for
Made for objects created by the Kubernetes system
What does the kube-public namespace for
What does the kube-node-lease namespace for
What is a K8s Lease
Explain an example of different namespaces
How do resources within the same namespace refer to each other?
By their resource name (e.g. web-prod, db-service)
How do resources communicate with other resources in another namespace
Using DNS.
service-name.namespace.svc.cluster.local
How to list all pods in a namespace
$ k get pods –all-namespaces
How to list pods in a specific namespace
$ k get pods –n=<namespace></namespace>
How to create pod in a namespace
k create -f pod-definition.yaml –ns=dev
How to create a namespace
$ k create namespace <name></name>
How to get cluster IP, external IP, or ports about services in a namespace
k get svc -n=<namespace></namespace>