This is an automated email from the ASF dual-hosted git repository.

zhongxjian pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-website.git


The following commit(s) were added to refs/heads/master by this push:
     new 485f945e0f1 add pixiu gateway docs (#3165)
485f945e0f1 is described below

commit 485f945e0f177fb3af50313563d8c3ee1b92bcc5
Author: mfordjody <[email protected]>
AuthorDate: Thu Dec 11 20:23:47 2025 +0800

    add pixiu gateway docs (#3165)
---
 .../overview/reference/pixiu/deploy/_index.md      |  16 ++
 .../reference/pixiu/deploy/getting-started.md      |  47 ++++
 .../reference/pixiu/deploy/quickstart/httpproxy.md | 246 +++++++++++++++++++++
 3 files changed, 309 insertions(+)

diff --git a/content/zh-cn/overview/reference/pixiu/deploy/_index.md 
b/content/zh-cn/overview/reference/pixiu/deploy/_index.md
new file mode 100644
index 00000000000..491dc9a880d
--- /dev/null
+++ b/content/zh-cn/overview/reference/pixiu/deploy/_index.md
@@ -0,0 +1,16 @@
+---
+aliases:
+- /zh/docs3-v2/dubbo-go-pixiu/deploy/
+- /zh-cn/docs3-v2/dubbo-go-pixiu/deploy/
+- /zh-cn/overview/reference/pixiu/deploy/
+- /zh-cn/overview/mannual/dubbo-go-pixiu/deploy/
+description: pixiu gateway 使用说明
+linkTitle: gateway 使用指南
+title: gateway 使用指南
+type: docs
+weight: 60
+---
+
+Pixiu Gateway 用于管理 Pixiu Proxy,无论它是作为独立应用网关运行,还是集成在 Kubernetes 中作为应用网关使用。通过网关 
API 资源,可以部署并维护受该控制器管理的 Pixiu Proxy 实例。
+
+> 目前 Pixiu Gateway 处于初步实验阶段。后续支持更多的部署方式和标准功能支持。
diff --git a/content/zh-cn/overview/reference/pixiu/deploy/getting-started.md 
b/content/zh-cn/overview/reference/pixiu/deploy/getting-started.md
new file mode 100644
index 00000000000..015ac229768
--- /dev/null
+++ b/content/zh-cn/overview/reference/pixiu/deploy/getting-started.md
@@ -0,0 +1,47 @@
+---
+linkTitle: 快速入门
+title: 快速入门
+type: docs
+weight: 1
+---
+快速开始使用 Pixiu Gateway 应用网关。
+
+### 0. 安装 Gateway API 和 Pixiu Gateway CRD
+
+```
+kubectl apply --server-side -f 
https://github.com/kubernetes-sigs/gateway-api/releases/download/v1.3.0/standard-install.yaml
+kubectl apply -f 
https://raw.githubusercontent.com/apache/dubbo-go-pixiu/develop/controllers/config/crd/bases
+```
+
+###  1. 切换目标目录
+```
+cd controllers/samples
+```
+
+### 2. Pixiu Gateway
+```
+https://raw.githubusercontent.com/apache/dubbo-go-pixiu/develop/controllers/samples/controller.yaml
+
+```
+
+### 3. Pixiu Proxy
+```
+https://raw.githubusercontent.com/apache/dubbo-go-pixiu/develop/controllers/samples/pixiugateway.yaml
+```
+
+```
+NAME                                        READY   STATUS    RESTARTS   AGE
+pg-controller-5999ccd96c-fcrvw              1/1     Running   0          28s
+pixiu-listeners-b6c63d63-68848d4d48-4pt6w   1/1     Running   0          16s
+```
+
+### 4. 测试
+```bash
+kubectl apply -f 
https://raw.githubusercontent.com/apache/dubbo-go-pixiu/develop/controllers/samples/backend.yaml
+```
+
+```bash
+export GATEWAY_HOST=$(kubectl get gateway/pixiu-listeners -n 
pixiu-gateway-system -o jsonpath='{.status.addresses[0].value}')
+curl --verbose --header "Host: www.example.com" http://$GATEWAY_HOST/get
+```
+
diff --git 
a/content/zh-cn/overview/reference/pixiu/deploy/quickstart/httpproxy.md 
b/content/zh-cn/overview/reference/pixiu/deploy/quickstart/httpproxy.md
new file mode 100644
index 00000000000..176cf077bef
--- /dev/null
+++ b/content/zh-cn/overview/reference/pixiu/deploy/quickstart/httpproxy.md
@@ -0,0 +1,246 @@
+---
+aliases:
+- /zh/docs3-v2/dubbo-go-pixiu/deploy/quickstart/httpproxy/
+- /zh-cn/docs3-v2/dubbo-go-pixiu/deploy/quickstart/httpproxy/
+- /zh-cn/overview/reference/pixiu/deploy/quickstart/httpproxy/
+- /zh-cn/overview/mannual/dubbo-go-pixiu/deploy/quickstart/httpproxy/
+description: 关于如何使用 HTTP 代理说明
+linkTitle: HTTP 代理
+title: HTTP 代理
+type: docs
+weight: 2
+---
+本示例演示了如何使用 Pixiu Gateway 作为 HTTP 代理网关,接收外部的 HTTP 请求并转发到后端的 Dubbo-go RPC 
服务。示例基于 `dubbo-go-samples/helloworld` 中的 RPC 服务。
+
+## 先决条件
+- 安装 [Pixiu Gateway](../getting-started.md)
+
+## 部署后端 RPC 服务
+
+### 1. 创建命名空间和服务
+
+首先创建命名空间和后端 RPC 服务:
+```yaml
+cat <<EOF | kubectl apply -f -
+apiVersion: v1
+kind: Namespace
+metadata:
+  name: helloworld
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: dubbo-go-server
+  namespace: helloworld
+  labels:
+    app: dubbo-go-server
+spec:
+  type: ClusterIP
+  ports:
+    - name: triple
+      protocol: TCP
+      port: 20000
+      targetPort: 20000
+  selector:
+    app: dubbo-go-server
+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: dubbo-go-server
+  namespace: helloworld
+  labels:
+    app: dubbo-go-server
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: dubbo-go-server
+  template:
+    metadata:
+      labels:
+        app: dubbo-go-server
+    spec:
+      containers:
+        - name: server
+          image: mfordjody/dubbo-go-server:debug
+          imagePullPolicy: Always
+          ports:
+            - name: triple
+              containerPort: 20000
+              protocol: TCP
+          env:
+            - name: DUBBO_GO_CONFIG_PATH
+              value: "/app/conf/dubbogo.yml"
+          resources:
+            limits:
+              cpu: 500m
+              memory: 512Mi
+            requests:
+              cpu: 100m
+              memory: 128Mi
+          livenessProbe:
+            tcpSocket:
+              port: 20000
+            initialDelaySeconds: 30
+            periodSeconds: 30
+            timeoutSeconds: 5
+            failureThreshold: 3
+          readinessProbe:
+            tcpSocket:
+              port: 20000
+            initialDelaySeconds: 10
+            periodSeconds: 10
+            timeoutSeconds: 3
+            failureThreshold: 3
+EOF
+```
+
+应用配置:
+```bash
+kubectl apply -f helloworld-deployment.yaml
+```
+
+### 2. 验证
+
+检查服务是否正常运行:
+```bash
+kubectl get pods -n helloworld
+kubectl get svc -n helloworld
+```
+
+## 配置 HTTP 代理
+
+### 1. HTTPRoute
+
+使用 HTTPRoute 定义路由规则,将 HTTP 请求路由到后端服务:
+```yaml
+apiVersion: gateway.networking.k8s.io/v1
+kind: HTTPRoute
+metadata:
+  name: helloworld-http-route
+  namespace: default
+spec:
+  parentRefs:
+    - name: pixiu-listeners
+      namespace: pixiu-gateway-system
+      sectionName: http
+  rules:
+    - matches:
+        - path:
+            type: PathPrefix
+            value: /greet.GreetService
+      backendRefs:
+        - name: dubbo-go-server
+          namespace: helloworld
+          port: 20000
+          weight: 100
+```
+
+### 2. PixiuClusterPolicy
+
+配置后端集群策略,定义后端服务的连接信息:
+```yaml
+apiVersion: pixiu.apache.org/v1alpha1
+kind: PixiuClusterPolicy
+metadata:
+  name: helloworld-cluster
+  namespace: pixiu-gateway-system
+spec:
+  targetRef:
+    group: gateway.networking.k8s.io
+    kind: Gateway
+    name: pixiu-listeners
+  clusterRef:
+    - name: helloworld-dubbo-go-server
+      type: static
+      loadBalancerPolicy: "lb"
+      endpoints:
+        - address: dubbo-go-server.helloworld.svc.cluster.local
+          port: 20000
+```
+
+### 3. PixiuFilterPolicy
+
+配置 HTTP 过滤器策略,使用 `httpproxy` 过滤器进行代理转发:
+```yaml
+apiVersion: pixiu.apache.org/v1alpha1
+kind: PixiuFilterPolicy
+metadata:
+  name: helloworld-http-filter
+  namespace: pixiu-gateway-system
+spec:
+  targetRef:
+    group: gateway.networking.k8s.io
+    kind: Gateway
+    name: pixiu-listeners
+  listenersRef:
+    - name: http
+      filterChains:
+        type: dgp.filter.httpconnectionmanager
+      config:
+        routeConfig:
+          routes:
+            - match:
+                prefix: "/greet.GreetService"
+                methods: []
+              route:
+                cluster: "helloworld-dubbo-go-server"
+                cluster_not_found_response_code: 505
+            - match:
+                path: "/greet.GreetService/Greet"
+                methods: []
+              route:
+                cluster: "helloworld-dubbo-go-server"
+                cluster_not_found_response_code: 505
+        httpFilters:
+          - name: dgp.filter.http.httpproxy
+            config:
+              timeoutConfig:
+                connectTimeout: 5s
+                requestTimeout: 5s
+```
+
+### 4. 应用配置
+
+以上三个配置合并到 `helloworld-http.yaml`
+```bash
+kubectl apply -f helloworld-http.yaml
+```
+
+### 5. 验证
+
+检查所有资源的状态:
+```bash
+kubectl get httproute -n default
+
+kubectl get pixiuclusterpolicy -n pixiu-gateway-system
+
+kubectl get pixiufilterpolicy -n pixiu-gateway-system
+
+kubectl get gateway -n pixiu-gateway-system
+```
+
+## 测试
+
+### 1. 获取网关地址
+
+```bash
+kubectl get svc -npixiu-gateway-system
+NAME                               TYPE           CLUSTER-IP      EXTERNAL-IP  
 PORT(S)             AGE
+service/pg-controller              ClusterIP      10.98.137.160   <none>       
 8080/TCP,8081/TCP   58s
+service/pixiu-listeners-b6c63d63   LoadBalancer   10.100.42.144   <pending>    
 80:31257/TCP        24s
+```
+
+### 2. 发送 HTTP 请求
+
+使用 curl 发送 HTTP 请求到 RPC 服务:
+```bash
+NODE_IP=$(kubectl get nodes -o 
jsonpath='{.items[0].status.addresses[?(@.type=="InternalIP")].address}')
+curl -v --header "Content-Type: application/json" --data '{"name": "Hello 
World"}' http://$NODE_IP:31257/greet.GreetService/Greet
+```
+
+预期响应:
+```json
+{"greeting": "Hello World"}
+```

Reply via email to