The Well Rounded Engineer's Notebook

mspetrovic at gmail dot com

Unusual Kubernetes Container Features

Over the course of the last month I implemented a subset of the REST API for Kubernetes in Java. While studying how the JSON resources serialize and deserialize to Java objects, I noticed some interesting features of Kubernetes that don’t get talked about a lot. Here are a few that caught my eye. A container can mount a Volume that is a Git repository. This is a curious volume type, and it makes me want to do something with it.

Configuring flanneld on Ubuntu for use with Kubernetes

Motivation Different pods on a Kubernetes cluster need an overlay network of some sort to exchange packets. Without an overlay network, a container in one pod cannot get a packet to a container in a another pod. One way to provide this overlay network is to use flanneld. We show how to configure flanneld on Ubuntu 14.04.2 LTS running Kubernetes v1.0.1. The Cluster To illustrate flanneld configuration working with a simple Kubernetes service, we’ll need three machines: one master and two nodes.

Formatting curl output

Sometimes all you need from curl is the HTTP response code $ curl -s -w "%{response_code}" -o /dev/null ; echo 200

Using make to articulate Go builds

Go best practices indicate that code and builds be kept simple. But sometimes we need a bit more in the way of declaratively configured builds. Often one will see build instructions containing nothing more than $ go test $ go build This is great for simple projects, and lacking any other instructions or build script, the reader knows this project tests and builds with those two commands. However, when these projects get used in production support, it’s important to have more information about the build in the final output.