title: Sudden pod restart of kubernetes deployment, reason?
body: <p>I'v got microservices deployed on GKE, with Helm v3; all apps/helms stood nicely for months, but yesterday for some reason pods were re-created</p>
  <pre class="lang-sh prettyprint-override"><code>kubectl get pods -l app=myapp  
  
  NAME                     READY   STATUS    RESTARTS   AGE
  myapp-75cb966746-grjkj   1/1     Running   1          14h
  myapp-75cb966746-gz7g7   1/1     Running   0          14h
  myapp-75cb966746-nmzzx   1/1     Running   1          14h
  </code></pre>
  <p>the <code>helm3 history myapp</code> shows it was updated 2days ago (40+hrs), not yesterday (so I exclude possibility someone simply run <code>helm3 upgrade ..</code>; (seems like someone ran a command <code>kubectl rollout restart deployment/myapp</code>), any thoughts how can I check why the pods were restarted?  I'm not sure how to verify it; PS: the logs from <code>kubectl logs deployment/myapp</code> go back only to 3 hours ago</p>
  <hr />
  <p>just for reference, I'm not asking for this command <code>kubectl logs -p myapp-75cb966746-grjkj</code>, with that there is no problem, I want to know what happened to the 3 pods that were there 14 hrs ago, and were simply deleted/replaced - and how to check that.</p>
  <hr />
  <p>also no events on the cluster</p>
  <pre class="lang-sh prettyprint-override"><code>MacBook-Pro% kubectl get events
  No resources found in myns namespace.
  </code></pre>
  <hr />
  <p>as for describing the deployment all there is, is that first the deployment was created few months ago</p>
  <pre class="lang-sh prettyprint-override"><code>CreationTimestamp:      Thu, 22 Oct 2020 09:19:39 +0200
  </code></pre>
  <p>and that last update was &gt;40hrs ago</p>
  <pre class="lang-sh prettyprint-override"><code>lastUpdate: 2021-04-07 07:10:09.715630534 +0200 CEST m=+1.867748121
  </code></pre>
  <p>here is full describe if someone wants</p>
  <pre class="lang-sh prettyprint-override"><code>MacBook-Pro% kubectl describe deployment myapp
  Name:                   myapp
  Namespace:              myns
  CreationTimestamp:      Thu, 22 Oct 2020 09:19:39 +0200
  Labels:                 app=myapp
  Annotations:            deployment.kubernetes.io/revision: 42
                          lastUpdate: 2021-04-07 07:10:09.715630534 +0200 CEST m=+1.867748121
                          meta.helm.sh/release-name: myapp
                          meta.helm.sh/release-namespace: myns
  Selector:               app=myapp,env=myns
  Replicas:               3 desired | 3 updated | 3 total | 3 available | 0 unavailable
  StrategyType:           RollingUpdate
  MinReadySeconds:        5
  RollingUpdateStrategy:  25% max unavailable, 1 max surge
  Pod Template:
    Labels:       app=myapp
    Annotations:  kubectl.kubernetes.io/restartedAt: 2020-10-23T11:21:11+02:00
    Containers:
     myapp:
      Image:      xxx
      Port:       8080/TCP
      Host Port:  0/TCP
      Limits:
        cpu:     1
        memory:  1G
      Requests:
        cpu:      1
        memory:   1G
      Liveness:   http-get http://:myappport/status delay=45s timeout=5s period=10s #success=1 #failure=3
      Readiness:  http-get http://:myappport/status delay=45s timeout=5s period=10s #success=1 #failure=3
      Environment Variables from:
        myapp-myns  Secret  Optional: false
      Environment:
        myenv: myval
      Mounts:
        /some/path from myvol (ro)
    Volumes:
     myvol:
      Type:      ConfigMap (a volume populated by a ConfigMap)
      Name:      myvol
      Optional:  false
  Conditions:
    Type           Status  Reason
    ----           ------  ------
    Progressing    True    NewReplicaSetAvailable
    Available      True    MinimumReplicasAvailable
  OldReplicaSets:  &lt;none&gt;
  NewReplicaSet:   myapp-75cb966746 (3/3 replicas created)
  Events:          &lt;none&gt;
  </code></pre>