Kubernetes 实体的常见搜索查询
您可以在
VMware Aria Operations for Networks
中搜索 Kubernetes 实体详细信息。
常见查询
- 搜索流:flows whereKubernetes Object=Object name示例:flows where=Kubernetes Cluster'Production'
- 查看服务规模:kubernetes pods group by Kubernetes Services
- 查看节点加载:kubernetes Pods group by Kubernetes Node
- 查看节点运行状况:MemoryPressure and PIDPressure and DiskPressure and Ready of Kubernetes Node
- 查看流合规性:flows from Kubernetes Objectname of the objectto Kubernetes Objectname of the object示例:flows from Kubernetes Namespaceto Kubernetes Namespace'PCI''Non-PCI'
- 查看路径拓扑:
- Kubernetes 服务service name到 Kubernetes 服务service name
- Kubernetes 服务service name到 Kubernetes podpod name
- Kubernetes podpod name到 Kubernetes podpod name
查询 Kubernetes 对象Kubernetes 对象查询描述命名空间- kubernetes namespace where L2 Networks = 'a'
- list(Kubernetes Node) of Kubernetes Pod where Kubernetes Namespace = 'a'
- 返回连接到 L2 网络“a”的 Kubernetes 命名空间
- 返回 Kubernetes 命名空间为“a”的 Kubernetes 节点列表
Pod- NSX-T Logical port where connectedto.modelKey in (modelKey of kubernetes nodes) order by Tx Packets desc
- NSX-T Logical port where connectedto.modelKey in (modelKey of kubernetes pods) and Rx Packet Drops > 0
- new kubernetes pod in last 1 hour
- 返回基于传输的数据包按降序连接到节点的逻辑端口的列表
- 返回连接到 Kubernetes 容器且丢弃的 Rx 数据包大于 0 的逻辑端口的列表
- 最近一小时发现的新 Kubernetes Pod
服务- kubernetes pods where kubernetes services is not set
- kubernetes pods group by Kubernetes Services, Kubernetes Cluster
- 没有服务的 Kubernetes Pod 列表
- 每个服务上运行的 Pod 数
节点数- kubernetes nodes where Ready ! = 'True'
- kubernetes node where Virtual Machine = 'vm-a'
- 不正常的 Kubernetes 节点的列表
- 属于“vm-a”虚拟机的 Kubernetes 节点
流- flows where kubernetes service is set
- flows where source kubernetes node = 'a'
- 源或目标 Kubernetes 服务存在的流列表
- 源 Kubernetes 节点为“a”或目标 Kubernetes 节点为“a”的流列表
实体/组件 | 查询 | 描述 |
---|---|---|
具有 Kubernetes 实体的应用程序 | application where virtual member = ‘service-a’ | 列出 Kubernetes 服务“service-a”所属的所有应用程序 |
application where virtual member = ‘service-a’ and virtual member.Kubernetes Namespace = ‘namespace-b’ | 列出 Kubernetes 服务“service-a”和 Kubernetes 命名空间“namespace-b”所属的所有应用程序 | |
tier where virtual member = ‘service-a’ and virtual member.Kubernetes Namespace = ‘namespace-b’ | 列出 Kubernetes 服务“service-a”和 Kubernetes 命名空间“namespace-b”所属的所有层 | |
count of applications where Virtual Member in (kubernetes services) | 成员类型为 Kubernetes 服务的应用程序数量 | |
count of applications where virtual member in (kubernetes services where Kubernetes Namespace = ‘sock-shop’) | 成员类型为属于 Kubernetes 命名空间“sock-shop”的 Kubernetes 服务的应用程序数量 | |
list(virtual member) of applications where Name = ‘app-1’ and virtual member.Kubernetes Cluster is set | 列出应用程序“app-1”的所有成员 Kubernetes 服务 | |
衡量指标 | nsx-t logical port where (ConnectedTo in (Kubernetes Pods where kubernetes cluster is set)) and Rx Packet Drops > 0 group by ConnectedTo order by max(Rx Packet Drops) | 按 Kubernetes pod 分组的 Rx 数据包丢弃数 |
nsx-t logical port where (ConnectedTo in (Kubernetes Nodes where kubernetes cluster is set)) and Rx Packet Drops > 0 group by ConnectedTo order by max(Rx Packet Drops) | 按 Kubernetes 节点分组的 Rx 数据包丢弃数 | |
nsx-t logical switch where Rx Packet Drops > 0 and Tag like ‘ncp/project:’ order by Rx Packet Drops | 按 Kubernetes 命名空间分组的 Rx 数据包丢弃数 | |
nsx-t logical switch where Rx Packet Drops > 0 and Tag like ‘ncp/project:<namespace name>’ | 特定于 Kubernetes 命名空间的 Rx 数据包丢弃数 | |
nsx-t logical port where (ConnectedTo in (Kubernetes Pods where kubernetes cluster is set)) and Rx Packet Drops > 0 group by ConnectedTo.Kubernetes service order by max(Rx Packet Drops) | 按 Kubernetes 服务分组的 Rx 数据包丢弃数 | |
flows where firewall action = ‘DROP’ group by Kubernetes Service | 按 Kubernetes 服务分组的丢弃流数 | |
flows where firewall action = ‘DROP’ group by source Kubernetes Namespace | 列出按 Kubernetes 命名空间分组的所有丢弃流 | |
Kubernetes 警示 | Kubernetes alerts where Problem Entity = ‘<pod/namespace/node Name>’ | 给定 Kubernetes 实体的所有 Kubernetes 警示的列表。Kubernetes 实体可以是 pod、命名空间或节点 |
Kubernetes alerts where alert code = ‘ImagePullBackOff’ in last 24 hours | 列出过去 24 小时内类型为“ImagePullBackOff”的 Kubernetes 警示 | |
Kubernetes alerts where problem entity.Kubernetes Cluster = ‘<cluster-a>’ | 给定群集的所有 Kubernetes 警示的列表 |