Reference URL: https://github.com/Azure-Samples/aks-store-demo/tree/main
- Please prepare AKS and Azure AI first
A. Create an AKS resource : https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
B. Create an Open AI resource : https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal - Connect to AKS use CLI : https://pitstop.manageengine.com/portal/en/kb/articles/how-to-connect-azure-kubernetes-service-aks-cluster
- Create a new namespace
kubectl create ns store
- Create related pods via github
kubectl apply -f https://raw.githubusercontent.com/Azure-Samples/aks-store-demo/main/aks-store-all-in-one.yaml -n store
- Check deployments
kubectl get deployment
- Check pods
kubectl get pods -n store
- Create a deployment for the AI container that contains AI-related information
Edit this file: https://github.com/Azure-Samples/aks-store-demo/blob/main/ai-service.yaml
Section 1: True
Section 2-4: You can find this information in the Playground section of the OpenAI Studio. - Create new deployment
Kubectl apply -f ai-service.yaml -n store
- In Azure Portal, go to AKS resource then check the IP in service and ingress
- 請先準備好相關的環境
A. 建立 AKS 的資源 : https://learn.microsoft.com/en-us/azure/aks/learn/quick-kubernetes-deploy-portal?tabs=azure-cli
B. 建立 ChatGTP 的資源 : https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal - 連上 AKS : https://pitstop.manageengine.com/portal/en/kb/articles/how-to-connect-azure-kubernetes-service-aks-cluster
- 建立新的 namespace
kubectl create ns store
- 利用現有的 Github 資源來建立新的 deployment
kubectl apply -f https://raw.githubusercontent.com/Azure-Samples/aks-store-demo/main/aks-store-all-in-one.yaml -n store
- 檢查 deployment
kubectl get deployment
- 檢查pods
kubectl get pods -n store
- 編修檔案 ai-service.yaml 裡的內容,將 AI 所需的訊息填入檔案中
檔案下載點: https://github.com/Azure-Samples/aks-store-demo/blob/main/ai-service.yaml
Section 1: True
Section 2-4: 在 Open AI Studio 中的 play ground 裡的 view code 找到 2-4 所需的資訊 - 佈署新的 ai service
Kubectl apply -f ai-service.yaml -n store
- 在 Azure Portal 中, 到 AKS 資源裡 Service and Ingress 的 External IP 找到分配到的 IP, 輸入 Browser 中即可馬上體驗 AI 的商店