Public | Automated Build

Last pushed: a year ago
Short Description
Build an automated k8sdeployer image
Full Description


Setup k8s on existing Ubuntu 16.04 boxes using kubeadm, docker and ansible


The main intent of this project is to setup a docker based development environment
for Kubernetes with existing Ubuntu 16.04 installations.
It uses the newer kubeadm based deployment. Assuming the following workflow for
a k8s developer:

To auto spin up VMs and deploy k8s in it

  1. git clone
  2. ./
    This should build the image localhost/k8sdeployer which does all the hard
    work of setting up an environment to deploy kubernetes on the specified
    Ubuntu 16.X nodes. It also spins up VMs using Vagrant/Virtualbox,
    sets up the RSA keys and deploys k8s in it

To make it work with existing Ubuntu installations

  1. Edit the inventory.yml file and update the fields
  2. Copy the id_rsa and files needed to communicate with the Ubuntu
    boxes under the ssh_config folder
  3. Edit the script and comment the line that does the vagrant up
    This will be made automatic in the script, but manual for now
  4. Run the script to bring up a container with name "deployer" that
    runs a script to setup the k8s deployment and tail the logs. Once this is done,
    it shows the Kubernetes cluster details and the developer could then:

    docker exec -it deployer /bin/bash
    to shell into the container and start using it. As a convenience, the deployer
    is configured with kubectl and helm tools


  • Git
  • Docker (tested with v1.12.3)
  • Linux shell
    (additional requirements if you want the VMs to be created locally)
  • Virtualbox (5.1.8 or later)
  • Vagrant (1.8.7 or later)

Tip: creating RSA key/pair

ssh-keygen -t rsa

For a simple dev test, just accept all defaults when prompted. This should create two
files in your ~/.ssh folder:
id_rsa => this is the private key

Tip: enabling passwordless access to the Ubuntu boxes using the above keys

ssh-copy-id user@IP of the Ubuntu box

when prompted, enter the password. This should copy the public key to the remote box
to enable passwordless ssh. To verify, do a ssh again:

ssh user@IP



How the deployer works?


Docker Pull Command
Source Repository