docs/kube-cluster
G.J.C. Strikwerda f1ba34f49b kubernetes ala Ger 2018-10-26 10:41:46 +02:00
..
README.md kubernetes ala Ger 2018-10-26 10:41:46 +02:00
Vagrantfile kubernetes ala Ger 2018-10-26 10:41:46 +02:00
etc.hosts kubernetes ala Ger 2018-10-26 10:41:46 +02:00
fire_stop.sh kubernetes ala Ger 2018-10-26 10:41:46 +02:00
hosts kubernetes ala Ger 2018-10-26 10:41:46 +02:00
kube-dependencies.yml kubernetes ala Ger 2018-10-26 10:41:46 +02:00
master.yml kubernetes ala Ger 2018-10-26 10:41:46 +02:00
workers.yml kubernetes ala Ger 2018-10-26 10:41:46 +02:00

README.md

kubernetes ala Ger:

1 Vagrantfile for provisioning 3 clean CentOS7 virtualbox vm's:

Vagrantfile:

  • master.ger.test (master-node)
  • worker1.ger.test (worker-node)
  • worker2.ger.test (worker-node)

kube-depencies.yml: installing kubernetes depencies on all the nodes: master.yml : containing the setup of the kubernetes-cluster on the master: worker.yml : containing setup of workers/joining the cluster

  • /etc/hosts: host-file

hosts: ansible hosts info

Use:

provision nodes:

$ vagrant --instance=kubernetes

install depencies:

$ ansible-playbook -i hosts ./kube-dependencies.yml

install master-node:

$ ansible-playbook -i hosts ./master.yml

install worker-nodes:

$ ansible-playbook -i hosts ./workers.yml

klaar:

$ ssh ger@master

[ger@master ~]$ kubectl get nodes NAME STATUS ROLES AGE VERSION master.ger.test Ready master 2d v1.12.1 worker1.ger.test Ready worker 47h v1.12.1 worker2.ger.test Ready worker 47h v1.12.1

possilbe extras:

/etc/sysconfig/kubelet: KUBELET_EXTRA_ARGS=--runtime-cgroups=/systemd/system.slice --kubelet-cgroups=/systemd/system.slice

label node: kubectl label node worker1.ger.test node-role.kubernetes.io/worker=worker