Giter Club home page Giter Club logo

ansible-aws's Introduction

Ansible playbook to install a development Kubernetes (k8s) cluster on ec2

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.

Prerequisites

You will need Ansible >= 2.0, sshpubkeys and boto

$ sudo apt-get install -y python-pip
$ pip install ansible sshpubkeys boto

Setup ec2

Specify your ec2 credentials with:

$ export AWS_ACCESS_KEY_ID='AK123'
$ export AWS_SECRET_ACCESS_KEY='abc123'

We need to use the http POST method to pass the userdata to the coreOS instances.

Create a Kubernetes cluster

$ ansible-playbook k8s-ec2.yml

Some variables can be edited in the k8s-ec2.yml file. This will start a Kubernetes master node and a number of compute nodes.

Test your cluster

First spawn a tunnel to your master node with:

$ ssh -nNT -L 8080:127.0.0.1:8080 -i ~/.ssh/id_rsa_k8s core@<master-node-ip>

Then run

$ kubectl get nodes

ansible-aws's People

Contributors

hsmade avatar sebgoa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ansible-aws's Issues

Minion file systems are overlay

Hi @Runseb,
I've noticed that the file system of the minions created with ansible-kubernetes is overlay and this does throw some errors when some docker commands are run on them. I also canno find the kubecfg binary on the k8 head. I'm not sure therefore how to test the cluster since kubecfg does not exist.

The module cloudstack_sg_rule was not found in configured module paths

I ran ansible-playbook k8s.yml and got that

TASK [k8s : SSH for k8s] *******************************************************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "The module cloudstack_sg_rule was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem."}
    to retry, use: --limit @k8s.retry

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.