Hello @brpaz
The most direct way to resolve this would be to uninstall, then reinstall the integration. Of course, if you customized the recording or alert rules in the “integrations-kubernetes” group, those changes would be lost.
If you’d like to simply replace the rule, here it is, fully rendered from my instance.
{
"name": "k8s.rules",
"file": "integrations-kubernetes",
"rules": [
{
"name": "node_namespace_pod_container:container_cpu_usage_seconds_total:sum_rate",
"query": "sum by(cluster, namespace, pod, container) (rate(container_cpu_usage_seconds_total{image!=\"\",job=\"integrations/kubernetes/cadvisor\"}[5m])) * on(cluster, namespace, pod) group_left(node) topk by(cluster, namespace, pod) (1, max by(cluster, namespace, pod, node) (clamp_max(clamp_min(label_replace(container_start_time_seconds{instance!=\"\"}, \"node\", \"$1\", \"instance\", \"(.*)\"), 1), 1)))",
"labels": {},
"health": "ok",
"lastError": "",
"type": "recording",
"lastEvaluation": "2021-07-07T21:03:03.799414153Z",
"evaluationTime": 0.009059764
}
],
"interval": 60,
"lastEvaluation": "2021-07-07T21:03:03.79939174Z",
"evaluationTime": 0.009086642
}
Also, I experienced the same issue with creating a new rule or rule group in the UI, I’ll look into that.