Waaaahhh.. what a week. I have trouble joining EC2 instance pod to VirtualBox/VMware master node?!

Hey guys!

Its a network issue here… well… actually I almost joined the pod to a Debian master node(but it doesnt matter).

So here is my problem:

  1. I made 2 free tier AWS instances and installed k8s services.
  2. I used VirtualBox to create master VM.
  3. Copied the EC2 private key to VM, then scp the .kube/config to EC2 instances.
  4. logged to EC2 instances and tried to join the nodes.

But there is a catch… I get this error on the EC2 instance while attempting to join:
https://10.0.2.15:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s

While on the master I have …/kube-systemd/…

Its very weird because the node is in status Ready and when I check the connection “nc -zv 10.0.2.15 6443” then its in “succeeded!”

HOW CAN I CONNECT MY EC2 POD TO VIRTUALBOX VM LTS 22.04 UBUNTU SERVER? PLEASE HELP!