










ai-gateway是envoy的另一个项目。
https://aigateway.envoyproxy.io/
现在都ai/agent了,非常方便。甚至不用自己动手,所以后续的文章也不会再写那么细的细节,
只写个脉络,为的是理解机制。
https://aigateway.envoyproxy.io/docs/getting-started/
https://www.cnblogs.com/hugetong/p/18722210
https://helm.sh/docs/intro/install/
ai-gateway依赖 envoy gateway 需要先装 envoy gateway
安装有两个方法,一个是用kubectl apply安装。一个是用helm。
helm的用途主要是渲染 kubectl 安装时的yaml,这里我们用helm
helm upgrade -i eg oci://docker.io/envoyproxy/gateway-helm \ --version v1.8.1 \ --namespace envoy-gateway-system \ --create-namespace \ -f https://raw.githubusercontent.com/envoyproxy/ai-gateway/main/manifests/envoy-gateway-values.yaml \ -f https://raw.githubusercontent.com/envoyproxy/ai-gateway/main/examples/token_ratelimit/envoy-gateway-values-addon.yaml \ -f https://raw.githubusercontent.com/envoyproxy/ai-gateway/main/examples/inference-pool/envoy-gateway-values-addon.yaml
helm upgrade -i aieg-crd oci://docker.io/envoyproxy/ai-gateway-crds-helm \ --version v1.0.0 \ --namespace envoy-ai-gateway-system \ --create-namespace
helm upgrade -i aieg oci://docker.io/envoyproxy/ai-gateway-helm \ --version v1.0.0 \ --namespace envoy-ai-gateway-system \ --create-namespace
vim gatewayclass.yaml --------------- apiVersion: gateway.networking.k8s.io/v1 kind: GatewayClass metadata: name: eg spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller parametersRef: group: gateway.envoyproxy.io kind: EnvoyProxy name: ai-gateway-proxy namespace: envoy-gateway-system --------------- kubectl apply -f gatewayclass.yaml vim gateway.yaml --------------- apiVersion: gateway.networking.k8s.io/v1 kind: Gateway metadata: name: ai-gateway namespace: default spec: gatewayClassName: eg listeners: - name: http protocol: HTTP port: 80 ---------------- kubectl apply -f gateway.yaml
如果k8s master不能之间访问 docker.io,一般就需要找一个 似有镜像仓库做中转, 大概流程包括如下的主要步骤
helm pull
helm template
通过 grep 等方法,在template yaml 里找到相关image, 如 grep docker.io 等字符串。
docker pull // docker.io
docker tag // 打私有镜像仓库的标
docker login // 登陆私有镜像仓库
docker push // 推送到私有镜像仓库
vim 编写一个 values.yaml 覆盖镜像配置到似有仓库。
helm update -i gateway -f values.yaml
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。