kubernetes - 是否可以使用 kubectl 显示 k8s 网络拓扑?
问题描述
我在我的 CentOS 7.7 服务器中安装了 minikube。
里面有几个豆荚:
[dele@att root]$ kubectl get pods --all-namespaces -o wide
NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
kube-system coredns-f9fd979d6-4p6xg 1/1 Running 1 23h 172.18.0.2 minikube <none> <none>
kube-system etcd-minikube 1/1 Running 0 22h 172.17.0.2 minikube <none> <none>
kube-system kube-apiserver-minikube 1/1 Running 0 22h 172.17.0.2 minikube <none> <none>
kube-system kube-controller-manager-minikube 1/1 Running 1 23h 172.17.0.2 minikube <none> <none>
kube-system kube-proxy-4k468 1/1 Running 1 23h 172.17.0.2 minikube <none> <none>
kube-system kube-scheduler-minikube 1/1 Running 1 23h 172.17.0.2 minikube <none> <none>
kube-system storage-provisioner 1/1 Running 2 23h 172.17.0.2 minikube <none> <none>
kubernetes-dashboard dashboard-metrics-scraper-c95fcf479-k7zpn 1/1 Running 1 23h 172.18.0.3 minikube <none> <none>
kubernetes-dashboard kubernetes-dashboard-5c448bc4bf-f9swt 1/1 Running 1 23h 172.18.0.4 minikube <none> <none>
但是我看不到清晰的网络拓扑图,是否可以使用显示网络拓扑kubectl
?
解决方案
This is not possible out of the box with kubernetes (and kubectl) as far as I know. With additional software in your cluster I know about three possiblities with visualization:
- Istio has the possibility to visualize the communication within the mesh with kiali (For reference: https://istio.io/latest/docs/tasks/observability/kiali/)
- The second option is spekt8
- Weavescope comes with agents that gather data and visualizes them
Despite these options others could exist and I would really like to see more options because not everyone wants to add Istio and accept the performance impact just to visualize the pod/network landscape.
And as far as I understand spekt8 it's more about the visualization of relations between Kubernetes resources than about network topology visualization.
Weavescope needs cluster administration rights therefore it isn't advisable to make it public accessible without setting up some form of authentication.
推荐阅读
- java - 选择选项卡时创建每个类的实例 (JTabbedPane)
- ruby-on-rails - Ruby on Rails:从图像请求中剥离文件扩展名并重定向到 404
- html - 未捕获的错误:无法使用带有 p5 和 html 的 MathJax 从给定数据进行回调
- react-native - react-native-elements,帮助在 FormInput 中居中输入文本
- python - Matplotlib 不知从何处绘制未定义的图
- python - 通过引发 404 来保护页面
- javascript - mongodb - 聚合游标计数
- python - 如何使用函数更改返回函数/更改变量?
- java - 嵌套的 LinearLayouts LayoutTransition 动画在子移除时跳转
- dart - 如何从语言代码中获取语言的全名?(例如:从 'en' 到 'English')