Skip to content

How do I troubleshoot nodes that can't join Amazon EKS Anywhere clusters?

7 minute read
0

My Amazon Elastic Kubernetes Service (Amazon EKS) nodes can't join my Amazon EKS Anywhere clusters.

Short description

Before you start to troubleshoot, confirm that your configuration meets the following requirements:

  • You have an administrative machine to run cluster lifecycle operations.
  • Your administrative machine, control plane, and worker nodes are on the same layer 2 network.
  • Your network supports DHCP.
    Note: It's a best practice to configure your network to exclude specific IP addresses for the control plane and worker nodes.
  • You reserved static IP addresses for the control plane endpoint and other cluster nodes and excluded static IP addresses from the DHCP range.
  • Your server has a minimum of two vCPUs, 8 GB RAM, and 25 GB of storage for each node.
  • Your elastic network interface supports a Preboot eXecution Environment (PXE).
  • You have VMware vSphere 7 or 8 and VMware vCenter Server.
  • You have the capacity to deploy 6–10 virtual machines (VMs). Also, you're running a DHCP service in the primary VM network for your workload cluster.
  • Your vSphere network allows access to vCenter Server, and you reserved and excluded the necessary IP addresses from the DHCP.

Resolution

Node registration error

You receive the following error message when you don't apply the AWS IAM Authenticator for Kubernetes configuration map (aws-auth ConfigMap) to a cluster:

"Unable to register node with API server err=Unauthorized."

Note: The configuration map provides the system:bootstrappers and system:nodes role-based access control (RBAC) permissions for nodes to register to the cluster.

To resolve a node registration error, add your AWS Identity and Access Management (IAM) role to the aws-auth ConfigMap.

Unauthorized error

You receive an "unauthorized" error message when you delete a managed node group and the node role entry is subsequently deleted from the aws-auth ConfigMap. You can identify this error when you review the kubelet API requests to the API server in your kubelet logs.

To resolve an unauthorized error, add your IAM role to the aws-auth ConfigMap again.

Kubelet dependency errors

CA file error

You receive the following error message when a node can't retrieve the certificate authority (CA) file from a cluster, or the /etc/eks/bootstrap.sh script runs:

"Failed to construct kubelet dependencies" err="unable to load client CA file /etc/kubernetes/pki/ca.crt: open /etc/kubernetes/pki/ca.crt: no such file or directory."

To resolve a Kubelet dependency error, complete the following steps:

  1. Check the /var/log/cloud-init-output.log stream in your cloud-init logs for the following error message:
    "Connect timeout on endpoint URL: https://eks.us-east-1.amazonaws.com/clusters/vg-xx-uat Exited with error on line 291"

  2. Run the following curl -vk command to verify that you can reach the Amazon EKS API endpoint:

    curl -vk https://eks.us-east-1.amazonaws.com/
  3. Delete the Amazon EKS endpoint.

If you can't reach the endpoint, then take the following actions:

  • For private endpoints, put the node in the same virtual private cloud (VPC) or connected network. Private endpoints aren't publicly accessible.
  • Configure your security groups, route tables, and network access control list (network ACL) for public endpoints. Security groups, route tables, and network ACLs must all allow outbound HTTPS (TCP 443) traffic to the Amazon EKS endpoint. For more information, see VPC and subnet considerations.
  • For nodes in private subnets, make sure that you have a NAT gateway or VPC endpoint for outbound internet access.
  • Set enableDnsHostnames and enableDnsSupport to true in your VPC.
  • Make sure that the DHCP option set includes AmazonProvidedDNS.

Validation errors

You receive the following validation error message when Kubernetes can't find the control plane resource "kubeadmcontrolplanes.controlplane.cluster.x-k8s.io" in the workload cluster:

"Validation failed: kubeadmcontrolplanes.controlplane.cluster.x-k8s.io 'eksa-sit' not found; no CAPI cluster objects present on workload cluster 'eksa-sit'..."

