0

I have a API running on a pod (with kubernetes) it uses OAuth 2.0 with Auzre. When I send get/post request to it from Postman I get the following issue.

503: Service Temporarily Unavailable

And the Postman console says the following:

Warning: Certificate has expired 503: Service Temporarily Unavailable

Now on the pod there was no issue when I created the img and when I check the log with the following command:

kubectl logs (pod name) -n my-test-pod --kubeconfig=kubeconfig.yaml > logs.txt

I don't see any issues nor do I see anything that resembles a stack-trace indicating a issue with the get/post requests.

My questions are:

  1. What could cause this?
  2. Am I looking at the right logs (looking for the IMG stack-trace).

Kind regards.

Mr.Gomer
  • 501
  • 5
  • 14

1 Answers1

0

To access this API you must be entering via the ingress or a load balancer service. The ingress may be terminating the SSL.

If the certificate used by the ingress controller has expired, you will see this error.

Please check the certificate's validity using the command below and install a valid certificate to rectify the issue:

echo | openssl s_client -showcerts -servername <server-fqdn> -connect <server-fqdn>:<ssl_port> 2>/dev/null | openssl x509 -inform pem -noout -text | grep "Before:" -A1

Alternatively, you may want to refer to SO post to disable certificate verification in Postman.

Rakesh Gupta
  • 3,507
  • 3
  • 18
  • 24
  • The is the server address ? – Mr.Gomer Oct 14 '21 at 16:16
  • It is the domain name that you use to access your api – Rakesh Gupta Oct 14 '21 at 16:23
  • When i use your command with the server address and servername and after connect i get : unable to load certificate 14688:error:0909006C:PEM routines:get_name:no start line:../openssl-1.1.1h/crypto/pem/pem_lib.c:745:Expecting: TRUSTED CERTIFICATE – Mr.Gomer Oct 14 '21 at 16:28
  • I also noticed that my postman already had the SSL option turned off? So how come its not working? – Mr.Gomer Oct 14 '21 at 16:32