找到相關呼叫的簡單方法是使用具有較高冗長級別的相關kubectl
命令(--v=6
或--v=9
)。
#~ kubectl delete deployment nginx-deployment --v=6
I1201 12:26:16.511683 6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 50 milliseconds
I1201 12:26:16.568980 6235 round_trippers.go:318] PUT https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 50 milliseconds
I1201 12:26:17.621751 6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 50 milliseconds
I1201 12:26:17.680228 6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets?labelSelector=app%3Dnginx 200 OK in 50 milliseconds
I1201 12:26:17.738684 6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 56 milliseconds
I1201 12:26:18.790243 6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 49 milliseconds
I1201 12:26:18.843446 6235 round_trippers.go:318] PUT https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 50 milliseconds
I1201 12:26:18.894538 6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 49 milliseconds
I1201 12:26:19.946417 6235 round_trippers.go:318] GET https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 49 milliseconds
I1201 12:26:20.001367 6235 round_trippers.go:318] DELETE https://XXX/apis/extensions/v1beta1/namespaces/default/replicasets/nginx-deployment-4087004473 200 OK in 53 milliseconds
I1201 12:26:20.055669 6235 round_trippers.go:318] DELETE https://XXX/apis/extensions/v1beta1/namespaces/default/deployments/nginx-deployment 200 OK in 53 milliseconds
不錯,labelSelector是絕招,非常感謝! – stibi