How can I get kubernetes version from source code

1/7/2017

I want to find out which version of kubernetes code I am reading. It spend too much time to build the source code.

-- JJBoooom
kubernetes

1 Answer

1/7/2017

I don't entirely follow your question. If you're building from source, it's not necessary that you're on a given version at all. You're a lot more likely to be "between" versions.

Your best bet is to look at

git describe --exact-match --abbrev=0

It will give you the latest tag before the commit you're on. Tags are likely to indicate versions.

Look at the output of

git tag --list

to see all available tags.

For a more interactive view, you should be able to look through

git log --decorate
-- ffledgling
Source: StackOverflow