[英]How to get logging level of a pod given pod-name and namespace name in K8s?
How to i get logging level of a pod given the pod name and Namespace name如何在给定 pod 名称和命名空间名称的情况下获取 pod 的日志记录级别
if its not possible to get Logging level then please tell me why如果无法获得日志记录级别,请告诉我原因
With kubectl command you can perform this使用 kubectl 命令,您可以执行此操作
kubectl logs <pod name> --namespace <namespace> [-c <container name>]
The container name is required is you have several container in your pod如果您的 pod 中有多个容器,则需要容器名称
In the GUI of GCP, you can do a custom filter like this在 GCP 的 GUI 中,您可以像这样进行自定义过滤器
resource.type="k8s_pod"
resource.labels.location="us-central1-c"
resource.labels.cluster_name="cluster-2"
jsonPayload.involvedObject.namespace="namespace"
jsonPayload.involvedObject.name="pod name"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.