34 lines
1.4 KiB
Bash
34 lines
1.4 KiB
Bash
|
|
# login AKS
|
|
az cloud set --name AzureCloud # Switch CLI to Azure cloud
|
|
# az login # Log in to Azure China account (browser or device code flow)
|
|
az account set -s 079d8bd8-b4cc-4892-9307-aa6dedf890e9 #! set subs
|
|
az aks get-credentials -g rg-aiflow-lab -n aks-aiflow-lab --overwrite-existing --file ~/.kube/config
|
|
####
|
|
kubectl config use-context aks-aiflow-lab
|
|
kubectl config current-context
|
|
|
|
docker build . -t agentic-rag:1.0.16
|
|
docker tag agentic-rag:1.0.16 acrsales2caiprd.azurecr.cn/agentic-rag:1.0.16
|
|
docker push acrsales2caiprd.azurecr.cn/agentic-rag:1.0.16
|
|
|
|
# kubectl create namespace knowledge-agent
|
|
|
|
kubectl delete configmap agentic-rag-config -n knowledge-agent
|
|
kubectl create configmap agentic-rag-config -n knowledge-agent --from-file=./deploy/prd/config.yaml --from-file=llm_prompt.yaml
|
|
|
|
kubectl delete deployment agentic-rag -n knowledge-agent
|
|
# kubectl delete ingress agentic-rag-ingress -n knowledge-agent # 注释掉,不要删除生产 Ingress
|
|
kubectl apply -f deploy/prd/k8s-manifest.yml -n knowledge-agent
|
|
|
|
# restart deployment
|
|
kubectl rollout restart deployment agentic-rag -n knowledge-agent
|
|
|
|
kubectl rollout status deployment/agentic-rag -n knowledge-agent
|
|
kubectl get deployment agentic-rag -o wide -n knowledge-agent
|
|
kubectl get pods -l app=agentic-rag -o wide -n knowledge-agent
|
|
|
|
# Monitor logs
|
|
kubectl logs -f deployment/agentic-rag -n knowledge-agent
|
|
|