Kubernetes plugins fails with kubernetes > 1.18

The kubernetes agent reports [special_kubernetes] ERROR: Agent exited with code 1: (404) since upgrade to Kubernetes 1.18.

I guess the reason are Changes in the apiserver.

Is there a way to adjust the URI’s manually?

The special agent for kubernetes consists of two files.
First file is inside “~/share/check_mk/agents/special/” - agent_kubernetes
This one only loads the real agent file from “~/lib/python/cmk/special_agents/agent_kubernetes”
Copy the file from “~/lib/python/cmk/special_agents” to “~/local/share/check_mk/agents/special/”, make it executable.
Now you can play around with this agent and your configured kubernetes hosts should use your modified version.

Thank you so far, this was the starting point I was look for.

Unfortunatly I’m not familar with python, but if I see correctly, then the problem is the kubernets lib is not really up2date with API support only up to 1.15.

Update: as one can see here support for 1.16 and 1.18 is on the roadmap. I guess the 1.16 support release resolves this Issue.

we encountered the same issue

we have two clusters one v1.17.4 and v1.18.0, we have the same problem with v1.18.
the old cluster still works.

checkmk is version 1.6.0p8

we updated check_mk to 1.6.0p11, error still persists

The problem lies inside the Python Kubernetes lib.

@KartoffelSalat postet his question on github about this problem

We are facing the same issue how its should be resolved

Until the Python library supports this changed API you have no chance to use it.
You can vote on Github that the problem should be fixed.

1 Like

I am adding a note in the user guide, which notes that this is currently not supported and let our team know about it as well.
Thanks by the way, I was just trying to monitor Kubernetes myself…

1 Like

We’re impacted by this too after upgrading our kubernetes cluster.

Are there any attempts to modify the special agent to not use this python library as a dependency ? Are there any other python bindings that could be used ? or even some plain old requests ? We’re willing to take some time to take a look at this.

We’ll try to hack something in https://github.com/tribe29/checkmk/blob/master/cmk/special_agents/agent_kubernetes.py and the release-12.0 branch