kubectl - what does Client vs Server?

4/2/2020

This is a complete noob question, but I can't figure out. When I type kubectl version into terminal I get:

Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.8", GitCommit:"ec6eb119b81be488b030e849b9e64fda4caaf33c", GitTreeState:"clean", BuildDate:"2020-03-12T21:00:06Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:50:46Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"linux/amd64"}

what exactly is client and server in the context of kubectl? Is former for accessing a remote cluster and latter for running cluster on your own machine?

And one more question: how do I downgrade the version of the server? I followed instructions in the official docs but that only changes the server version. From some googling around I understand that the server version was set by Docker? How do I change it + will it break docker if I do?

Sorry if silly questions - I'm completely new to k8s.

-- datsvscogs
kubernetes

1 Answer

4/2/2020

Kubectl is the client and Kubernetes API Server of the Kubernetes Cluster is the server.

Kubernetes Cluster can be installed on variety of operating systems on local machines or remote systems or edge devices. Regardless of where you install it kubectl is the client tool to interact with the Kubernetes API Server.

Server version depends on what version of the kubernetes software was used while setting up the Kubernetes Cluster and downgrade/upgrade process depends on the tool used to set it up as well.

-- Arghya Sadhu
Source: StackOverflow