How can I write kubernetes readiness probe for my spring boot application, which takes around 20 second to startup ? I tried to follow example from Configure Liveness, Readiness and Startup Probes, but I'm not sure how does Kubernetes figure out status code 200 as success
apiVersion: v1
kind: Pod
metadata:
labels:
app: backend
name: liveness-http
spec:
containers:
- name: liveness
image: k8s.gcr.io/liveness
args:
- /server
livenessProbe:
httpGet:
path: /healthz
port: 8080
httpHeaders:
- name: Custom-Header
value: Awesome
initialDelaySeconds: 3
periodSeconds: 3