Fetching contributors…
Cannot retrieve contributors at this time
89 lines (65 sloc) 2.66 KB

Updating Kubernetes

To update Kubernetes, follow these steps:

  1. Make a clean GOPATH, with minikube in it. This isn't strictly necessary, but it usually helps.
mkdir -p $HOME/newgopath/src/
export GOPATH=$HOME/newgopath
cd $HOME/newgopath/src/
git clone
  1. Copy your vendor directory back out to the new GOPATH.
cd minikube
  1. Kubernetes should now be on your GOPATH. Check it out to the right version. Make sure to also fetch tags, as Godep relies on these.
cd $GOPATH/src/
git fetch --tags

Then list all available Kubernetes tags:

git tag

Then checkout the correct one and update its dependencies with:

git checkout $DESIREDTAG
  1. Build and test minikube, making any manual changes necessary to build.

  2. Update godeps

cd $GOPATH/src/
  1. Verify that the correct tag is marked in the Godeps.json file by running this script:
python hack/
-X -X -X

The -X flag should contain the right tag.

Once you've build and started minikube, you can also run:

kubectl version
Client Version: version.Info{Major:"1", Minor:"2", GitVersion:"v1.2.4", GitCommit:"3eed1e3be6848b877ff80a93da3785d9034d0a4f", GitTreeState:"clean"}
Server Version: version.Info{Major:"1", Minor:"3+", GitVersion:"v1.3.0-beta.2", GitCommit:"caf9a4d87700ba034a7b39cced19bd5628ca6aa3", GitTreeState:"clean"}

The Server Version should contain the right tag in version.Info.GitVersion.

If any manual changes were required, please commit the vendor changes separately. This makes the change easier to view in GitHub.

git add vendor/
git commit -m "Updating Kubernetes to foo"
git add --all
git commit -m "Manual changes to update Kubernetes to foo"

As a final part of updating Kubernetes, a new version of localkube should be uploaded to GCS so that users can select this version of Kubernetes/localkube in later minikube/localkube builds. For instructions on how to do this, see