Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Build Base VM

Issue the following commands on your vm. The master node will require 2 cores and 2GB memory.

...

Now clone this VM with names:

  • k8master
  • k8worker1
  • k8worker2


Setup Networking on VMs

On the VMs that we have defined, lets get them configured.

VMIp Address
k8master192.168.56.100
k8worker1192.168.56.101
k8worker2

...

192.168.56.102


Set Hostname


> vi /etc/hostname

Code Block
k8master


> vi /etc/hosts

Code Block
127.0.0.1       localhost
127.0.1.1       k8master

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters


Set IP address

Set a static ip address for our host-only interface (enp0s3)


> sudo su

> vi /etc/network/interfaces

Code Block
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
 
 
source /etc/network/interfaces.d/*
 
# The loopback network interface
auto lo
iface lo inet loopback
 
# The primary network interface
auto enp0s8
iface enp0s8 inet dhcp
 
auto enp0s3
iface enp0s3 inet static
        address 192.168.56.100
        netmask 255.255.255.0
        network 192.168.56.0
        broadcast 192.168.56.255


> reboot

Repeat for all VMs

Initialize Master

> kubeadm init

...