列出集群中的当前名称空间
kubectl get namespaces
或 kubectl get ns
宿主机与pod文件传输:
宿主机–》pod: kubectl cp 文件名 -n 命名空间 pod名称:pod中目录
kubectl cp stompest-2.3.0.tar.gz -n nscloud yyy-5cbd9bf7fb-5wpl2:/root
docker inspect docker ps |grep k8s_tenant|awk '{print $1}'
|grep Dir
docker inspect docker ps |grep k8s_opendsd|awk '{print $1}'
|grep Dir
节点:
节点查询:
kubectl get node
kbuectl get node -o wide # 更多信息
节点删除:
kubectl delete node 节点名称
显示node节点的标签信息:
kubectl get node --show-labels
https://blog.csdn.net/annita2019/article/details/108938532 节点相关命令
node 详细信息:
kubectl describe node xxxx
service :
查询服务:
kubectl get service
kubectl get service -n 命名空间名称
删除:
kubectl delete service/svc -n 命名空间名称
pod &#