How can I pass environment variables from my local backend to a script inside a container running in a dynamic Kubernetes pod?

I’m trying to send environment variables from a backend running on my local machine to a container running inside a Kubernetes cluster on a remote (cloud) machine.

Here are the key details and constraints:

The container runs inside a dynamically created pod in a Kubernetes cluster.

I cannot modify any Kubernetes objects (e.g., Deployment, Pod, ConfigMap, etc.).

I can modify the container image, including the script inside it that gets executed.

I need to pass dynamic environment variables (such as API keys or configuration values) from my local backend to that script inside the container at runtime.

What’s the best way to achieve this given these limitations?

Any workaround, best practice, or direction would be really helpful!