Versions Compared

Key

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

...

VMIp Address
k8master192.168.56.100
k8worker1192.168.56.101
k8worker2192.168.56.102


Set Hostname


> sudo vi /etc/hostname

Code Block
k8master

...

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


auto enp0s8
iface enp0s8 inet dhcp


Disable SWAP

> swapoff -va

...

Code Block
...
Your Kubernetes master has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

You can now join any number of machines by running the following on each node
as root:


  kubeadm join 192.168.56.100:6443 --token gi6ugh69sqqp.jufhrmb9rrcxn95cyelc6ct7o3v3uoqp --discovery-token-ca-cert-hash sha256:6c9406ae054946f8f33122a8acf1afb9ae560d8aeffff3969c1f2218e4ddf9bb03b55f52661338d761e8dd68203b738f3e126428cda239db81c2723a7bccba83


Record the kubeadm join command! 


Install Network Plugin

> sudo kubectl apply -f https://docs.projectcalico.org/v2.6/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml

...