The idea in using Ansible rather than CloudFormation is that it will not fill your production AWS account with all sort of security groups, VPCs, IAM roles and what not that you can not control.
This solution is offering a different approach. You start a bunch of machines and through the Ansible inventory you designate a role to them: etcd, kubernetes master or kubernetes minion.
Other notable features:
- TLS authentication between Kubernetes components.
- AWS cloud provider support.
- DNS add-on
-
Customize
vars-example.yaml
-
Create an inventory file with four groups:
[etcd]
: nodes that will be set up as an auxiliary etcd cluster to serve the kubernetes cluster.[master]
: contains a single node which will be the Kubernetes master.[minions]
: one or more minion nodes.[coreos]
: union of all the above CoreOS machines (so they can be bootstrapped):
[coreos:children]
master
etcd
minions
- Run:
$ ansible-playbook -i ./inventory -e @/path/to/customized-vars.yaml provision.yaml
- Then ssh to your master, and you should be able to start exploring:
$ /opt/local/bin/kubectl get pds
$ /opt/local/bin/kubectl get nodes