Debian 10 Buster
Sponsored Link

Kubernetes : Kubeadm : Install2019/08/26

 
Install Kubeadm to Configure Multi Nodes Kubernetes Cluster.
On this example, Configure This example is based on the emvironment like follows.
For System requirements, each Node has uniq Hostname, MAC address, Product_uuid.
MAC address and Product_uuid are generally already uniq one if you installed OS on phisical machine or virtual machine with common procedure. You can see Product_uuid with the command [dmidecode -s system-uuid].
-----------+---------------------------+--------------------------+------------
           |                           |                          |
       eth0|10.0.0.30              eth0|10.0.0.51             eth0|10.0.0.52
+----------+-----------+   +-----------+----------+   +-----------+----------+
|   [ dlp.srv.world ]  |   | [ node01.srv.world ] |   | [ node02.srv.world ] |
|      Master Node     |   |      Worker Node     |   |      Worker Node     |
+----------------------+   +----------------------+   +----------------------+

 
First, Apply Common Settings on All Nodes.
[1]
[2] Change some settings on All Nodes for System requirements.
For IPTables, Kubernetes v1.15 has not supported IPTables version 1.8 yet now (Aug 2019 now), so switch to IPTables Legacy on Debian 10.
root@dlp:~#
swapoff -a

root@dlp:~#
vi /etc/fstab
# comment out for swap line

#
/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0
root@dlp:~#
update-alternatives --config iptables

There are 2 choices for the alternative iptables (providing /usr/sbin/iptables).

  Selection    Path                       Priority   Status
------------------------------------------------------------
* 0            /usr/sbin/iptables-nft      20        auto mode
  1            /usr/sbin/iptables-legacy   10        manual mode
  2            /usr/sbin/iptables-nft      20        manual mode

# select IPTables Legacy
Press <enter> to keep the current choice[*], or type selection number: 1
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in manual mode

root@dlp:~#
cat > /etc/docker/daemon.json <<EOF
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "100m"
  },
  "storage-driver": "overlay2"
}
EOF
root@dlp:~#
systemctl restart docker

[3] Install Kubeadm on All Nodes.
root@dlp:~#
apt -y install apt-transport-https gnupg2 curl
root@dlp:~#
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -

OK
root@dlp:~#
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list

root@dlp:~#
apt update

root@dlp:~#
apt -y install kubeadm kubelet kubectl
# only enabling, do not run yet

root@dlp:~#
systemctl enable kubelet

Matched Content