Welcome to the Linux Foundation Forum!

LFS 258 - Chapter 3 Discussion // Questions // Banter

Tim,

I created 2 VPC instances (Ubuntu 18.04) in GCP - one to serve as the master node and the other as the worker. I finished setting up the master by following the instructions in lab 3.1. The kubeadm command completed successfully and I'm able to see that the node is up and running.

My kubectl get nodes returned this:
NAME STATUS ROLES AGE VERSION
master Ready master 107m v1.18.1

later I set up the worker node by following the instructions in lab 3.2. However when I try to join the worker to the master node, the kubeadm join command, fails with this error:

couldn't validate the identity of the API Server: Get https://k8smaster:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

I checked to make sure that my token is not expired. For both instances, I have created the firewall rule to 'Allow all', Target: 'All instances in the network' and Source ip ranges: 0.0.0.0/0.

Any idea why this issue happens?

Regards
Vijay.

Comments

  • serewicz
    serewicz Posts: 1,000

    Hello,

    Sounds like you checked the things that I would have asked about first, so great! Next I would look at the _ /etc/hosts_ file to ensure the k8smaster alias is pointing to the right IP address. If you use nc is the port open? From the worker the command would be nc k8smaster 6443 If it hangs it means the API server is listening.

    If you could paste the command and any lines of output that have an error, usually with the word error or the message code starts with an E, we can troubleshoot further.

    Regards,

  • Thank you Tim. I realized I made a typo editing the worker's /etc/hosts file while adding the master IPaddress. It works now. Thanks!

  • serewicz
    serewicz Posts: 1,000

    Great! Glad it works.

Categories

Upcoming Training