Kubernetes plugins upgrade for kubernetes > 1.18?

Well, thnx for the tip, but in my case it did not work out.

The agent fetches a lot of stuff but then failes with:

Traceback (most recent call last):
  File "./agent_kubernetes", line 9, in <module>
    sys.exit(main())
  File "/omd/sites/ote/lib/python/cmk/special_agents/agent_kubernetes.py", line 1215, in main
    api_data = ApiData(api_client)
  File "/omd/sites/ote/lib/python/cmk/special_agents/agent_kubernetes.py", line 1007, in __init__
    for node in nodes.items
  File "/omd/sites/ote/local/lib/python/kubernetes/client/api/core_v1_api.py", line 1919, in connect_get_node_proxy_with_path
    return self.connect_get_node_proxy_with_path_with_http_info(name, path, **kwargs)  # noqa: E501
  File "/omd/sites/ote/local/lib/python/kubernetes/client/api/core_v1_api.py", line 2020, in connect_get_node_proxy_with_path_with_http_info
    collection_formats=collection_formats)
  File "/omd/sites/ote/local/lib/python/kubernetes/client/api_client.py", line 353, in call_api
    _preload_content, _request_timeout, _host)
  File "/omd/sites/ote/local/lib/python/kubernetes/client/api_client.py", line 184, in __call_api
    _request_timeout=_request_timeout)
  File "/omd/sites/ote/local/lib/python/kubernetes/client/api_client.py", line 377, in request
    headers=headers)
  File "/omd/sites/ote/local/lib/python/kubernetes/client/rest.py", line 243, in GET
    query_params=query_params)
  File "/omd/sites/ote/local/lib/python/kubernetes/client/rest.py", line 233, in request
    raise ApiException(http_resp=r)
kubernetes.client.exceptions.ApiException: (404)

I’m running kubernetes 1.19.

Update:

I forgot to add the --enable-cadvisor-json-endpoints flag in all nodes; just did it on the control-plane node. After I fixed it, it worked :pray: thnx a lot :+1:

Update 2:

Now that the check retrives information, check_mk is not very happy with it, since it reports CRIT - [special_kubernetes] Version: unknown, OS: unknown, Got no information from host, execution time 28.5 sec … which also renders this agent not usable.