Kubectl exec <pod> -i -t -- bash -li throws an error

We have an Amazon EKS cluster and worker nodes (4 instances). This was launched using the terraform-awm-eks module.

Recently, we had to upgrade to version 1.12.6 because Amazon was dropping support for 1.10.

We upgraded the EKS cluster using the instructions provided by Amazon, but had to upgrade the kubelet versions to 1.12.6 on the worker nodes manually because of certain application limitations.

However, post the upgrade…we are seeing an error running the kubectl exec command.

C:>kubectl --insecure-skip-tls-verify exec cjoc-0 -i -t – bash -li
Error from server: error dialing backend: x509: cannot validate certificate for 10.0.2.143 because it doesn’t contain any IP SANs

We are new to Kubernetes, any help is appreciated.

Hi Pragya!

Do you get a similar error when communicating with the k8s API server
for other commands (e.g. kubectl get pods) or does this only happen with
the kubectl exec command?

Best,
-jay

Happens only with exec and logs command. get pods and get nodes etc works fine!