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
VMware Cloud Foundation 9.1.0.0
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.
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.
Log in to the Supervisor cluster context using kubectl.
Identify the namespace where the VKS cluster resides.
Delete the stale certificate resource: kubectl delete certificate telegraf-<VKS Cluster Name> -n <Namespace>
Delete the corresponding secret resource: kubectl delete secret telegraf-<VKS Cluster Name> -n <Namespace>
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.