0

I deployed a Kubernetes Cluster on GCP and use Stackdriver for monitoring CPU & memory. Stackdriver does list stats (CPU, memory etc.) for all pods within the cluster except one. This has lasted now for a week and the one missing pod is definitely running. The weird thing is, I cannot see the stats within the stack driver interface, but there are CPU & memory stats in the deployment overview of the GCP.

Additional info:

  • The cluster has 4 nodes
  • The missing pod is running postgres on ubuntu
  • All other pods are running debian

Any ideas?

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Techradar
  • 109
  • 5

1 Answers1

0

I reproduced your case by launching a pod with a Postgres upon Ubuntu container and could see stats in Stackdriver for this pod.

Did you make sure that the container is running correctly and does not restart permanently inside the pod ?

I had the case as the Postgres container was stopping because no action was handled by the container to maintain it alive.
If it is the case you should have a look at the entrypoint of your container and make sure that it launches a long running command unless it will terminate immediately after launching Postgres.

I hope this helps

Django
  • 422
  • 2
  • 5
  • Thanks for your help! I verified that the container is not restarting (restarts 0 in kubectl). What did you do in order to make it log to stackdriver? – Techradar Mar 01 '18 at 15:10
  • I didn't configure anything neither in the pod or in the cluster. The Postgres pod appears in Stackdriver and I can see its CPU and memory usage under Stackdriver monitoring. – Django Mar 01 '18 at 16:37
  • dude thanks for the hint. that brought me one step further. If I search for the pod in the stackdriver I can find it, but when Im trying to create a custom dashboard and search for the respective GKE container in the filter settings of a widget (cpu what so ever) its not listed. Can you confirm that? – Techradar Mar 01 '18 at 17:15
  • You're welcome. When creating a custom dashboard, I can see the chart for my Postgres pod by selecting GKE container and CPU usage in the resource type, and set container_name as filter. – Django Mar 02 '18 at 12:52
  • Please consider accepting my answer if it helped, thanks – Django Mar 09 '18 at 09:23
  • I did, but the thing is its not yet answered as I still cannot see the pod within the dashboards... but as there are no further answers within one week and I got at least the stats with a direct link I'll accept yours! – Techradar Mar 09 '18 at 19:18