Kubernetes version: 1.27.3
Cloud being used: bare-metal
Installation method: via kubeadm --config …
Host OS: Ubuntu 20.04.6 LTS (Master Node)
CNI and version: flannel 0.22.0
CRI and version: cri-dockerd 0.3.4
I’ve launched my K8s cluster and applied some test deployments (nginx).
All pods work fine, and all pods and services are accessible.
But I can’t execute commands in Pod`s containers via kubectl exec:
kubectl exec -it nginx-deployment-74b6b979f-9rpmv -- bash
error: An internal error occurred: error executing command in container: http: invalid Host header
If I have created another working node - result will be the same.
If I try to execute a command by docker
docker exec -it ... - it works fine.
I suggested that the problem may lie at the cri-dockerd or cgroupdriver, but I’ve checked all those settings: I use cri-docker and I set systemd as cgroup driver both in the Kubelet and the Docker daemon.
I’m glad to get some helpful tips for debugging this tricky and annoying problem.