Skip to content

kubectl delete jobs get's rate limited and prints out annoying logs #25704

Closed
@mikedanese

Description

$ kubectl delete job cluster-api                                                                                                                                                                                                           W0516 14:50:06.029318   46013 request.go:627] Throttling request took 91.588501ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-6rtdk
W0516 14:50:06.229352   46013 request.go:627] Throttling request took 139.149563ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-6ubt2
W0516 14:50:06.429350   46013 request.go:627] Throttling request took 139.014956ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-6uzlu
W0516 14:50:06.629218   46013 request.go:627] Throttling request took 135.719182ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-72a53
W0516 14:50:06.829415   46013 request.go:627] Throttling request took 140.180579ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-79iyp
W0516 14:50:07.029420   46013 request.go:627] Throttling request took 136.05077ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-7a0ko
W0516 14:50:07.229330   46013 request.go:627] Throttling request took 139.142785ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-7ab5f
W0516 14:50:07.429420   46013 request.go:627] Throttling request took 134.851916ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-7b1je
W0516 14:50:07.629311   46013 request.go:627] Throttling request took 140.017247ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-7c5yi
W0516 14:50:07.829353   46013 request.go:627] Throttling request took 139.282117ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-7crby
W0516 14:50:08.028555   46013 request.go:627] Throttling request took 135.253588ms, request: DELETE:https://104.197.93.146/api/v1/namespaces/default/pods/cluster-api-7cu7f

This loop is getting rate limited:

errList := []error{}
for _, pod := range podList.Items {
if err := pods.Delete(pod.Name, gracePeriod); err != nil {
// ignores the error when the pod isn't found
if !errors.IsNotFound(err) {
errList = append(errList, err)
}
}
}

cc @soltysh @erictune

Metadata

Assignees

No one assigned

    Labels

    area/kubectlpriority/backlogHigher priority than priority/awaiting-more-evidence.sig/cliCategorizes an issue or PR as relevant to SIG CLI.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions