kubectl 1.3.7 for MacOS Sierra

Gerred Dillon
1 min readSep 26, 2016

--

Riding the bleeding edge? Upgrade to Sierra only to find every Go binary on your system was utterly broken?

Binaries compiled with versions of Go prior to 1.7 face unpredictable issues running on MacOS Sierra, including network issues, segmentation faults, and other fun. There is an open issue to get this fixed.

In the meantime, I have made a binary available for Kubernetes 1.3.7 built with Go 1.7.1. I haven’t modified the code in any way, but there’s no reason you should trust me. Fortunately, if you are already using Go, its easy to do yourself!

Clone kubernetes into your GOPATH

$ mkdir $GOPATH/src/github.com/kubernetes
$ cd $GOPATH/src/github.com/kubernetes
$ git clone https://github.com/kubernetes/kubernetes.git
$ git checkout v1.3.7

Fetch the binary dependencies

godep and go-bindata are required to build your own kubectl. Grab them now:

$ go get -u github.com/tools/godep
$ go get -u github.com/jteeuwen/go-bindata/go-bindata

Build!

We’ll use the Makefile to build our artifact.

make all WHAT=cmd/kubectl

After a while, this will dump our binary into ./_output/local/bin/darwin/amd64/kubectl

Copy that into your PATH and you’re done!

This will be fixed soon, but if you don’t want to roll back from MacOS Sierra, its easy to build your own binaries that are fully supported.

Note for Google Container Engine Users

If you’re using a version of kubectl installed with the gcloud command line tool, you may need to uninstall it like I had to. Fortunately, all of your other commands will still work, as kubectl is working off of the contexts available in your global kubeconfig.

--

--