简体   繁体   English

在Kubernetes设置中从Pod的集群中的Tcpdump(在Minikube设置中)

[英]Tcpdump from a pod for cluster in kubernetes setup (In Minikube setup)

I am new to kubernetes. 我是kubernetes的新手。 The whole setup I have configured in Minikube. 我已经在Minikube中配置了整个设置。 I am not sure it should different than any other kubernetes setup. 我不确定它是否应该与任何其他Kubernetes设置不同。

I have created a POD in my setup and an spring boot application is running inside on 8080 port and this service to expose to Cluster on 20080 port. 我在设置中创建了一个POD,并且Spring Boot应用程序在8080端口上运行,并且该服务在20080端口上公开给Cluster。

I am running another pod inside the cluster where tcpdump is running. 我正在运行tcpdump的集群中运行另一个Pod。 I have requirement to dump the HTTP packets hitting the cluster on 20080. Please let me know how I can access Cluster interface from the tcpdump pod. 我需要转储在20080时到达群集的HTTP数据包。请让我知道如何从tcpdump pod访问群集接口。

I tried google and tried using Cluster IP directly from the POD,but it didn't work. 我尝试了google,并尝试直接从POD中使用群集IP,但是它不起作用。

The POD that is running tcpdump can only see its own netns, except you run the POD with the hostNetwork: true option. 除了使用hostNetwork: true选项运行POD之外,运行tcpdump的POD只能看到其自己的netns。

So maybe what you can do is running POD with hostNetwork: true option, then use tcpdump to monitor the host's physical interface to grab the network packages on port 20080. Also you can monitor the network interface of the POD that's running the spring boot, if you can find the POD's network interface, which depends on the network configurations. 因此,也许您可​​以执行的操作是使用hostNetwork: true选项运行POD,然后使用tcpdump监视主机的物理接口以捕获端口20080上的网络软件包。此外,您还可以监视运行Spring Boot的POD的网络接口。您可以找到POD的网络接口,具体取决于网络配置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Kubernetes 集群(Debian10)在设置 GitLab Kubernetes 代理设置时无法连接 GitLab - Kubernetes Cluster (Debian10) not able to connect GitLab while setup GitLab Kubernetes Agent Setup 在 Minikube 问题上将 OpenFaaS 安装到您的 Kubernetes 集群 - install OpenFaaS to your Kubernetes Cluster on Minikube issue 访问 Kubernetes 集群中的特定 pod - Accessing a specific pod in a Kubernetes cluster 从 pod 到 Kubernetes 集群外的服务时,源 IP(记录在服务端,集群外)? - Source IP(recorded at service end, outside cluster) when talking from pod to a service outside Kubernetes cluster? 我在两个EC-2实例和仪表板上设置了Kubernetes集群但是我无法在浏览器上访问kubernetes仪表板的ui - I have setup a Kubernetes cluster on two EC-2 instances & dashboard but I'm not able to access the ui for the kubernetes dashboard on browser 无法从主机与minikube集群建立连接 - Unable to establish connection with minikube cluster from host minikube安装pod服务如何从另一台服务器连接到服务 - minikube installed pod service how to connect to the service from another server Kubernetes - 服务群集IP地址与Pod IP地址 - Kubernetes - service cluster IP address vs Pod IP address Kubernetes集群中的每个Pod /容器是否都有不同的外部IP? - Does each pod/container in a Kubernetes cluster has a different external ip? 在kube.netes中,Cluster IP的用法可以替代Pod IP的用法吗? - In Kubernetes, usage of Cluster IP can replace the usage of Pod IP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM