none
microservice logging on azure kubernetes service - what is the best practice RRS feed

  • Question

  • We are new to Azure kubernete service area and so this question might be a easy one : 
    We are deploying spring-boot microservices to AKS . Now we are not sure of the logging architecture .Whereas we have understood that azure monitor for the container will provide the container health , we are not sure about the logging architecture . For containerized application , where is the centralized logging happens ? how the individual pod specific log can be redirected to a central logging location so that hitorical log files can be accessed ? 
    We are looking for a direction here .
    Thursday, September 12, 2019 8:34 AM

All replies

  • Hi Rubenso,

    Azure monitor for containers collects logs also.

    Let look at how we can enable/ see the logs from portal.

    You can go to the kubernetes services blade and select your cluster.

    Then select the logs under monitoring as shown in the below screenshot.

    If the logs are not enables, Then select a log analytics workspace and the enable it.

    Later you can query all the container logs from that work space.

    Let me know if you have more questions on this.

    Thursday, September 12, 2019 10:45 AM
    Moderator
  • Dear jakaruna,

    Thanks for the response . What will be the logpath for the microservices then ? it has to be pointing to the log workspace correct ?  Are you saying logs from all the pods will be collated in the single log analytics workspace ? 


    • Edited by rubenso123 Thursday, September 12, 2019 11:03 AM
    Thursday, September 12, 2019 11:02 AM
  • Hi,

    Please find my answers inline.

    Question: What will be the logpath for the microservices then ?

    That should be under "Containerinsights" in the log analytics workspace.

    Question: it has to be pointing to the log workspace correct ? 

    Correct. We need to select a log analytics workspace

    Question: Are you saying logs from all the pods will be collated in the single log analytics workspace ? Yes.  I will check and provide the info about how to segregate the logs of different containers with queries.

    Friday, September 13, 2019 12:40 PM
    Moderator
  • Hi,

    Is there any update?

    Did the above suggestions help

    Wednesday, September 18, 2019 8:38 AM
    Moderator
  • Hello Ruben,

    Any update on this issue?

    If the suggested answer helped you solve your issue, please remember to "Mark as Answer" and "Up-Vote"so others in the community can benefit from it.

    Thanks.
    Tuesday, September 24, 2019 6:36 AM
    Moderator
  • Dear Vikas,

    I have the loganalytics workspace setup but the container logs are not there. what is the step missing? 

    Tuesday, October 1, 2019 7:22 AM
  • HI,

    Can you see the list of kubernetes services in the log analytics work space in the below path?

    <log analytics workspace> -> Containerinsights -> kubeservices

    Please check and confirm

    Tuesday, October 1, 2019 12:21 PM
    Moderator
  • Hi,

    I checked with my cluster.

    By default the logs are not populated for the default pods which comes up during cluster creation(like kube proxy , tunnel front)

    Try to deploy some pods after cluster creation and then check in the log analytics. If your cluster and the log analytics workspace are in different regions, You may experience some delay in the logs processing.


    Monday, October 7, 2019 6:41 AM
    Moderator
Internal Server Error
Internal Server Error

Sorry, we were unable to service your request. Please try again later.

For the latest headlines and to see what's new, visit the MSDN home page.

Check out the various MSDN Developer Centers where you can find the latest product information, technical resources and community offerings. Visit the MSDN Library for the latest technical articles, reference documentation, downloads and more.

Browse to MSDN Forums to get fast answers for technical questions or use the search option below to find out other relevant resources.