<p>I have a Kubernetes cluster on GCP that hosts a Flask application and some more services.</p>

<p>Before upgrading the master node to version 1.15 (was 1.14.x) I saw every log from the flask application on Stackdriver's GKE Container logs, now I don't get any log.</p>

<p>Searching through the <a href="https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.15.md" rel="nofollow noreferrer">release notes</a> I noticed that from 1.15 they:</p>

<blockquote>
  <p>disabled stackdriver logging agent to prevent node startup failures</p>
</blockquote>

<p>I'm not entirely sure that's the reason but I'm sure that the logging stopped after upgrading the master and node versions to 1.15, there has been no code change in the application core.</p>

<p>My question is how can I reactivate the logs I saw before?</p>

<p>I actually found the solution, as stated by the release notes, the stackdriver agent actually becomes disabled by default in 1.15.</p>

<p>To activate it again you need to edit the cluster following <a href="https://cloud.google.com/monitoring/kubernetes-engine/installing" rel="nofollow noreferrer">these instructions</a>, setting "System and workload logging and monitoring" under "Stackdriver Kubernetes Engine Monitoring"
After that, I could not use anymore the legacy Stackdriver Monitoring, so I found my logs weren't under the resource "GKE Container" but under "Kubernetes Container".</p>

<p>I also had to update every log-based metric that had a filter on <code>resource.type="container"</code>, changing it to <code>resource.type="k8s_container"</code></p>
