Install Ubuntu 16.04 LTS. Kubernetes is developed on 16.04, and has the version of docker supported for kubernetes in its apt repositories.

Note: you want to do this step on all nodes in your cluster before continuing

Disable swap then edit your fstab removing any entry for swap partitions.

  sudo swapoff -a
  sudo vi /etc/fstab
   sudo reboot

install curl

  # just in case
  sudo apt install curl -y

Add Google's apt repository gpg key

  curl -s | sudo apt-key add -

Add the Kubernetes apt repository

  sudo bash -c 'cat </etc/apt/sources.list.d/kubernetes.list
  deb kubernetes-xenial main

Update the package list

  sudo apt-get update

Install the required packages

  sudo apt-get install -y kubelet kubeadm kubectl

docker permissions

  sudo usermod $USER -aG docker
  newgrp docker

we want kuberentes to handle updates, not the os

  sudo apt-mark hold kubelet kubeadm kubectl
Note: k8s doesn't play well with newer versions of docker, so installing makes sure that you won't have any issues

check to see if docker is installed proper

  docker version