I'm not sure whether this is a role of the stackdriver-metadata-agent but this information is required by the java logging client and it's not available in my cluster.
The k8s cluster is configured with Stackdriver Kubernetes Engine Monitoring and Workload Identity enabled. All agents are running in the kube-system:
stackdriver-metadata-agent-cluster-level-74785fffdd-79b6v 1/1 Running 0 3h46m
The logs show no errors but the information regarding container_name and namespace_id is not available inside the containers:
root@workload-identity-test:/# curl "http://metadata.google.internal/computeMetadata/v1/instance/attributes/" -H "Metadata-Flavor: Google"
cluster-name
root@workload-identity-test:/#
e.g only cluster-name is available but the google-cloud-logging library is looking and for namespace-id and container_name.
I'm not sure whether this is a role of the stackdriver-metadata-agent but this information is required by the java logging client and it's not available in my cluster.
The k8s cluster is configured with Stackdriver Kubernetes Engine Monitoring and Workload Identity enabled. All agents are running in the kube-system:
The logs show no errors but the information regarding container_name and namespace_id is not available inside the containers:
e.g only cluster-name is available but the google-cloud-logging library is looking and for namespace-id and container_name.