FS#64777 - [kubectl] Kubectl doesn't report version correctly

Attached to Project: Community Packages
Opened by Neil Green (neilg) - Sunday, 08 December 2019, 18:34 GMT
Last edited by Christian Rebischke (Shibumi) - Saturday, 25 January 2020, 21:55 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 9
Private No

Details

Description: kubectl version reports its version as

Client Version: version.Info{Major:"", Minor:"", GitVersion:"v0.0.0-master+$Format:%h$", GitCommit:"$Format:%H$", GitTreeState:"", BuildDate:"1970-01-01T00:00:00Z", GoVersion:"go1.13.4", Compiler:"gc", Platform:"linux/amd64"}

Note the $Format:% entries and the BuildDate


Name : kubectl
Version : 1.16.3-1
This task depends upon

Closed by  Christian Rebischke (Shibumi)
Saturday, 25 January 2020, 21:55 GMT
Reason for closing:  Fixed
Additional comments about closing:  kubectl-1.17.2-1
Comment by Mansour Behabadi (oxplot) - Monday, 09 December 2019, 10:25 GMT
I confirm this report. I get the same output as the OP.
Comment by Ludovic Fauvet (etix) - Friday, 20 December 2019, 19:04 GMT
Confirmed as well, this is also breaking tools like skaffold:

Starting deploy...
kubectl client version: .
couldn't get kubectl minor version: strconv.Atoi: parsing "": invalid syntax
Comment by Jared Baldridge (jrb) - Friday, 27 December 2019, 02:44 GMT
This also seems to be tripping up minikube:

```
⚠️ /usr/bin/kubectl is version 0.0.0-master+70132b0f13, and is incompatible with Kubernetes 1.17.0. You will need to update /usr/bin/kubectl or use 'minikube kubectl' to connect with this cluster
```
Comment by Ryan Barth (rbar) - Friday, 10 January 2020, 01:21 GMT
Confirmed as well. Breaks Skaffold when attempting to deploy manifests.
Comment by Christian Rebischke (Shibumi) - Saturday, 11 January 2020, 12:13 GMT
Hi everybody,
sorry looks like somebody forgot to assign the bug to me.
I will have a look into this asap.
I guess it has something to do with building kubectl via `go.mod` instead of using the official makefiles.
The problem is that kubernetes makefiles are still not go 13 ready.

Loading...