dcj / ansible-kubeadm-cluster

An Ansible playbook that implements http://kubernetes.io/docs/getting-started-guides/kubeadm
49 stars 23 forks source link

Dynamic Terraform backend #1

Open VAdamec opened 7 years ago

VAdamec commented 7 years ago

Just as an simple draft (it works for me, but it's limited to my setup with OpenStack) look at fork https://github.com/VAdamec/ansible-kubeadm-cluster/tree/develop

I would suggest at least to add wait step for kube-dns pod and move weave installation before node join to avoid CNI deployment issue.

dcj commented 7 years ago

When I wrote this initially, I was under the impression that step 3 was to join the nodes, and then step 4 was to start/enable the pod network. Either I was mistaken, or it changed later, clearly the order is as you describe. I will make this change, and add the wait for kube-dns per your change.

Thank you for these ideas/contributions!

What I have attempted to do in the latest version is to support existing inventories, and not insist on a custom inventory per cluster. Basically your cluster should be an Ansible group, with child groups of _master and _node. I am not a Terraform user, but presumably you could easily arrange for your Terraform dynamic inventory to provide this simple group structure for your cluster(s), and the latest playbooks then take the cluster_name as an argument/input. If you have any input/comments on this approach please let me know. I can imagine your fork is set up just the way you like now, so unlikely you will change back. No problem.

I also agree that providing a post-install method of installing desired cluster infrastructure is desirable. My initial crack at this is now the cluster-infra.yml playbook, but there is nothing special about it, it is just an initial draft.

Again, thank you for your input, and sharing your ideas and implementation.

dcj commented 7 years ago

Today's commit includes the restructured ordering of tasks and the wait for kube-dns based on your fork.

The new cluster-infra.yml playbook adds the Dashboard and WeaveScope to the cluster...