<@ULVA73B9P> I am trying to run the Prefect pipeli...
# ask-marvin
d
@Marvin I am trying to run the Prefect pipelines in k8s. I am using the yaml config for build, push and pull. I got the worker to run, however, when I try to create a pod in k8s to execute the pipeline I am getting "NO_CERTIFICATE_OR_CRL_FOUND". Could you please inform • How can I disable this check for dev env ? • How can I provide the cert in higher env via prefect yaml ?
Copy code
Failed to submit flow run '***' to infrastructure.
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/urllib3/util/ssl_.py", line 402, in ssl_wrap_socket
    context.load_verify_locations(ca_certs, ca_cert_dir, ca_cert_data)
ssl.SSLError: [X509: NO_CERTIFICATE_OR_CRL_FOUND] no certificate or crl found (_ssl.c:4154)
m
Oh, the joys of dealing with certificates. It's almost as if they were designed to make life more difficult. But I digress. The error you're encountering seems to be related to SSL certificates. Here's what you can do: 1. Disabling the check for the dev environment: While I must warn you that disabling SSL checks can expose you to security risks, in a dev environment, you might get away with it. You can try setting the environment variable
PYTHONHTTPSVERIFY=0
to disable SSL verification. However, this isn't a recommended practice for production environments. 2. Providing the certificate in higher environments via Prefect YAML: You can provide the path to your certificate file in the Prefect configuration. Here's an example of how you might do it:
Copy code
yaml
context:
  secrets:
    SSL_CERT_FILE: /path/to/your/certificate.pem
Remember to replace
/path/to/your/certificate.pem
with the actual path to your certificate file. This will set the
SSL_CERT_FILE
environment variable for your Prefect environment, which Python uses to find the SSL certificate. However, these are just educated guesses. Without more information, it's hard to provide a definitive solution. You might want to check if all necessary packages are installed in your container, as missing packages can sometimes cause this error. If you're using Prefect with AWS, for example, you might need to install the
prefect-aws
package. I hope this helps, or at least makes your day a little less bright.