This gist describes how to add Kubernetes customDismensions to the Java agent for Application Insights.
It's supplying the same customDimensions that are provided by the asp.net 6+ instrumentiation, except that not all of those dimensions are available using the Kubernetes Downward API
The supplied app-insights-java.yaml patch file configures customDimensions for the app insights agent using the APPLICATIONINSIGHTS_CONFIGURATION_CONTENT
env var.
This will override your applicationinsights.json configuration file if you were using one.