https://rancher.com/ logo
Title
m

magnificent-vr-88571

06/18/2022, 10:21 PM
Good morning. I have a situation in a cluster with Server & Client version mismatch. Wanted to fix client version mismatch and make client minor version to 21(same as server)
$ kubectl version
Client Version: version.Info{Major:“1”, Minor:“23", GitVersion:“v1.23.6”, GitCommit:“ad3338546da947756e8a88aa6822e9c11e7eac22", GitTreeState:“clean”, BuildDate:“2022-04-14T08:49:13Z”, GoVersion:“go1.17.9”, Compiler:“gc”, Platform:“linux/amd64”}
Server Version: version.Info{Major:“1", Minor:“21”, GitVersion:“v1.21.5+rke2r2", GitCommit:“aea7bbadd2fc0cd689de94a54e5b7b758869d691”, GitTreeState:“clean”, BuildDate:“2021-10-04T22:39:02Z”, GoVersion:“go1.16.7b7", Compiler:“gc”, Platform:“linux/amd64"}
WARNING: version difference between client (1.23) and server (1.21) exceeds the supported minor version skew of +/-1
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
server1 Ready <none> 10d v1.22.9+rke2r2
server2 Ready <none> 10d v1.21.5+rke2r2
server3 Ready,SchedulingDisabled control-plane,etcd,master 58d v1.21.5+rke2r2
I did following steps. 1. Drained server1, 2. rke2-killall.sh in server1 3. Replaced ‘/usr/local/bin/rke2*’ in server1 with server2 binaries 4. started agent in server1 “systemctl start rke2-agent” it became like following.
$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
server1 Ready <none> 10d v1.21.5+rke2r2
server2 Ready <none> 10d v1.21.5+rke2r2
server3 Ready,SchedulingDisabled control-plane,etcd,master 58d v1.21.5+rke2r2
Still it shows client version mismatch. would like to know how to update this Client version mismatch.
$ kubectl version
Client Version: version.Info{Major:“1", Minor:“23”, GitVersion:“v1.23.6", GitCommit:“ad3338546da947756e8a88aa6822e9c11e7eac22”, GitTreeState:“clean”, BuildDate:“2022-04-14T08:49:13Z”, GoVersion:“go1.17.9", Compiler:“gc”, Platform:“linux/amd64"}
Server Version: version.Info{Major:“1”, Minor:“21", GitVersion:“v1.21.5+rke2r2”, GitCommit:“aea7bbadd2fc0cd689de94a54e5b7b758869d691", GitTreeState:“clean”, BuildDate:“2021-10-04T22:39:02Z”, GoVersion:“go1.16.7b7”, Compiler:“gc”, Platform:“linux/amd64”}
WARNING: version difference between client (1.23) and server (1.21) exceeds the supported minor version skew of +/-1
teardown cluster & make again should be my last option :(
c

creamy-pencil-82913

06/18/2022, 11:21 PM
Why are you mucking about with the server when it's your client that is out of date? Update your kubectl binary.
Oh, I see that you are all over the place with multiple versions on different servers as well.
m

magnificent-vr-88571

06/18/2022, 11:27 PM
yeah.. i wanted to downgrade the client so that to sync everything as v1.21.5+rke2r2