kubernetesgoogle-cloud-platformgoogle-kubernetes-enginegke-networkingautopilot

Cannot create a cluster: 0 nodes registered


I'm relatively new to Google Cloud Platform (GCP) and currently getting myself with its user interface and various services. While exploring, I encountered an issue while attempting to create an Autopilot cluster. The creation process failed, accompanied by the error message All cluster resources were brought up, but: only 0 nodes out of 2 have registered

Does anyone have some suggestions?

As I mentioned earlier, while exploring the GCP user interface and its services, I encountered an error during the creation of an Autopilot cluster.


Solution

  • Autopilot cluster creation issue generally occurs when the node fails to register. The above mentioned error happens if you are using the service account that is disabled.

    Initially, verify if the default compute engine SA is disabled by using the command

    gcloud iam service-accounts describe <SA>
    

    If it's disabled enable using

    gcloud iam service-accounts enable <SA>
    

    If it's enable and you still seeing the error then grant the least role by using

    gcloud projects add-iam-policy-binding <proj-id> --member "service-accounts:<SA_Name>" --role roles/container.nodeServiceAccount
    

    I hope this helps..!