![]() |
||
---|---|---|
inventory | ||
scripts | ||
.gitignore | ||
README.md | ||
Vagrantfile | ||
ansible.cfg | ||
end_goal.plantuml | ||
masters.yml | ||
workers.yml |
README.md
Introduction
This repository is intended for demo-ing the manual install of kubernetes's components on both master and worker nodes.
It should be able to get you to a working single master (insecure) kubernetes setup on a set of VMs
prerequisites
- vagrant
- the scp vagrant plugin :
vagrant plugin install vagrant-scp
- the GNU parallel CLI
- jq
setup
-
run
vagrant up
to start the vms. This will create a master node and 2 worker nodes on your host's network -
run
./scripts/show_cluster_config | tee cluster.config
-
copy the cluster configuration to the nodes:
./scripts/copy_file_to_nodes cluster.config
- install the jq CLI on the nodes so they can read the config
./scripts/run_script_on_nodes install_jq_cli
- setup a container runtime
./scripts/run_script_on_nodes install_container_runtime
- download kubernetes
./scripts/download_kubernetes_binaries $(cat cluster.config | jq -r ".kubernetes_version") ./kubernetes
- download etcd
./scripts/download_etcd_binaries $(cat cluster.config | jq -r ".etcd3_version") ./etcd3
- copy kubelet & kube-proxy on the worker nodes
./scripts/copy_file_to_nodes ./kubernetes/workers worker
./scripts/run_command_on_nodes 'sudo mv ~/workers/* /usr/bin/ && rmdir ~/workers' worker
- copy etcd, kubelet, kube-proxy, apiserver, scheduler and native controllers binaries to the master nodes
./scripts/copy_file_to_nodes ./etcd3 master
./scripts/run_command_on_nodes 'sudo mv ~/etcd3/* /usr/bin/ && rmdir ~/etcd3' master
./scripts/copy_file_to_nodes ./kubernetes/masters master
./scripts/run_command_on_nodes 'sudo mv ~/masters/* /usr/bin/ && rmdir ~/masters' master