<p>I am working on setting up a multi-node, multi hardware server Kubernetes Cluster. I am using Calico and Kubeadm.</p>

<p>I used vagrant with ansible and virtualbox to set node accros the network on many hardware servers.
It is working, the nodes joined the master with the join-command using kubeadm.
And the master is recognizing the remote nodes.</p>

<pre><code>vagrant@Server-1-MASTER:~$ kubectl get nodes
NAME                STATUS   ROLES    AGE     VERSION
master              Ready    master   3h37m   v1.18.2
server-1-worker-1   Ready    &lt;none&gt;   3h23m   v1.18.2
server-2-worker-1   Ready    &lt;none&gt;   171m    v1.18.2
server-2-worker-2   Ready    &lt;none&gt;   41m     v1.18.2
</code></pre>

<p>I am facing a configuration issue that I am trying to fix to set rules and access for the worker nodes.</p>

<p><strong>Issue:</strong> 
On the workers, an error occurs </p>

<pre><code>no configuration has been provided, try setting KUBERNETES_MASTER environment variable

</code></pre>

<p>When using kubectl commands</p>

<pre><code>vagrant@Server-1-WORKER-1:~$ kubectl get pods

error: no configuration has been provided, try setting KUBERNETES_MASTER 

environment variable

</code></pre>

<pre><code>vagrant@Server-1-WORKER-1:~$ kubectl get ns

error: no configuration has been provided, try setting KUBERNETES_MASTER 

environment variable

</code></pre>

<p>And the env variable is empty :</p>

<pre><code>vagrant@Server-1-WORKER-1:~$ echo $KUBECONFIG


</code></pre>

<p>I am asking if someone could help me to fix this problem, set the right variable value to build a complete working cluster.</p>

<p>Thank you.</p>

<p>Kubeadm does not automatically setup kubeconfig file on the worker nodes.Copy the kubeconfig file located at <code>/etc/kubernetes/admin.conf</code> from the master nodes over to the worker nodes and set <code>KUBECONFIG</code> environment variable to point to the path of the config file.</p>
