This script sets up the API server on the master nodes. To prepare for this, we pass the Kubernetes subnet and number of master nodes into a variable file and copy this to each master node. A separate kube-apiserver_setup.sh script is copied across to each controller and executed on each controller in a serial order. The kube-apiserver_setup.sh script performs the following actions: A string variable containing the addresses of the etcd servers is generated from the variabels passed earlier. This will be used in a later configuration file. The kube-apiserver binary is downloaded from the upstream project and copied to /usr/local/bin - currently this uses 1.10.3. It should be trivial to update this to use 1.10.4 and 1.10.5. Updating to 1.11.0 will require further work. The required cryptographic material is copied to a newly created directory /var/lib/kubernetes A new /etc/systemd/system/kube-apiserver.service file is created and will read it's configuration from files created later. The /etc/kubernetes/apiserver configuration file is then populated with the necessary data - this will use the etcd server address string generated earlier. The kube-apiserver is then started and enabled, after systemctl daemon-reload has been run (to load in the new kube-apiserver.service file)