DEV Community

Wajahat Ali Abid
Wajahat Ali Abid

Posted on

1

Enable ContainerLogV2 on AKS

ContainerLogV2 provides additional data over ContainerLog (which is v1). The additional data includes

  • ContainerName
  • PodName
  • PodNamespace

To enable ContainerLogV2 on an existing AKS cluster, you need to create a configmap. Here's how you do this

  • Download the template ConfigMap YAML file for ContainerLog
  • Set containerlog_schema_version = "v2" in the yaml file
  • Update the exclude_namespaces under log_collection_settings.stdout and log_collection_settings.stderr as per your use case
  • Save the changes
  • Connect to Kubernetes cluster using CLI
kubectx my-cluster
Enter fullscreen mode Exit fullscreen mode
  • Run the following command to create the configmap.
kubectl apply -f container-azm-ms-agentconfig.yaml
Enter fullscreen mode Exit fullscreen mode
  • Done

I hope this helps. Refer to Container insights log schema and Configure data collection in Container insights using ConfigMap for more insights.

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs