All the instructions required to deploy this cluster is recorded in the github repository here. [ Ссылка ]
Checkout the full Kubernetes Certified Administrator course at: [ Ссылка ]
Credits: [ Ссылка ]
We are now ready to deploy the master plane components. We start with the ETCD cluster. We decided to deploy a stacked topology where we deploy ETCD cluster on the master nodes itself. But you may chose to follow the same steps to deploy an external ETCD cluster as well.
We are deploying ETCD as a cluster. We will need to follow the same procedure on all ETCD nodes, in this case all our master nodes. I have established SSH connection to both the master nodes. My SSH client has a feature that helps in simultaneously executing commands on two terminal sessions. SO I type a command in one and it replicates on the others. There are many other solutions for this as well. Or you can just manually execute these on each node. Doesn't really matter.
First we download the ETCD binary. I run this command on both the servers. It downlaods the binaries. Next extract the etcd server.
Then configure the etcd server. We first create the folder structure for ETCD and then move the certificate files and keys we created earlier to the required folder.
For configuring the ETCD server service we need the internal IP address of the VMs. So I'll use this oneliner to fetch that. Or you can just set it manually on each terminal.
Next set the ETCD_NAMe to the hostname of the vm. Just make sure its got the right values.
We now configure the ETCD service. Note that it has the path to the certificate files we created as well as the Ips of the members in the cluster, the master-1 and master-2 nodes.
Just verify its got the correct details on each of them.
Create the service configuration file, reload service daemon and start the service. Check the status of the service and make sure its active. To verify if its working use the ETCDCTL utility and list the members. It should list two members part of the cluster.
Ещё видео!