Score:0

Logs for the communication between Kube API server and ETCD

tn flag

I am trying to understand the internal communication in the cluster for example when creating a 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

The verbose output of kubectl shows the http requests sent to the api-server, so i wanted to check what the api-server do, but the logs of the api-server are not showing anything related to the created pod or requests sent to ETCD. The logs only show the following

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"

I was hoping to find the logs of the communication with the etcd and scheduler for example. Is there any logs for the communication between the api-server and the control plane components ?

in flag
As far as I know, all of the control plane components also honor `--v=` flags, but I don't know that they're going to log _traffic_ as you're requesting. Turning up the similar verbosity of the `etcd` daemons might get you closer, or the ultimate end of recompiling etcd to log what you want
alixander avatar
tn flag
when i add --v=9 to the kube-apiserver, i got indeed more information, but the apiserver still doesn't show logs related to putting objects in the etcd server
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.