To facilitate later verification of private deployment, a quick Kubernetes cluster setup is required in the internal network environment. Previously, for larger clusters, I typically used Kubeasz or Kubespray. For this small-scale cluster, using kubeadm will be more efficient.
Below is the recorded process for deploying with kubeadm:
Cluster Nodes:
Image Versions:
|
|
I. Basic Environment Setup
1. Install Docker and Configure Hosts
2. Configure /etc/hosts
3. Disable Firewall and Set SELinux
4. Disable Swap
Kubernetes 1.8+ requires disabling swap. If not disabled, kubelet will fail to start by default.
Option 1: Use --fail-swap-on=false in kubelet startup args.
Option 2: Disable system swap.