Kube API 服务器与 ETCD 之间的通信日志

Kube API 服务器与 ETCD 之间的通信日志

我正在尝试了解集群中的内部通信,例如在创建 pod 时。

root@kmaster-0:# kubectl -v=7 -n mynamespace run mypod --image=nginx
I0903 11:01:06.368969  594516 loader.go:372] Config loaded from file:  /root/.kube/config
I0903 11:01:06.372708  594516 round_trippers.go:432] POST https://192.168.178.111:6443/api/v1/namespaces/mynamespace/pods?fieldManager=kubectl-run

kubectl 的详细输出显示了发送到 api-server 的 http 请求,所以我想检查 api-server 做了什么,但 api-server 的日志没有显示与创建的 pod 或发送到 ETCD 的请求相关的任何内容。日志仅显示以下内容

root@kmaster-0:~# kubectl -n kube-system logs kube-apiserver-kmaster-0
I0903 11:00:52.122893       1 clientconn.go:948] ClientConn switching balancer to "pick_first"
I0903 11:00:57.184420       1 controller.go:611] quota admission added evaluator for: namespaces
I0903 11:01:27.124960       1 client.go:360] parsed scheme: "passthrough"
I0903 11:01:27.125577       1 passthrough.go:48] ccResolverWrapper: sending update to cc: {[{https://127.0.0.1:2379  <nil> 0 <nil>}] <nil> <nil>}
I0903 11:01:27.125838       1 clientconn.go:948] ClientConn switching balancer to "pick_first"
I0903 11:02:11.820307       1 client.go:360] parsed scheme: "passthrough"
I0903 11:02:11.820465       1 passthrough.go:48] ccResolverWrapper: sending update to cc: {[{https://127.0.0.1:2379  <nil> 0 <nil>}] <nil> <nil>}
I0903 11:02:11.820892       1 clientconn.go:948] ClientConn switching balancer to "pick_first"
I0903 11:02:42.852719       1 client.go:360] parsed scheme: "passthrough"
I0903 11:02:42.852810       1 passthrough.go:48] ccResolverWrapper: sending update to cc: {[{https://127.0.0.1:2379  <nil> 0 <nil>}] <nil> <nil>}
I0903 11:02:42.852833       1 clientconn.go:948] ClientConn switching balancer to "pick_first"

例如,我希望找到与 etcd 和调度程序通信的日志。是否有 api-server 和控制平面组件之间通信的日志?

相关内容