0

I've tried to use a readiness probe to check my pod's health while deploying using internal api. Below is my readiness config in deployment yaml,

          readinessProbe:
            initialDelaySeconds: 10
            httpGet:
              host: dev.domain_name.com
              scheme: HTTP
              path: /api/v1/healthCheck
              port: 5050

I don't want the port number here, as my health check path is dev.domain_name.com/api/v1/healthCheck. If I remove the port, am getting the below error.

Deployment.apps "app_name" is invalid: spec.template.spec.containers[0].readinessProbe.httpGet.port: Invalid value: 0: must be between 1 and 65535, inclusive

Is there any way to declare a readiness probe without a port number or any other alternative?

Naveen
  • 103
  • 1
  • 12
  • 1
    well there is always some port used. if your health check is as you said `dev.domain_name.com/api/v1/healthCheck` and assuming you use HTTP protocol, the default port is port `80` – knetsi Sep 28 '22 at 22:37

0 Answers0