Repository: promptfoo/promptfoo
Issue: Install promptfoo on kubernetes
Root cause: Environment Incompatibility

Run promptfoo on a container platform by using the following step that will build an image is not working . 


While using import from git strategy it was able to build and push the image , however the pod that runs promptfoo is showing error in the log as shared below 

Need to identify the change that are required so it can run on a kubernetes cluster

Below is log from the pod running promptfoo

<img width="1040" alt="Screenshot 2024-07-23 at 11 57 52 PM" src="https://github.com/user-attachments/assets/ad0b4f89-cf64-49e8-b1e9-a5ad5c4d0ab9">


Hey @rrbanda, thanks for the report. I think this has to do with how k8s handles permissions.  I have a potential fix in #1257, although I have not tried it on k8s myself.  If you can give it a try and let me know, that would be great.

@rrbanda We just cut a release with the new docker image. I also confirmed that I can run it ok k8s. Please check it out and let us know if you run into any other issues. 

@mldangelo thank you , do you have any docs or link to image ? i can try deploying and share feedback

or i need to build and push image from promptfoo git repo on my end ?

@rrbanda you can check out the library and build from source. I'll work on getting an image published for you today. 

@mldangelo just deployed with newly built image from source but still getting an error while the pod is getting created 
<img width="1163" alt="Screenshot 2024-07-24 at 3 37 15 PM" src="https://github.com/user-attachments/assets/193d02f4-65a4-4de5-8f16-aa6f86427d3d">


@rrbanda what's in `docker-entrypoint.sh`?  Our dockerfile creates `entrypoint.sh`. Did you create your own? 

@mldangelo i have not created one but is it generated as part of the build process ?

 i tried a different way and still got an error 
```
Writing environment variables to .env file...
Loaded environment variables:
entrypoint.sh: line 3: can't create src/web/nextui/.env: Permission denied
cat: can't open 'src/web/nextui/.env': No such file or directory
Starting server...
- ready started server on 0.0.0.0:3000, url: http://localhost:3000
Listening on port 3000 url: http://0.0.0.0:3000
```


is there a helm chart for promptfoo ? 

> is there a helm chart for promptfoo ?

@tamdoEH authored [this Helm chart for promptfoo](https://github.com/tamdoEH/promptfoo-helm). Note that I haven't tested it yet. If either of you (@didlawowo or @tamdoEH) would be open to contributing it directly into promptfoo — whether by working on a pull request, testing, or providing feedback - we’d greatly appreciate the help.

Hi @rrbanda, thanks again for your patience and for all the feedback along the way. Since we’ve made several updates to the Docker image and there’s been some progress on Kubernetes support, I’m going to close this issue.

If you’re still running into issues or need further assistance, feel free to reopen the issue or start a new one. Also, a community-contributed Helm chart can be found here: [Gekko0114/kube-promptfoo-controller](https://github.com/Gekko0114/kube-promptfoo-controller) if that’s helpful for your setup.

We really appreciate your help in improving promptfoo!