kubectl unable to upgrade connection when under pressure

12/20/2021

In our scenario, kubectl exec is used to evaluate user's code in a container, a script will be executed. The resources of each container is 1C1G limit and 0.5C0.5G request. The following error occurs on some nodes on high concurrency, about 800 users operate at the same time:

timeout 21 kubectl --kubeconfig=/root/.kube/config exec mysql-8140296 bash execEva.sh 

output:
error: unable to upgrade connection: <head>
<title>Error response</title>
</head>
<body>
<h1>Error response</h1>
<p>Error code 501.
<p>Message: Unsupported method ('POST').
<p>Error code explanation: 501 = Server does not support this operation.
</body>

any ideas? Thank you very much

-- frank
kubectl
kubernetes

0 Answers