title: resetting restartCount of pods with static names
body: <p>For monitoring purposes, I want to rely on a pod's restartCount. However, I cannot seem to do that for certain apps, as restartCount is not reset even after rebooting the whole node the pod is scheduled to run on.</p>
  
  <p>Usually, restarting a pod resets this, <strong>unless the pod name of the restarted pod is the same</strong> (e.g. true for etcd, kube-controller-manager, kube-scheduler and kube-apiserver).</p>
  
  <p>For those cases, there is a <a href="https://github.com/kubernetes/kubernetes/issues/50375" rel="nofollow noreferrer">longrunning minor issue</a> as well as the idea to use <code>kubectl patch</code>.</p>
  
  <p>To sum up the info there, <code>kubectl edit</code> will not allow to change anything in status. Unfortunately, neither does e.g.</p>
  
  <pre><code>kubectl -n kube-system patch pod kube-controller-manager-some.node.name --type='json' -p='[{"op": "replace", "path": "/status/containerStatuses/0/restartCount", "value": 14}]'
  
  The Pod "kube-controller-manager-some.node.name" is invalid: spec: Forbidden: pod updates may not change fields other than `spec.containers[*].image`, `spec.initContainers[*].image`, `spec.activeDeadlineSeconds` or `spec.tolerations` (only additions to existing tolerations)
  </code></pre>
  
  <p>So, I am checking if anyone has found a workaround?</p>
  
  <p>Thanks!</p>
  
  <p>Robert</p>