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

5/30/2018

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://docs.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).

-- Necevil
azure
azure-container-service
azure-kubernetes
kubernetes

2 Answers

6/1/2018

On the same note as Acanthamoeba's answer the logs for the Kube-Proxy pod can also be accessed via the browse UI interface that can be launched via:

az aks browse --resource-group <ClusterResourceGroup> --name <ClusterName>

The above should pop open a new browser window pointed at the following URL: http://127.0.0.1:8001/#!/overview?namespace=default

Switch to Kube-System Namespace

Once the browser window is open, change to the Kube-System namespace, by selecting that option from the drop down on the left side:

Change Kubernetes namespaces from the drop down on the left menu.

Kube-System namespace is all the way at the bottom of the drop down... and probably requires scrolling.

Choose 'Kube-System' namespace to see kube-proxy pod

Navigate to Pods

From there click "pods" (also on the left hand side menu, below the namespaces drop down) and then click the Kube-Proxy pod:

enter image description here

View Kube-Proxy Logs Click to view logs of your Azure AKS based Kube-Proxy pod, logs button in is in the top right hand menu to the left of "Delete' and 'Edit' just below create:

View Azure AKS Kubernetes Kube-Proxy logs

Other Azure AKS Trouble Shooting Resources

Since you are trying to view the Kube-Proxy logs you are probably trouble shooting some networking issues or something along those lines. Here are some other resources that I used during my trouble shooting tour of my Azure AKS Cluster:

  1. View Kubelet Logs on Azure AKS: https://docs.microsoft.com/en-us/azure/aks/kubelet-logs
  2. nGinx Ingress Troubleshooting: https://github.com/kubernetes/ingress-nginx/blob/master/docs/troubleshooting.md
  3. SSH into an Azure AKS Cluster VM: https://docs.microsoft.com/en-us/azure/aks/aks-ssh
-- Necevil
Source: StackOverflow

6/1/2018

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
-- acanthamoeba
Source: StackOverflow