VKS Cluster metrics fail to report in VCF Operations
search cancel

VKS Cluster metrics fail to report in VCF Operations

book

Article ID: 439696

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service VCF Operations VMware vSphere ESXi

Issue/Introduction

Metrics for VKS Cluster objects are not observed in VCF Operations. This issue typically occurs when a VKS Cluster is deleted and then recreated using the same name in the same supervisor namespace.

The following log entry is observed in the envoy container of the metrics aggregator:

YYYY-MM-DDT HH:MM:SSZ E! [agent] Error writing to outputs.http: when writing to [https://<Supervisor Service FQDN>:10093/arc/tkgs/metric] received status code: 406. body

Environment

VMware Cloud Foundation 9.1.0.0

Cause

The Supervisor utilize cert-manager to provision client certificates for the Telegraf agents used in metrics collection. These certificates contain the VKS Cluster UUID in the Common Name (CN) field. When a cluster name is reused in the same namespace, the existing certificate and secret (named telegraf-<VKS Cluster Name>) are not updated. Consequently, the metrics are pushed using a certificate containing a stale UUID, which results in a 406 (Not Acceptable) error at the management proxy.

Resolution

This issue has been resolved in the 9.1.1 release.

To restore metrics collection, the stale cert-manager resources must be deleted to allow for the generation of updated certificates.

  1. Log in to the Supervisor cluster context using kubectl.

  2. Identify the namespace where the VKS cluster resides.

  3. Delete the stale certificate resource: kubectl delete certificate telegraf-<VKS Cluster Name> -n <Namespace>

  4. Delete the corresponding secret resource: kubectl delete secret telegraf-<VKS Cluster Name> -n <Namespace>

  5. Confirm that cert-manager has regenerated the resources: kubectl get certificate,secret -n <Namespace> | grep telegraf

Once the new resources are created, the Telegraf agents will utilize the correct UUID, and metrics will begin to appear in VCF Operations.