The default experience to deploy cloud run for anthos is broken.
This is because cloud run for anthos only seems to work on GKE version 1.22.17-gke.7500
E.g. This will throw a very cryptic "Internal Error" -
$ gcloud container clusters create x-cluster-1 \
--zone=us-central1-a \
--addons=HttpLoadBalancing,CloudRun \
--machine-type=e2-standard-4
Default change: VPC-native is the default mode during cluster creation for versions greater than 1.21.0-gke.1500. To create advanced routes based clusters, please pass the `--no-enable-ip-alias` flag
Default change: During creation of nodepools or autoscaling configuration changes for cluster versions greater than 1.24.1-gke.800 a default location policy is applied. For Spot and PVM it defaults to ANY, and for all other VM kinds a BALANCED policy is used. To change the default values use the `--location-policy` flag.
Note: Your Pod address range (`--cluster-ipv4-cidr`) can accommodate at most 1008 node(s).
Creating cluster x-cluster-1 in us-central1-a... Cluster is being deployed...done.
ERROR: (gcloud.container.clusters.create) Operation [<Operation
clusterConditions: [<StatusCondition
canonicalCode: CanonicalCodeValueValuesEnum(UNKNOWN, 2)
message: 'Failed to create cluster'>]
detail: 'Failed to create cluster'
endTime: '2023-05-21T00:08:26.380281371Z'
error: <Status
code: 2
details: []
message: 'Failed to create cluster'>
name: 'operation-1684627615617-a8ea4a0a-2abb-468d-939c-9f77e4445cbc'
nodepoolConditions: []
operationType: OperationTypeValueValuesEnum(CREATE_CLUSTER, 1)
progress: <OperationProgress
metrics: [<Metric
intValue: 9
name: 'CLUSTER_CONFIGURING'>, <Metric
intValue: 9
name: 'CLUSTER_CONFIGURING_TOTAL'>, <Metric
intValue: 12
name: 'CLUSTER_DEPLOYING'>, <Metric
intValue: 12
name: 'CLUSTER_DEPLOYING_TOTAL'>]
stages: []>
selfLink: 'https://container.googleapis.com/v1/projects/6678571001/zones/us-central1-a/operations/operation-1684627615617-a8ea4a0a-2abb-468d-939c-9f77e4445cbc'
startTime: '2023-05-21T00:06:55.617775716Z'
status: StatusValueValuesEnum(DONE, 3)
statusMessage: 'Failed to create cluster'
targetLink: 'https://container.googleapis.com/v1/projects/6678571001/zones/us-central1-a/clusters/x-cluster-1'
zone: 'us-central1-a'>] finished with error: Failed to create cluster
However, this works -
$ gcloud container clusters create cluster-4 \
--zone=us-central1-a \
--addons=HttpLoadBalancing,CloudRun \
--machine-type=e2-standard-4 \
--cluster-version=1.22.17-gke.7500
Default change: VPC-native is the default mode during cluster creation for versions greater than 1.21.0-gke.1500. To create advanced routes based clusters, please pass the `--no-enable-ip-alias` flag
Default change: During creation of nodepools or autoscaling configuration changes for cluster versions greater than 1.24.1-gke.800 a default location policy is applied. For Spot and PVM it defaults to ANY, and for all other VM kinds a BALANCED policy is used. To change the default values use the `--location-policy` flag.
Note: Your Pod address range (`--cluster-ipv4-cidr`) can accommodate at most 1008 node(s).
Creating cluster cluster-4 in us-central1-a... Cluster is being health-checked (master is healthy)...done.
Created [https://container.googleapis.com/v1/projects/XXXXXX/zones/us-central1-a/clusters/cluster-4].
To inspect the contents of your cluster, go to: https://console.cloud.google.com/kubernetes/workload_/gcloud/us-central1-a/cluster-4?project=XXXXX
kubeconfig entry generated for cluster-4.
NAME LOCATION MASTER_VERSION MASTER_IP MACHINE_TYPE NODE_VERSION NUM_NODES STATUS
cluster-4 us-central1-a 1.22.17-gke.7500 35.224.241.179 e2-standard-4 1.22.17-gke.7500 3 RUNNING
Even when creating a GKE cluster from the google cloud console with "Enable Cloud Run for Anthos" feature enabled, GKE will not warn me about the cluster version, and simply fail with no warning or description.
Hello @devxpy,
Welcome to Google Cloud Community!
The error message suggests that the cluster creation operation has failed. However, I am afraid to say that the provided error message does not provide specific details about the reason for the failure.
In spite of that, there are a few common reasons that could cause cluster creation to fail and one thing I noticed is the the Cloud Run on GKE addon is not available for version 1.23.17-gke.1700 and it requires you to use minor version 1.22 or older [1] which is why the stable version 1.22.17-gke.7500 works perfectly because when I tried to create a cluster without defining the version it uses the Regular channel version 1.25.8-gke.500. But because the Cloud Run on GKE add-on is only available for version 1.22.17-gke.7500 and not 1.25.8-gke.500, it failed.
In addition, you can enable additional debugging: Consider adding the --verbosity=debug flag to your command to enable more detailed debug output. This can sometimes provide additional information about the failure.
To get around the problem, you can declare the version 1.22.17-gke.7500 using the gcloud container clusters create command and then attempt to upgrade the version using the GCP console and choose the stable version that you would like to use for your cluster.