CentOS 7
Sponsored Link

Kubernetes : Kubeadm : Install
2018/04/07
 
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 virtula 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]
Turn to Permissive or Disabled for SELinux, refer to here. (becasue kubelet is not supported yet)
[3]
[4] Change some settings on All Nodes for System requirements.
[root@dlp ~]#
swapoff -a

[root@dlp ~]#
vi /etc/fstab
# disable swap line

#
/dev/mapper/cl-swap swap swap defaults 0 0
[root@dlp ~]#
cat <<EOF > /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
[root@dlp ~]#
sysctl --system

[5] Install Kubeadm on All Nodes.
[root@dlp ~]#
cat <<'EOF' > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
EOF

[root@dlp ~]#
yum -y install kubeadm kubelet kubectl
# only enabling, do not run yet

[root@dlp ~]#
systemctl enable kubelet

 
Tweet