Kubectl Command Gives a Delayed Response

Problem

  • The kubectl commands takes time to show the outputs.
  • The below errors could be seen when run using --v=8 option.
Bash
Copy

Environment

  • Platform9 Managed Kubernetes - All versions

Cause

  • While querying for the requested resource using kubectl commands, it also queries the metrics services to validate few things before giving the actual outputs.
  • The query to metrics service holds a timeout of 5003 milliseconds(5seconds) and retries 2 times during the kubectl call as seen above.
Bash
Copy
  • If the metrics service is unavailable due to some reason/issues, the total timeout adds up to 10 seconds, causing the actual output to return after ~15 seconds.

Resolution

  • Check the status of the resources associated with metrics apiservice.
  • The issue could be with any of the metrics resource. Below commands could be used to troubleshoot in respective direction.
Bash
Copy
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches