May 2018
Intermediate to advanced
554 pages
13h 51m
English
First, we are going to set up a master, ready for the HA environment. Like the initial step, running a cluster by using kubeadm, it is important to enable and start kubelet on the master at the beginning. It can then take daemons running as pods in the kube-system namespace:
// you are now in the terminal of host for first master$ sudo systemctl enable kubelet && sudo systemctl start kubelet
Next, let's start the master services with the custom kubeadm configuration file:
$ cat custom-init-1st.confapiVersion: kubeadm.k8s.io/v1alpha1kind: MasterConfigurationapi: advertiseAddress: "<FIRST_MASTER_IP>"etcd: endpoints: - "<ETCD_CLUSTER_ENDPOINT>"apiServerCertSANs:- "<FIRST_MASTER_IP>"- "<SECOND_MASTER_IP>"- "<LOAD_BALANCER_IP>" ...