Kubernetes Automated Bash Install Script
Following up on the tutorial about installing Kubernetes and Flannel on Ubuntu, might be useful for some people to automatically install K8s via a bash script. The code below will take care of that. It includes removal of existing Docker and Kubernetes installation (if any), and install fresh copies while updating the hostname, configures Docker to use Systemd as native cgroupdriver. It disables swap, adjusts user privileges, and lastly installs Kubernetes and Flannel while performs a sanity check in the end.
The Kubernetes cluster will automatically start in case of a server reboot. The above script can be found also on Gihub.