2019-06-20 17:44:22 +03:00
|
|
|
# Introduction
|
|
|
|
|
|
|
|
This repository is intended for demo-ing the manual install of kubernetes's components on both master and worker nodes.
|
2019-06-20 21:56:42 +03:00
|
|
|
|
|
|
|
It should be able to get you to a working single master (insecure) kubernetes setup on a set of VMs
|
|
|
|
|
2019-06-20 22:44:37 +03:00
|
|
|

|
2019-06-20 21:56:42 +03:00
|
|
|
|
2019-06-20 17:44:59 +03:00
|
|
|
|
|
|
|
# prerequisites
|
|
|
|
- vagrant
|
2019-06-27 19:53:09 +03:00
|
|
|
- cfssl
|
|
|
|
- cfssljson
|
2019-06-20 17:44:59 +03:00
|
|
|
|
2019-06-27 19:53:09 +03:00
|
|
|
You can run the following command to check if you've missed something (don't worry, it won't install anything on your machine)
|
2019-06-20 21:56:42 +03:00
|
|
|
```sh
|
2019-06-27 19:53:09 +03:00
|
|
|
ansible-playbook kthw-playbook.yml -t check_local_prerequisites -l localhost
|
2019-06-20 21:56:42 +03:00
|
|
|
```
|
|
|
|
|
2019-06-27 19:53:09 +03:00
|
|
|
# setup
|
|
|
|
- run `vagrant up` to start the vms. This will create a master node and 2 worker nodes on your host's network
|
2019-06-20 17:44:59 +03:00
|
|
|
|
2019-06-27 19:53:09 +03:00
|
|
|
- setup a container runtime on the nodes
|
2019-06-20 17:44:59 +03:00
|
|
|
```sh
|
2019-06-27 19:53:09 +03:00
|
|
|
ansible-playbook kthw-playbook.yml -t install_container_runtime -l k8s_nodes
|
2019-06-20 17:44:59 +03:00
|
|
|
```
|
|
|
|
|
2019-06-27 19:53:09 +03:00
|
|
|
- install kubelet, kube-proxy, apiserver, scheduler and native controllers on the master nodes
|
2019-06-20 21:56:42 +03:00
|
|
|
```sh
|
2019-06-27 19:53:09 +03:00
|
|
|
ansible-playbook kthw-playbook.yml -t install_kubernetes_master_components -l masters
|
2019-06-20 21:56:42 +03:00
|
|
|
```
|
|
|
|
|
2019-06-27 19:53:09 +03:00
|
|
|
- install kubelet & kube-proxy on the worker nodes
|
2019-06-20 21:56:42 +03:00
|
|
|
```sh
|
2019-06-27 19:53:09 +03:00
|
|
|
ansible-playbook kthw-playbook.yml -t install_kubernetes_worker_components -l workers
|
2019-06-20 21:56:42 +03:00
|
|
|
```
|
|
|
|
|
2019-06-27 19:53:09 +03:00
|
|
|
- install etcd on the master nodes
|
2019-06-20 21:56:42 +03:00
|
|
|
```sh
|
2019-06-27 19:53:09 +03:00
|
|
|
ansible-playbook kthw-playbook.yml -t install_etcd -l masters
|
|
|
|
```
|