-1

just setup a 3 node cluster on gke and attempted to use kubectl run to deploy a container.

I get

error: failed to discover supported resources: unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: an error on the server ("service unavailable") has prevented the request from succeeding

1 Answers1

0

The error suggests that the cluster might be in an upgrading state.

For that, you can use the Google SDK and determine if it's being upgraded:

gcloud container clusters describe CLUSTER_NAME --zone ZONE/--region REGION

If not, check that you're actually pointing your kubectl tool to correct cluster:

kubectl config current-context

gcloud has the advantage that it can automatically configure your kubectl client:

gcloud container clusters get-credentials CLUSTER_NAME --zone ZONE/--region REGION

If the cluster is being in that state for quite a long time (usually several hours), there might be an error in the cluster backend (since GKE is a managed implementation of Kubernetes). If that's the case, you might want to reach out to support to review your case.

yyyyahir
  • 265
  • 1
  • 6