In my deployment file, I created liveness
probe and readiness
probe in the following manner:
livenessProbe:
httpGet:
path: /rest/assets/get
port: 4000
httpHeaders:
- name: Authorization
value: Basic cnBjOnUzSGRlM0xvaWI1SGpEcTFTZGVoQktpU1NBbHE=
- name: Accept
value: application/json
initialDelaySeconds: 60 #wait this period after staring fist time
periodSeconds: 30 # polling interval
timeoutSeconds: 30 # wish to receive response within this time period
readinessProbe:
httpGet:
path: /rest/assets/get
port: 4000
httpHeaders:
- name: Authorization
value: Basic cnBjOnUzSGRlM0xvaWI1SGpEcTFTZGVoQktpU1NBbHE=
- name: Accept
value: application/json
Both these probes work fine. However, I also have a GCE ingress controller and health checks corresponding to this are failing.
When I checked the health checks, I saw that it was not created the same as readiness probe. Instead I see this in the description Default kubernetes L7 Loadbalancing health check.
How can I change the health check so that it matches the readiness probe?
For e.g., the health checks have an option of comparing the response to the response field in the health checks.
I would expect a response of "Unauthorized Access" So, I added it in the response field. However, it does not seem to work.