<p>I am using an <code>Ubuntu 22.04</code> machine to run and test Kubernetes locally. I need some functionality like <code>Docker-Desktop</code>. I mean it seems both <code>master</code> and <code>worker</code> nodes/machines will be installed by <code>Docker-Desktop</code> on the same machine. But when I try to install Kubernetes and following the instructions like <a href="https://www.cloudsigma.com/how-to-install-and-use-kubernetes-on-ubuntu-20-04/" rel="nofollow noreferrer">this</a>, at some points it says run the following codes on <code>master</code> node:</p>
<pre><code>sudo hostnamectl set-hostname kubernetes-master
</code></pre>
<p>Or run the following comands on the <code>worker</code> node machine:</p>
<pre><code>sudo hostnamectl set-hostname kubernetes-worker
</code></pre>
<p>I don't know how to specify <code>master</code>/<code>worker</code> nodes if I have only my local Ubuntu machine?</p>
<p>Or should I run <code>join</code> command after <code>kubeadm init</code> command? Because I can't understand the commands I run in my terminal will be considered as a command for which <code>master</code> or <code>worker</code> machine?</p>
<p>I am a little bit confused about this <code>master</code>/<code>worker</code> nodes or <code>client</code>/<code>server</code> machine stuff while I am just using one machine for both client and server machines.</p>

best_of_man
<p>Prerequisites for installing kubernetes in cluster:</p>
<ol>
<li>Ubuntu instance with 4 GB RAM - Master Node - (with ports open to all traffic)</li>
<li>Ubuntu instance with at least 2 GB RAM - Worker Node - (with ports open to all traffic)</li>
</ol>
<p>It means you need to create 3 instances from any cloud provider like Google (GCP), Amazon (AWS), Atlantic.Net Cloud Platform, cloudsigma as per your convenience.</p>
<p>For creating an instance in gcp follow this <a href="https://cloud.google.com/compute/docs/create-linux-vm-instance" rel="nofollow noreferrer">guide</a>. If you don’t have an account create a new account ,New customers also get $300 in free credits to run, test, and deploy workloads.</p>
<p>After creating instances you will get ips of the instance using them you can ssh into the instance using terminal in your local machine by using the command: <code>ssh root@&lt;ip address&gt;</code></p>
<p>From there you can follow any guide for installing kubernetes by using worker and master nodes.</p>
<p>example:</p>
<pre><code>sudo hostnamectl set-hostname &lt;host name&gt;
</code></pre>
<p>Above should be executed in the ssh of the worker node, similarly you need to execute it into the worker node.</p>
