Basic recipes using the ansible cloudstack module to create ssh keys, sec group etc and deploy Kubernetes on CoreOS. This setup is to be used for development purposes only, as there are no HA features in place.
You will need Ansible >= 2.0, sshpubkeys and cs :)
$ sudo apt-get install -y python-pip
$ sudo pip install ansible
$ sudo pip install cs
$ sudo pip install sshpubkeys
Create a ~/.cloudstack.ini
file with your creds and cloudstack endpoint, for example:
[cloudstack]
endpoint = https://api.exoscale.ch/compute
key = <your api access key>
secret = <your api secret key>
method = post
We need to use the http POST method to pass the userdata to the coreOS instances.
$ ansible-playbook k8s.yml
Some variables can be edited in the k8s.yml
file.
This will start a Kubernetes master node and a number of compute nodes.
Check the tasks and templates in roles/k8s
.
You will need kubectl
CLI installed, the playbook will configure, set and use a new context automatically.
Then run
$ kubectl get nodes