<p>I am running a Spring Boot 2.0.0 application inside an OpenShift Pod. To execute the readiness and liveness probe, I am relying on spring boot actuator healthchecks. My application properties file has following properties :</p>
<pre><code>server.address=127.0.0.1
management.server.address=0.0.0.0
server.port=8080
management.server.port=8081
management.endpoints.enabled-by-default=false
management.endpoint.info.enabled=true
management.endpoint.health.enabled=true
management.endpoints.web.exposure.include=health,info
management.endpoint.health.show-details=always
management.security.enabled=false
</code></pre>
<p>Following the related configuration of the readiness and liveness probe.</p>
<pre><code>livenessProbe:
    failureThreshold: 3
    httpGet:
      path: /mmcc
      port: 8081
      scheme: HTTP
    initialDelaySeconds: 35
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 15


readinessProbe:
    failureThreshold: 3
    httpGet:
      path: /jjkjk
      port: 8081
      scheme: HTTP
    initialDelaySeconds: 30
    periodSeconds: 10
    successThreshold: 1
    timeoutSeconds: 15
</code></pre>
<p>My expectation is that my readiness and liveness probe should fail with these random urls, but they are succeeding.
Not sure what i am missing here. kindly help.</p>

ChS
<p>The answer by Simon gave me a starting point and I looked for <code>curl -vvv localhost:8081/jjkjk</code> output.
The URL was redirecting me to the login url so I figured this is because I have spring security in my classpath.
So I added in my properties file :</p>
<pre><code>management.endpoints.web.exposure.include=health,info
</code></pre>
<p>and added</p>
<pre><code>@Configuration
public class ActuatorSecurity extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.requestMatcher(EndpointRequest.toAnyEndpoint()).authorizeRequests()
            .anyRequest().permitAll()
    }

}
</code></pre>
<p>and this resolved my problem by enabling the access to url without credentials.</p>
