Cannot check the log from pods after upgrade kubernetes version

9/14/2021

Before I could use kubectl logs devops2-pdf-xxx to check the log of the pods. But after I upgraded the kubectl version, I could not do that. Thus, seems the service is not running well.

But when I run kubectl describe node, the resource allocation is less than 100%.

kubectl logs xxx:

Error from server: Get "https://aks-agentpool-123456-1:10250/containerLogs/default/devops2-deployment-123456-456/devops2-pdf": dial tcp 10.240.0.5:10250: i/o timeout
-- DaiKeung
azure
kubectl
kubernetes

1 Answer

9/14/2021

There are several options to solve this problem. It is probably related to a closed port:

  • First, check that your port 10250 is open. Similar problem is described here
  • You are using AKS, so check solution described here:

    Make sure that the default network security group isn't modified and that both port 22 and 9000 are open for connection to the API server. Check whether the tunnelfront pod is running in the kube-system namespace using the kubectl get pods --namespace kube-system command. If it isn't, force deletion of the pod and it will restart.

You can also check official Microsoft help page

These timeouts may be related to internal traffic between nodes being blocked. Verify that this traffic is not being blocked, such as by network security groups on the subnet for your cluster's nodes.

or this one.

-- Mikołaj Głodziak
Source: StackOverflow