Search code examples
kubernetesgoogle-cloud-platformgoogle-kubernetes-enginenodes

Facing issue in node registration


While trying to add a node in gke cluster facing error

Error message is

All clusters resources are brought up:but only 0 nodes out of 10 have registered

How to fix this error


Solution

  • As per this official doc this error message demonstrates that the nodes did not successfully register with the cluster.

    The following sections describe some of the potential causes of this error:

    • Instance creation might fail for one of the following reasons: Insufficient quota, Resource availability, Insufficient IP address space.
    • Service account issues : If you delete the service account, disable it, or do not give it the correct permissions, node registration might fail.
    • Network connection to Google APIs and services : The VM instance downloads packages to prepare to run as a GKE node.If an instance cannot connect to these services, it cannot download the Kubernetes distribution and complete the node registration process.
    • Network connection with control plane : Connectivity between the control plane and the nodes is critical for node registration and regular function.

    Using the below log filter you need to Find an instance that failed node registration :

    resource.type="gce_instance"
    logName="projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Factivity"
    protoPayload.requestMetadata.callerSuppliedUserAgent="GCE Managed Instance Group for GKE"
    protoPayload.response.status="RUNNING"
    
    
    Replace PROJECT_ID with the project ID for your cluster.
    

    Follow this troubleshooting doc for step by step process to Find an instance that failed node registration and follow this Troubleshoot an instance with the Node Registration Checker to check the reason. Based on the reason you get follow below docs to resolve this issue.

    If LOGGING, GCR, or GCS are listed as not reachable, check the Service account permissions for node registration and Network connection to Google APIs and services for node registration.

    If Master is listed as not reachable, check the prerequisites for Network connection with control plane for node registration.

    After you resolve all issues preventing successful node registration, refer to Complete node registration after fixing the root cause.

    If the preceding steps don't tell you why node registration failed, refer to Gather information for further investigation.