Sunday, February 03, 2019

Tip to Check K8S Core API Https Header and Contents via Kubectl

As we know, K8S core API are Https calls. We can use kubectl --v=8 to get  debug details each https call of the core API. With same way, we can other kubectl commands debug info. ie

$ kubectl --v=8 create  -f ship_v1beta1_frigate.yaml
I0203 23:37:32.108940   21540 loader.go:357] Config loaded from file /home/k8suser/.kube/config
I0203 23:37:32.111815   21540 round_trippers.go:383] GET
I0203 23:37:32.111862   21540 round_trippers.go:390] Request Headers:
I0203 23:37:32.111884   21540 round_trippers.go:393]     Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf
I0203 23:37:32.111906   21540 round_trippers.go:393]     User-Agent: kubectl/v1.10.5+2.0.2.el7 
................. "frigate-sample-test" created

No comments: