Usage in Kubernetes #8

Closed
opened 2025-11-11 14:01:44 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @Poulpatine on GitHub (Oct 22, 2023).

Originally assigned to: @tjbck on GitHub.

Hello,

I'm trying to use ollama-webui in Kubernetes but I can't figure how to make it work.

When I'm on the webui, I can list the models and launch a conversation but once I send a question, I don't receive any answer and the backend (ollama server pod) does not seems to consume any CPU.

I don't know if it's related but there is no Kubernetes equivalent of 'host.docker'internal' so, maybe the problem lies here ?

Beside that, I know that I've correctly configure my OLLAMA_ENDPOINT env variable because if I change it to a bad value I can not list the models.

Thanks for your help.

Originally created by @Poulpatine on GitHub (Oct 22, 2023). Originally assigned to: @tjbck on GitHub. Hello, I'm trying to use ollama-webui in Kubernetes but I can't figure how to make it work. When I'm on the webui, I can list the models and launch a conversation but once I send a question, I don't receive any answer and the backend (ollama server pod) does not seems to consume any CPU. I don't know if it's related but there is no Kubernetes equivalent of 'host.docker'internal' so, maybe the problem lies here ? Beside that, I know that I've correctly configure my OLLAMA_ENDPOINT env variable because if I change it to a bad value I can not list the models. Thanks for your help.
Author
Owner

@tjbck commented on GitHub (Oct 22, 2023):

Just merged the static build PR #10 to main, could you please try again with the latest commit and see if that fixes your issue? It introduces breaking changes so your command should be replaced with the following instead:

docker build --build-arg OLLAMA_API_BASE_URL='' -t ollama-webui .
docker run -d -p 3000:8080 --name ollama-webui --restart always ollama-webui

Thanks!

@tjbck commented on GitHub (Oct 22, 2023): Just merged the static build PR #10 to main, could you please try again with the latest commit and see if that fixes your issue? It introduces breaking changes so your command should be replaced with the following instead: ```sh docker build --build-arg OLLAMA_API_BASE_URL='' -t ollama-webui . docker run -d -p 3000:8080 --name ollama-webui --restart always ollama-webui ``` Thanks!
Author
Owner

@Poulpatine commented on GitHub (Oct 22, 2023):

Thanks for your reply.

I've made a test with the last commit ( 585038f ).

docker build --no-cache --build-arg OLLAMA_API_BASE_URL='http://service-ollama:80/api' -t ollama-webui .

(service-ollama is the hostname of the ollama container in my cluster)

But now I can't even see the models.

@Poulpatine commented on GitHub (Oct 22, 2023): Thanks for your reply. I've made a test with the last commit ( 585038f ). ``` docker build --no-cache --build-arg OLLAMA_API_BASE_URL='http://service-ollama:80/api' -t ollama-webui . ``` (service-ollama is the hostname of the ollama container in my cluster) But now I can't even see the models.
Author
Owner

@tjbck commented on GitHub (Oct 22, 2023):

@Poulpatine Could you provide us a screenshot of your console logs from your browser's developer tools? Thanks.

@tjbck commented on GitHub (Oct 22, 2023): @Poulpatine Could you provide us a screenshot of your console logs from your browser's developer tools? Thanks.
Author
Owner

@Poulpatine commented on GitHub (Oct 23, 2023):

Hi,

here are the logs :

http://service-ollama:80/api 2.80d1ece3.js:52:123294
Blocked loading mixed active content “http://service-ollama/api/tags” start.52e20aa1.js:1:1401
TypeError: NetworkError when attempting to fetch resource.
    Immutable 10
    <anonymous> https://yyy.xxx.org/:39
    promise callback* https://yyy.xxx.org/:38
2.80d1ece3.js:52:123502
Array []
2.80d1ece3.js:52:123866
171c2eff-64e5-48a4-9a49-9ce028e20d3b 2.80d1ece3.js:52:123881

yyy.xxx.org is my publicly exposed domain.

@Poulpatine commented on GitHub (Oct 23, 2023): Hi, here are the logs : ``` http://service-ollama:80/api 2.80d1ece3.js:52:123294 Blocked loading mixed active content “http://service-ollama/api/tags” start.52e20aa1.js:1:1401 TypeError: NetworkError when attempting to fetch resource. Immutable 10 <anonymous> https://yyy.xxx.org/:39 promise callback* https://yyy.xxx.org/:38 2.80d1ece3.js:52:123502 Array [] 2.80d1ece3.js:52:123866 171c2eff-64e5-48a4-9a49-9ce028e20d3b 2.80d1ece3.js:52:123881 ``` yyy.xxx.org is my publicly exposed domain.
Author
Owner

@Poulpatine commented on GitHub (Oct 23, 2023):

Ok,

the problem was that the backend was not:

  • exposed through https
  • available from my browser

I've fixed both issues and now everything is ok.

Thanks for your help.

Btw, do you plan to provide a way to set variables at runtime instead of build time ?

Thanks.

@Poulpatine commented on GitHub (Oct 23, 2023): Ok, the problem was that the backend was not: - exposed through https - available from my browser I've fixed both issues and now everything is ok. Thanks for your help. Btw, do you plan to provide a way to set variables at runtime instead of build time ? Thanks.
Author
Owner

@tjbck commented on GitHub (Oct 23, 2023):

@Poulpatine Glad you were able to fix the issue! I'm thinking of adding a feature where you could edit the API_BASE_URL dynamically on the Web UI. I'll keep you updated once I merge the dev branch with the feature. Have a nice day!

@tjbck commented on GitHub (Oct 23, 2023): @Poulpatine Glad you were able to fix the issue! I'm thinking of adding a feature where you could edit the API_BASE_URL dynamically on the Web UI. I'll keep you updated once I merge the dev branch with the feature. Have a nice day!
Author
Owner

@tjbck commented on GitHub (Oct 25, 2023):

@Poulpatine Just merged the dev branch to main with the Ollama server URL edit feature. Give it a try!

@tjbck commented on GitHub (Oct 25, 2023): @Poulpatine Just merged the dev branch to main with the Ollama server URL edit feature. Give it a try!
Author
Owner

@Poulpatine commented on GitHub (Oct 25, 2023):

@tjbck I just did it. It's great !

I've also tested the model management feature which is cool too.

Thanks !

@Poulpatine commented on GitHub (Oct 25, 2023): @tjbck I just did it. It's great ! I've also tested the model management feature which is cool too. Thanks !
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#8