We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5b28ff7 + 93fa615 commit b0ca845Copy full SHA for b0ca845
pkg/exploit/k8s_shadow_apiserver.go
@@ -61,7 +61,7 @@ func findApiServerPodInMasterNode(token string, serverAddr string) (string, erro
61
log.Printf("request apiserver uri `%s` error: %v, response: %s", opts.Api, err, resp)
62
return "", errors.New("faild to request api-server.")
63
}
64
- if !strings.Contains(resp, "selfLink") {
+ if !strings.Contains(resp, "selfLink") && !strings.Contains(resp, "kube-apiserver") {
65
log.Println("api-server response:")
66
fmt.Println(resp)
67
return "", errors.New("invalid to list pods, possible caused by api-server forbidden this request.")
0 commit comments