To resolve a validation error, complete the following steps:

  1. Access the control plane node where the kubeadm process is running.

  2. Run the following journalctl command to get troubleshooting information from the kubelet service logs:

    journalctl -u kubelet -f
  3. In the log output, identify the cluster component that's causing the validation error.

Bootstrap token error

You experience a bootstrap token error because of a bug in version 1.0.2 of Amazon EKS Anywhere clusters. For more information, see bootstrap tokens can expire before they can be used if the bootstrap cluster's time is sufficiently behind the workload cluster on the GitHub website.

To resolve this error, see Fix to enable bootstrap secret rotation if the secret itself missing on the GitHub website.

Missing bootstrap token secret error

You can receive an error message when you run the eksctl anywhere upgrade cluster -f cluster.yaml command. The error occurs because a bootstrap token secret is missing because of a bug in the workflow. The bug blocks new nodes that try to join your cluster.

To resolve this error, complete the following steps:

  1. Manually delete your new provisioned machine to refresh the bootstrap token.
  2. When the cluster is in a healthy state, back up the Kubernetes Cluster API (CAPI) and move CAPI components to the management cluster. For instructions, see Cluster upgrade fails with management components on bootstrap cluster.

Internal errors

You receive the following internal error message when the webhook validation service has connectivity issues:

"Error from server (InternalError): Internal error occurred: failed calling webhook..."

To resolve an internal error, complete the following steps:

  1. Run the following kubectl get pods command to find your eks-controller-manager pod:

    kubectl get pods -n kube-system | grep eks-controller-manager
  2. Run the following kubectl logs command to view the logs for the pod:

    kubectl logs eksa-controller-manager-pod-name -n kube-system

    Note: Replace eksa-controller-manager-pod-name with the name of your eksa-controller-manager pod.

  3. Use the information from the log output to troubleshoot the issue.

You receive the following internal error message when the leader election process in the Kubernetes control plane times out:

"Failed to update lock: etcdserver: request timed out failed to renew lease eksa-system/f64ae69e.eks.amazonaws.com: timed out waiting for the condition Error setup problem running manager {'error': 'leader election lost'}..."

You can also receive this error message when the leader election process fails to renew its lease on a resource lock in etcd.

Root causes of the error include network delays, etcd unavailability, or resource contention issues.

To resolve this internal error, delete the eksa-controller-manager pod. A replacement pod starts and moves to the Running state.

Note: Internal errors can happen in versions 1.21 or earlier of Amazon EKS Anywhere clusters. To avoid this error, it's a best practice to update your cluster to the latest Kubernetes version.

PLEG error

You receive the following error message when the Pod Lifecycle Event Generator (PLEG) has an issue:

"PLEG is not healthy: pleg was last seen active."

To resolve a PLEG error, take the following actions:

  • Check for and resolve container runtime latency or timeouts, such as performance degradation, deadlock, or bugs, that occur during remote requests.
  • Avoid too many running pods for host resources or too many running pods on high-specification hosts.
  • Troubleshoot resource issues in the node.

For more information about PLEG, see Pod Lifecycle Event Generator: Understanding the "PLEG is not healthy" issue in Kubernetes on the Red Hat Developer website.

NotReady,SchedulingDisabled error

You get an error when one of the nodes in the Amazon EKS Anywhere cluster is in the NotReady,SchedulingDisabled state. This is because the physical machine that the vSphere VM was running on no longer exists. Your cluster gets stuck in the scaling stage, and your new nodes can't spin up.

To resolve a NotReady,SchedulingDisabled state error, complete the following steps:

  1. Remove the machine's finalizer.
  2. Run the following kubectl delete node command to delete the pending Amazon EKS node and let a new node spin up:
    kubectl delete node your_node_name
    Note: Replace your_node_name with the name of the node that you want to delete.

Related information

What is EKS Anywhere?

Container runtime network not ready

AWS OFFICIALUpdated a year ago