CentOS 7
Sponsored Link

Kubernetes : Install Kubeadm2015/12/13

 
Install Kubeadm to Configure Multi Nodes Kubernetes Cluster.
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, Configure common settings for all Nodes.
[1]
[2]
[3]
[4] Change settings to apply system requirements on all Nodes.
[root@dlp ~]#
swapoff -a

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

#
/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
[root@dlp ~]#
systemctl enable kubelet

Matched Content