Skip to content

Commit

Permalink
02
Browse files Browse the repository at this point in the history
  • Loading branch information
Houssem Dellai committed Sep 23, 2024
1 parent b1f39fa commit afb1c6a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 02_kubernetes_aks/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Another simple option would be to use the Azure CLI.

```sh
az group create --name myResourceGroup --location eastus
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 3 --enable-addons monitoring --generate-ssh-keys
az aks create --resource-group myResourceGroup --name myAKSCluster --node-count 3
```

Next, the kubectl CLI will be used to deploy applications to the cluster.
Expand Down
13 changes: 8 additions & 5 deletions 510_ai_ollama_k8s/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,26 +40,29 @@ Now open your browser on `http://localhost:3000` to access the `Open-WebUI` clie
`ollama` and `Open-WebUI` can be deployed in AKS using Kubernetes manifests. The `ollama` server is deployed as a StatefulSet with one replica. The `Open-WebUI` client app is deployed as a Deployment with one replica. The `ollama` server and client app are deployed in the `ollama` namespace.

```sh
$AKS_RG="rg-aks-ollama-llm"
$AKS_RG="rg-aks-ollama-llm-510"
$AKS_NAME="aks-cluster"

# create resource group
az group create -n $AKS_RG -l swedencentral

# create an AKS cluster
az aks create -n $AKS_NAME -g $AKS_RG --network-plugin azure --network-plugin-mode overlay -k 1.30.3 --node-vm-size Standard_D4s_v5
az aks create -n $AKS_NAME -g $AKS_RG --network-plugin azure --network-plugin-mode overlay -k 1.30.3 --node-vm-size Standard_D2s_v5

# get credentials
az aks get-credentials -n $AKS_NAME -g $AKS_RG --overwrite-existing

# check AKS Sconnection
kubectl get nodes

# deploy Ollama server and client app (Open-WebUI) into AKS
kubectl apply -f .

# check the install
kubectl get all -n ollama
kubectl get all,pv,pvc -n ollama

# install LLM model likw phi3 or llama3.1 into ollama server
kubectl exec ollama-0 -n ollama -it -- ollama run phi3
# install LLM model likw phi3.5 or llama3.1 into ollama server
kubectl exec ollama-0 -n ollama -it -- ollama run phi3.5

# or you can run another model like llama3.1
kubectl exec ollama-0 -n ollama -it -- ollama run llama3.1
Expand Down
3 changes: 2 additions & 1 deletion 510_ai_ollama_k8s/webui-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ spec:
- name: OLLAMA_BASE_URL
value: "http://ollama-service.ollama.svc.cluster.local:11434"
- name: WEBUI_AUTH
value: "False"
value: "True"

tty: true
volumeMounts:
- name: webui-volume
Expand Down

0 comments on commit afb1c6a

Please sign in to comment.