Search code examples
azurekubernetesazure-container-serviceazure-aks

Azure AKS 'Kube-Proxy' Kubernetes Node Log file location?


My question is 'probably' specific to Azure.

How can I review the Kube-Proxy logs?

After SSH'ing into an Azure AKS Node (done) I can use the following to view the Kubelet logs:

journalctl -u kubelet -o cat

Azure docs on the Azure Kubelet logs can be found here: https://learn.microsoft.com/en-us/azure/aks/kubelet-logs

I have reviewed the following Kubernetes resource regarding logs but Kube-Proxy logs on Azure do not appear in any of the suggested locations on the AKS node: https://kubernetes.io/docs/tasks/debug-application-cluster/debug-cluster/#looking-at-logs

This is part of a trouble shooting effort related to a Kubernetes nGinx Ingress temporarily returning a '504 Gateway Time-out' when a service has not been accessed / going idle for some period of time (perhaps 5 to 10 minutes) but then becoming accessible on the next attempt(s).


Solution

  • On AKS, kube-proxy runs as a DaemonSet in the kube-system namespace

    You can list the kube-proxy pods + node information with:

    kubectl get pods -l component=kube-proxy -n kube-system -o wide
    

    And then you can review the logs by running:

    kubectl logs kube-proxy-<suffix> -n kube-system