Reputation: 41
I am learnig google kubernetes engine . I created a kubernetes cluster .
then I typed - kubectl get nodes ,
and it gave me an error of timeout -
E0224 21:30:30.905852 1942 memcache.go:265] couldn't get current server API group list: Get "https://34.31.239.92/api?timeout=32s": dial tcp 34.31.239.92:443: i/o timeout
E0224 21:31:00.906742 1942 memcache.go:265] couldn't get current server API group list: Get "https://34.31.239.92/api?timeout=32s": dial tcp 34.31.239.92:443: i/o timeout
E0224 21:31:30.908240 1942 memcache.go:265] couldn't get current server API group list: Get "https://34.31.239.92/api?timeout=32s": dial tcp 34.31.239.92:443: i/o timeout
E0224 21:32:00.908807 1942 memcache.go:265] couldn't get current server API group
Upvotes: 0
Views: 540
Reputation: 373
This issue manifests when kubectl encounters difficulties in communicating with the cluster control plane.
To rectify this issue, confirm the context where the cluster is configured.
Go to $HOME/.kube/config or run the command kubectl config view to verify the config file contains the cluster context and the external IP address of the control plane.
Set the cluster credentials:
gcloud container clusters get-credentials CLUSTER_NAME \
--location=COMPUTE_LOCATION \
--project=PROJECT_ID
Replace the following:
gcloud container clusters describe CLUSTER_NAME \
--location=COMPUTE_LOCATION \
--project=PROJECT_ID \
--format "flattened(masterAuthorizedNetworksConfig.cidrBlocks[])"
You may also want to refer to this article addressing timeouts with the kubectl command.
Upvotes: 0