Kubectl mismatch version between client and server result in stuck pods in Termination

7/17/2018

What happened: Installed kubctl-cli throgh brew. At the time on my pc kubectl version version was 1.11.0 and the server was 1.9.3. While I was working on my cluster I tried to delete a pod named X, the command got stuck so I had to stop it (ctrl+c) and pod X got stuck in a Termination state. I tried to SSH into the hosted node and manually delete the pod but no success, also tried th delete the pod with --force and/--period 0/--now.

Is there a way I can remove the pod?

What you expected to happen:

Pod X was deleted successfully from the cluster

How to reproduce it (as minimally and precisely as possible):

Install kubctl-cli version 1.11.0 on server 1.9.3

Environment:

Cloud provider or hardware configuration:
AWS using kops
Kernel (e.g. uname -a):
Darwin h-MacBook-Pro-sl-ido.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
-- ido
kubectl
kubernetes

1 Answer

7/18/2018

I provided the answer to same problem:

From documentation

a client should be skewed no more than one minor version from the master, but may lead the master by up to one minor version. For example, a v1.3 master should work with v1.1, v1.2, and v1.3 nodes, and should work with v1.2, v1.3, and v1.4 clients

-- Nick Rak
Source: StackOverflow