K8S常用命令
大约 2 分钟
常用命令
查看所有命令空间
kubectl get ns
查看当前命名空间
kubectl config view --minify --output 'jsonpath={..namespace}'
查看命名空间详情
kubectl describe ns xxxx
查看所有ingress
kubectl get ing
kubectl get ingress
kubectl get ing -o wide --show-labels
查看ingress详情
kubectl describe ing xxx
查看所有的service
kubectl get svc
kubectl get service
kubectl get svc -o wide --show-labels
查看service详情
kubectl describe svc xxx
查看所有pod
kubectl get po
kubectl get pod
kubectl get pods
kubectl get po -o wide --show-labels
查看pod详情
kubectl describe pod xxx
进入pod内部
kubectl exec -it xxx bash
kubectl exec -it xxx sh
查看pod最后n行日志
kubectl logs -f xxxx-podname --tail=100
//100就是从最后100行开始输出
导出yaml文件
kubectl get deployment my-deployment -o yaml
kubectl get svc xxx -o yaml
系统推荐
- Cordova+Umi项目搭建步骤
- 记一次内存泄漏
- JVM垃圾收集器
- Spring Cloud Gateway收到的是http请求,但schema却是https
- NGINX
- 乱七八糟的笔记
- 常用队列
- Paxos算法
- PasteImageIntoMarkdown插件开发
- ShadowsockServer配置
- Docker隐射的端口外网不能访问
- BBR加速
- 随机毒鸡汤:我需要你的指点,但不需要你指指点点。