<p>When trying to enable <code>kubernetes</code> rolling update with following configurations, newly created pod shows <code>HTTP probe failed with statuscode:401</code></p>

<p>configurations:</p>

<pre><code>spec:
  replicas: 1
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 25%
      maxSurge: 1

containers:
          imagePullPolicy: Always
          readinessProbe:
            httpGet:
              path: /actuator/health
              port: 8065
            initialDelaySeconds: 20
            periodSeconds: 5
            successThreshold: 1
</code></pre>

<p>Error on newly created pod:</p>

<pre><code>Warning  Unhealthy         0s (x2 over 5s)        kubelet, aks-agentpool-26902276-0  Readiness probe failed: HTTP probe failed with statuscode: 401
</code></pre>

<p>And from the logs it can be seen that both new pod and both pods are running.</p>

<p>What could be the possible reason to receive HTTP 401 for readiness call? As per my understanding this is a internal call within Kubernetes and doesn't involve authentication. Pod is a <code>Spring Boot</code> application</p>

<p><a href="https://www.baeldung.com/spring-boot-actuators" rel="nofollow noreferrer">As Explained here</a>, there is no need to authorize requests to spring /health endpoint and it works fine when running application locally. (I can get http 200 response from this endpoint)</p>

<blockquote>
  <p>By default only health information is shown to unauthorized access
  over HTTP</p>
</blockquote>

Channa
<p>In my case issue was not adding <code>spring-boot-starter-actuator</code> dependency</p>

<pre><code>   &lt;dependency&gt;
        &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
        &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
    &lt;/dependency&gt;
</code></pre>
