Monday 20 July 2020

kubectl and the failing versions

I was seeing the following: -

18:00:24  error: error fetching provider config: parsing time "0" as "Mon, 02 Jan 2006 15:04:05 MST": cannot parse "0" as "Mon"

from a Smoke Test running in Jenkins against a Kubernetes cluster.

In part, the Smoke Test uses kubectl to retrieve nodes, deployments and services.

Long story short, this was an issue of K8s versions.

There was a clue: -

17:59:57  Client Version: v1.18.6

17:59:57  Server Version: v1.16.2+IKS

My cluster is running K8s v1.16.2 whereas the version of kubectl is v1.18.6.

Therefore, there was a 2+ version mismatch between the two.

The problem was relatively simple ...

The Jenkins Pipeline was invoking a Bash script which was running kubectl from the path - which was picking up the default, latest version - v1.18.6 - whereas it should've been running it from the current directory ( via ./kubectl ).

Once I realised this, and remediated it, all was well .......

No comments:

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...