Initialize First Master Node
There is a slight discrepancy between initializing the first master node and additional master nodes
Dependency
Completed the guidance of Kubeadm Setup

The following procedures required root permission. Please switch to root account or execute command with sudo
Enable kubectl auto-completion for bash
Ensure that the kubectl completion script gets sourced in all your shell sessions
Extend shell completion to work with alias-k
Prepare Kube-Vip Configuration
Generate kube-vip manifest
Create a directory for storing the coming config files
Scan and reserve the available IPs for virtual IP address (VIP)
To examine the name of network interface
Set the VIP to the available IP address that will be used for the control plane load balancer VIP
Please revise to your ip address
Set the INTERFACE name to the name of the interface on the control plane(s) that will announce the VIP. In many Linux distributions, this can be found using the ip addr command.
Please revise to your own interface name
Get the latest version of the kube-vip release by parsing the GitHub API. This step requires the Linux packages jq and curl.
Create the alias of kube-vip docker container program
Create APR config file
Customize kube-vip manifest
Edit the kube-vip.yaml to custom the config
Disable svc_enable by set the value to false, to prevent conflict with other service load-balancer in future.
Enable lb_enable, by append lb_enable and lb_port, then set to true and 6443, respectively.
Init Kubernetes cluster
Append master nodes and vip host into hosts file
Hot Fix: Command pre-kubeadm - Use super-admin.conf during kubeadm init
BUG: kube-vip requires super-admin.conf with Kubernetes 1.29 Issue #684
Create kubeadm init configuration file
Initialize the control plane with custom configuration file kubeadm-init.yaml
Hot Fix: Command post-kubeadm - Revert the static pod back to admin.conf after successful kubeadm init
BUG: kube-vip requires super-admin.conf with Kubernetes 1.29 Issue #684
Save the initialized information into text file

Source out KUBECONFIG for root user
Examine master node connectivity
Display the load balancer configuration
Watch things interact with the API server with auto-refresh the connections
Create regular user
Create user for k8suser
Set password for k8suser
Grant sudo privileges
Insert above line into the file
Add user k8suser to the docker group
Check which groups a user belongs to
Switch to user k8suser to manage Kubernetes cluster
Implement Calico Network (CNI)
Create directory to store the manifest file
Download and Apply Calico CNI
Last updated
Was this helpful?