We are experiencing issues with the image-package-extractor-cleanup cronjob created by the GKE Security Posture on a Kubernetes Cluster running v1.25.8-gke.1000.
This cluster has been consecutively upgraded over a longer time and we can not reproduce the issue on a brand new installation with the same Kubernetes version.
"Failed to export metrics to Cloud Monitoring"
"rpc error: code = PermissionDenied desc = Permission monitoring.timeSeries.create denied (or the resource may not exist)."
with stacktrace
google3/cloud/kubernetes/metrics/common/exporter/exporter.(*exporter).exportBuffer
cloud/kubernetes/metrics/common/exporter/export.go:233
google3/cloud/kubernetes/metrics/common/exporter/exporter.(*exporter).Flush
cloud/kubernetes/metrics/common/exporter/export.go:179
google3/cloud/kubernetes/metrics/common/exporter/exporter.(*exporter).Shutdown
cloud/kubernetes/metrics/common/exporter/export.go:191
main.main.func2
cloud/kubernetes/distro/containers/image_package_extractor/er_cleanup/main.go:83
main.main
cloud/kubernetes/distro/containers/image_package_extractor/er_cleanup/main.go:95
runtime.main
third_party/go/gc/src/runtime/proc.go:250
While the job is referring to the ServiceAccount pkgextract-cleanup-service, we can’t see any difference in its configuration between the old and new clusters.
Does anyone have a better understanding of how the authentication against Google Monitoring is realised?