Bug 2052980 - kubectl version is not showing expected version details
Summary: kubectl version is not showing expected version details
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.8
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: 4.8.z
Assignee: Maciej Szulik
QA Contact: RamaKasturi
URL:
Whiteboard:
Depends On: 2051626
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-02-10 11:48 UTC by Maciej Szulik
Modified: 2022-06-16 18:23 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2051626
Environment:
Last Closed: 2022-06-16 18:23:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift oc pull 1061 0 None open [release-4.8] Bug 2052980: bump(k8s.io/*) v0.21.9 2022-03-18 12:20:42 UTC
Red Hat Product Errata RHBA-2022:4952 0 None None None 2022-06-16 18:23:57 UTC

Comment 5 Maciej Szulik 2022-05-31 11:05:40 UTC
The latest push should fix this, I applied the same fix as in https://github.com/openshift/oc/pull/1092

Comment 8 RamaKasturi 2022-06-02 06:59:20 UTC
Verified with the payload below and i do not see any warning if client & server versions are same also if server version is one step higher than client version.

[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./kubectl get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.8.0-0.nightly-2022-06-01-233644   True        False         25m     Cluster version is 4.8.0-0.nightly-2022-06-01-233644


[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./kubectl version -o yaml
clientVersion:
  buildDate: "2022-06-01T10:52:06Z"
  compiler: gc
  gitCommit: 7c3760ea7dc4576f62e8b183a622b1ff2e5ce240
  gitTreeState: clean
  gitVersion: v1.21.9
  goVersion: go1.16.12
  major: "1"
  minor: "21"
  platform: linux/amd64
serverVersion:
  buildDate: "2022-05-04T12:09:18Z"
  compiler: gc
  gitCommit: 047f86f8e2212f25394de1c8bad35d9426ae0f4c
  gitTreeState: clean
  gitVersion: v1.21.11+6b3cbdd
  goVersion: go1.16.12
  major: "1"
  minor: "21"
  platform: linux/amd64

[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"7c3760ea7dc4576f62e8b183a622b1ff2e5ce240", GitTreeState:"clean", BuildDate:"2022-06-01T10:52:06Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.11+6b3cbdd", GitCommit:"047f86f8e2212f25394de1c8bad35d9426ae0f4c", GitTreeState:"clean", BuildDate:"2022-05-04T12:09:18Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}

[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"7c3760ea7dc4576f62e8b183a622b1ff2e5ce240", GitTreeState:"clean", BuildDate:"2022-06-01T10:52:06Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.8+c02bd9d", GitCommit:"496de02aacae03fbbd977e802b08b71ca76f390a", GitTreeState:"clean", BuildDate:"2022-04-18T05:31:01Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}

warning is seen for versions  which are two steps higher than client version as shown below:
==============================================================================================
[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"7c3760ea7dc4576f62e8b183a622b1ff2e5ce240", GitTreeState:"clean", BuildDate:"2022-06-01T10:52:06Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5+3afdacb", GitCommit:"3c28e7a79b58e78b4c1dc1ab7e5f6c6c2d3aedd3", GitTreeState:"clean", BuildDate:"2022-05-10T16:30:48Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.21) and server (1.23) exceeds the supported minor version skew of +/-1

[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.10.0-0.nightly-2022-06-01-204608   True        False         48m     Cluster version is 4.10.0-0.nightly-2022-06-01-204608



[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./kubectl version 
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.9", GitCommit:"7c3760ea7dc4576f62e8b183a622b1ff2e5ce240", GitTreeState:"clean", BuildDate:"2022-06-01T10:52:06Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.3+ad897c4", GitCommit:"6f5a5295923a614a4202a7ad274b38b69f9ca8c0", GitTreeState:"clean", BuildDate:"2022-05-19T17:24:45Z", GoVersion:"go1.18", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.21) and server (1.23) exceeds the supported minor version skew of +/-1

Based on the above moving bug to verified state.

[knarra@knarra openshift-client-linux-4.8.0-0.nightly-2022-06-01-233644]$ ./oc get clusterversion
NAME      VERSION                              AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.11.0-0.nightly-2022-05-25-193227   True        False         24h     Cluster version is 4.11.0-0.nightly-2022-05-25-193227

Comment 11 errata-xmlrpc 2022-06-16 18:23:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (OpenShift Container Platform 4.8.43 bug fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:4952


Note You need to log in before you can comment on or make changes to this bug.