Issue syncing k8s_source.yaml to PostgreSQL DB due to missing config file

Hi,

I’m currently working with Kubernetes (K8s) to retrieve a list of container image details. I’ve written a Python script that generates a k8s_source.yaml file. However, I’m encountering an issue when attempting to sync this data to a PostgreSQL DB in our development environment.

When I try to sync this data with the additional sudo command, I receive an error indicating that the configuration file is not present, even though I can see the config file in the expected location.

This issue has only arisen recently, as the script was functioning correctly until the day before yesterday. I’m currently unable to determine the root cause of the problem.

For your reference, I’ve attached some screenshots that illustrate the errors I’m encountering:

  1. Error while the K8s_Source file.
  2. Error while running using the sudo command.
  3. Config file data.
  4. Config file location.
  5. EKS get nodes command output.

Could anyone please assist me in resolving this issue?

Thank you in advance for your help.

Best regards.

Hi @known-yeti,

Could you try to create a minimal reproducible scenario we can follow to reproduce the issue? You can post it via a bug report here.

Looking at the images, it’s hard to figure out the underlying issue. It could be that you’re running with sudo, but the configuration is in the user home directory. However, that’s mostly a guess at this point.