CoreOS + Kubernetes + Vagrant: Dev Environment Setup

Installing single-node kubernetes on your Ubuntu machine

Local Kubernetes installation

This post is a guide to installing a single-node kubernetes on your Ubuntu machine. As opposed to a vanilla kubernetes + virtualbox install, this install features:

  • CoreOS configured and ready to use
  • Local docker registry to cache kubernetes and docker images so that you don’t have to download the Internet everytime you spin up a new VM

Step 1:

Install the following packages:

  • virtualbox
$ sudo apt-get install virtualbox
  • vagrant
$ sudo apt install vagrant
  • nfs-server (required to mount folders from host)
$ sudo apt install nfs-server
  • Install kubectl
$ wget
$ chmod +x kubectl

After this you can start your own instance of virtualbox.

Step 2: Configure Vagrant

To run this VM you need a Vagrantfile and other configuration files. These can be found in this repo.

After cloning, go inside the vagrant folder and modify L64 of Vagrantfile to configure your local path (where the images will be persisted)

64: config.vm.synced_folder "/<path to your kubernetes_local_setup folder>/kubernetes_local_s...

Again, from the vagrant folder (in the cloned repo) and run the following command.

$ vagrant up

This starts our virtualbox VM, and the init script automatically starts downloading the required images and sets up Kubernetes.

Step 3: Configuring kubectl to interact to our kubernetes

From inside vagrant folder in the cloned repository, run the following commands:

$ export KUBECONFIG="${KUBECONFIG}:$(pwd)/kubeconfig"
$ kubectl config use-context vagrant-single

Add backend APIs to your apps in minutes with the Hasura platform. Take it for a spin here:

This post was originally published on 17-June, 2016

Hasura is an open-source engine that gives you realtime GraphQL APIs on new or existing Postgres databases, with built-in support for stitching custom GraphQL APIs and triggering webhooks on database changes.



The Hasura GraphQL Engine gives you realtime, high performance GraphQL on any Postgres app. Now supports event triggers for use with serverless.

Read More