<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>The hostname does nothing about node roles.</p>
<p>If you do <code>kubeadm init</code>, the node will be a <code>master</code> node (currently called <code>control plane</code>).</p>
<p>This node can also be used as a <code>worker</code> node (currently called just a <code>node</code>), but by default, Pods cannot be scheduled on the control plane node.</p>
<p>You can turn off this restriction by removing its taints with the following command:</p>
<pre><code>kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl taint nodes --all  node-role.kubernetes.io/control-plane-
</code></pre>
<p>and then you can use this node as both <code>control-plane</code> and <code>node</code>.</p>
<p>But I guess some small kubernetes like <code>k0s</code>, <code>k3s</code>, and <code>microk8s</code> are better options for your use case rather than kubeadm.</p>
