This is an Kubernetes installation template for Kubespray
-
All the VMs for deploying Kubernetes needs to be accessible via specific private SSH key
-
Prepare an Ubuntu 16.04 machine for deployment(VM is fine)
Log in the deployment machine and execute the following commands:
$ sudo apt-get update
$ sudo apt-get -y install git
$ cd /tmp
$ git clone https://github.com/godleon/kubernetes-installation-template.git
Put the private SSH access key to /tmp/kubernetes-installation-template/ssh-privkey folder.
The following configurations are necessary to change according to your environment:
- Host Authentication Information
This part includes the authentication information of the hosts which are going to deploy
- Python Interpreter Location
File path of Python Interpreter which is required for Ansible deployment
- Bootstrap OS
default is set to
ubuntu
,modification is needed if different OS is used
Fill out the inventory information of the nodes which are going to deploy Kubernetes. There are two kinds of information is need here:
-
Host information: includes OS hostname and IP address
-
Host Roles (which nodes is belong to master, worker, or ingress)
ingress is not a must
Execute the following commands to start Kubernetes deployment:
$ cd kubernetes-installation-template/
$ bash start.sh
Log in any one of the master nodes you defined in the file /tmp/kubernetes-installation-template/kubespray/hosts.init,kubectl CLI is installed and be able to manage the cluster.