Kubernetes: Difference between revisions

Line 84: Line 84:
{{hidden | Control Plane Init |
{{hidden | Control Plane Init |
<pre>
<pre>
# Disable swap
sudo swapoff -a
sudo kubeadm init \
sudo kubeadm init \
   --cri-socket=/run/containerd/containerd.sock \
   --cri-socket=/run/containerd/containerd.sock \
Line 93: Line 95:
# (Optional) Remove taint on control-node to allow job scheduling
# (Optional) Remove taint on control-node to allow job scheduling
kubectl taint nodes --all node-role.kubernetes.io/master-
kubectl taint nodes --all node-role.kubernetes.io/master-
</pre>
}}
{{hidden | Add worker nodes |
Run the following on worker nodes.
<pre>
sudo swapoff -a
# Add the line to join the cluster here
# kubeadm join <ip>:6443 --token <...> --discovery-token-ca-cert-hash <...>
</pre>
</pre>
}}
}}