
获取所有的pod实例:

k8s中,命名空间(Namespace)提供一种机制,将同一集群 中的资源划分为相互隔离的组。同一命名空间内的资源名称要唯一,命名空间是用来隔离资源的,不隔离网络。
https://kubernetes.io/zh-cn/docs/concepts/overview/working-with-objects/namespaces/

查看: kubectl get namespace; kubectl get ns;
创建namespace:kubectl create namespace tulingmall;
查看某namespace下面的pod资源: kubectl get pod -n tulingmall;
删除:kubectl delete namespace tulingmall;
第二种方式:yaml文件创建namespace

kubectl apply -f ns.yaml --创建命名空间
kubectl delete -f ns.yaml 删除命名空间
疑问?
- namespace与节点的关系是什么?