DotnetCore Linux Container inside Kubernetes unable to Query External Partner API Endpoint

Viewed 123

Environment: Azure Kubernetes Cluster

Container: Dotnetcore 2.2 Linux

The dot-net core application was able to query the external partner API endpoint but suddenly it started throwing the below is the mentioned exception

ExceptionId: c6c603bb-91cc-4556-98bf-d747903f522a. Error Message: The SSL connection could not be established, see inner exception.. Error Details: System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

Also tried the curl command from inside busybox pod and getting this error

Curl command : curl --location --request GET 'external url' --header 'Authorization: token'

Error: curl: (60) SSL certificate problem: certificate has expired More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle" of Certificate Authority (CA) public keys (CA certs). If the default bundle file isn't adequate, you can specify an alternate file using the --cacert option. If this HTTPS server uses a certificate signed by a CA represented in the bundle, the certificate verification probably failed due to a problem with the certificate (it might be expired, or the name might not match the domain name in the URL). If you'd like to turn off curl's verification of the certificate, use the -k (or --insecure) option.

Note: Other partner API calls are working fine, except this particular partner but the curl from the local system is working. From Pod, it is throwing an error.

What can be the issue:

  1. External partner SSL expired. Which the partner is saying that it has not
  2. External partner SSL is cached and now invalid in Kubernetes
  3. Kubernetes configuration is the problem. What can be the correct one
0 Answers
Related