You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some metrics labels (like resource.labels.instance_id in my case) are longer than 63 characters and have forbidden characters like slashes which makes filtering by those labels impossible and thus whole v1beta1.external.metrics.k8s.io service unusable for big number of external metrics.
If I run this with simpler labels like resource.labels.region I will get external metrics for all redis instances in the region as expected:
Problem is if I want to select metric for specific redis instance using resource.labels.instance_id label that is not in allowed format then I get error:
kubectl get --raw "/apis/external.metrics.k8s.io/v1beta1/namespaces/*/redis.googleapis.com|stats|network_traffic?labelSelector=resource.labels.instance_id=projects/test-project/locations/europe-west3/instances/staging" | jq .
Error from server (BadRequest): unable to parse requirement: values[0][resource.labels.instance_id]: Invalid value: "projects/test-project/locations/europe-west3/instances/staging": must be no more than 63 characters; a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')
This makes horizontal pod autoscaling based on external metric impossible if you want to scale pods based on metrics from specific redis instance in the google cloud project.
The text was updated successfully, but these errors were encountered:
Some metrics labels (like
resource.labels.instance_id
in my case) are longer than 63 characters and have forbidden characters like slashes which makes filtering by those labels impossible and thus wholev1beta1.external.metrics.k8s.io
service unusable for big number of external metrics.If I run this with simpler labels like
resource.labels.region
I will get external metrics for all redis instances in the region as expected:Problem is if I want to select metric for specific redis instance using
resource.labels.instance_id
label that is not in allowed format then I get error:This makes horizontal pod autoscaling based on external metric impossible if you want to scale pods based on metrics from specific redis instance in the google cloud project.
The text was updated successfully, but these errors were encountered: