Higress — Operator CRDs & Configuration
Repository: github.com/alibaba/higress
Latest: v2.2.2 (May 21, 2026)
CNCF: Sandbox (March 2026)
License: Apache 2.0
Stars: 8.5k
Architecture
Ingress/Gateway API/CRDs → higress-controller (Go) → Istio Pilot → xDS (LDS/RDS/CDS/EDS) → higress-gateway (Envoy + Wasm)
- Control plane: higress-controller (Go) watches K8s resources, converts to Istio config, pushes via xDS
- Data plane: higress-gateway (Envoy-based) handles all traffic, runs Wasm plugins, zero-downtime config reload
- Three ingress interfaces: Standard K8s Ingress, Gateway API, Istio API (all simultaneous)
CRDs (3 custom + 1 bundled)
| CRD |
API Version |
Kind |
Short Names |
Purpose |
| WasmPlugin |
extensions.higress.io/v1alpha1 |
WasmPlugin |
— |
Wasm plugin lifecycle & config |
| Http2Rpc |
networking.higress.io/v1 |
Http2Rpc |
— |
HTTP-to-RPC (Dubbo/gRPC) mapping |
| McpBridge |
networking.higress.io/v1 |
McpBridge |
— |
Multi-registry service discovery |
| EnvoyFilter |
networking.istio.io/v1alpha3 |
EnvoyFilter |
— |
Envoy filter chain patching (bundled) |
WasmPlugin — extensions.higress.io/v1alpha1
Extends Envoy with Wasm-based plugins for auth, AI proxy, rate limiting, transformation, etc.
apiVersion: extensions.higress.io/v1alpha1
kind: WasmPlugin
metadata:
name: ai-proxy
namespace: higress-system
spec:
# Plugin source
url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.0
sha256: abc123...
pluginName: ai-proxy
imagePullPolicy: IfNotPresent
imagePullSecret: my-registry-cred
# Plugin configuration (global)
pluginConfig:
provider:
type: openai
apiTokens:
- "sk-..."
modelMapping:
"gpt-4": "gpt-4o"
timeout: 120000
# Default config (applied when no matchRules match)
defaultConfig: {}
defaultConfigDisable: false
# Failure behavior
failStrategy: FAIL_CLOSE # FAIL_CLOSE | FAIL_OPEN
# Position in filter chain
phase: AUTHN # UNSPECIFIED_PHASE | AUTHN | AUTHZ | STATS
priority: 100
# Wasm VM config
vmConfig:
env:
- name: LOG_LEVEL
value: debug
# Per-route overrides
matchRules:
- domain:
- "api.example.com"
config:
provider:
type: openai
apiTokens:
- "sk-another-token"
configDisable: false
- ingress:
- "my-ingress"
routeType: HTTP
configDisable: true
- service:
- "llm-service.default.svc"
config:
provider:
type: anthropic
Spec Fields
| Field |
Type |
Default |
Description |
url |
string |
— |
Wasm module URL (oci://..., http://...) |
sha256 |
string |
— |
SHA256 checksum |
pluginName |
string |
— |
Plugin name |
pluginConfig |
object |
— |
Plugin config (pass-through to plugin) |
defaultConfig |
object |
{} |
Default config for unmatched routes |
defaultConfigDisable |
bool |
false |
Disable plugin by default |
failStrategy |
enum |
FAIL_CLOSE |
FAIL_CLOSE or FAIL_OPEN |
phase |
enum |
— |
UNSPECIFIED_PHASE, AUTHN, AUTHZ, STATS |
priority |
int |
— |
Ordering within same phase |
imagePullPolicy |
enum |
— |
UNSPECIFIED_POLICY, IfNotPresent, Always |
imagePullSecret |
string |
— |
OCI pull secret name |
verificationKey |
string |
— |
Plugin signature verification key |
vmConfig.env |
[]EnvVar |
— |
Wasm VM environment variables |
matchRules[] |
[]MatchRule |
— |
Per-route config overrides |
MatchRule fields:
| Field |
Type |
Description |
domain[] |
[]string |
Match by domain name |
ingress[] |
[]string |
Match by Ingress resource name |
service[] |
[]string |
Match by K8s service name |
routeType |
enum |
HTTP or GRPC |
config |
object |
Plugin config for this rule |
configDisable |
bool |
Disable plugin for this rule |
Http2Rpc — networking.higress.io/v1
Maps HTTP endpoints to Dubbo or gRPC services.
apiVersion: networking.higress.io/v1
kind: Http2Rpc
metadata:
name: dubbo-user-service
spec:
# Dubbo destination (oneOf: dubbo XOR grpc)
dubbo:
service: com.example.UserService
version: 1.0.0
group: prod
methods:
- serviceMethod: getUserById
httpPath: /api/users/:id
httpMethods:
- GET
headersAttach: x-request-id
params:
- paramSource: URL_PATH
paramKey: id
paramType: java.lang.Long
- serviceMethod: createUser
httpPath: /api/users
httpMethods:
- POST
paramFromEntireBody:
paramType: com.example.User
# OR gRPC destination (alternative to dubbo):
# grpc:
# proto_descriptor_str: "...base64..."
# proto_descriptor_file_path: /etc/proto/user.pb
# services:
# - com.example.UserService
Spec Fields
| Field |
Type |
Required |
Description |
dubbo.service |
string |
oneOf |
Dubbo service interface |
dubbo.version |
string |
✅ |
Dubbo service version |
dubbo.group |
string |
❌ |
Dubbo service group |
dubbo.methods[].serviceMethod |
string |
✅ |
Dubbo method name |
dubbo.methods[].httpPath |
string |
✅ |
HTTP path to map |
dubbo.methods[].httpMethods[] |
[]string |
✅ |
Allowed HTTP methods |
dubbo.methods[].headersAttach |
string |
❌ |
Headers to propagate |
dubbo.methods[].params[].paramSource |
string |
✅ |
URL_PATH, URL_QUERY, REQUEST_HEADER |
dubbo.methods[].params[].paramKey |
string |
✅ |
Parameter key name |
dubbo.methods[].params[].paramType |
string |
✅ |
Java type (e.g. java.lang.Long) |
dubbo.methods[].paramFromEntireBody.paramType |
string |
❌ |
Use entire body as param |
grpc.proto_descriptor_str |
string |
oneOf |
Inline protobuf descriptor |
grpc.proto_descriptor_file_path |
string |
❌ |
Path to proto descriptor file |
grpc.services[] |
[]string |
✅ |
gRPC service names |
McpBridge — networking.higress.io/v1
Multi-registry service discovery for integrating external service registries.
apiVersion: networking.higress.io/v1
kind: McpBridge
metadata:
name: default
namespace: higress-system
spec:
registries:
# Nacos 2.x (gRPC)
- type: nacos2
name: my-nacos
domain: nacos.example.com
port: 8848
protocol: HTTP
nacosNamespaceId: public
nacosGroups:
- DEFAULT_GROUP
nacosRefreshInterval: 5000
# Nacos 3.x (MCP auto-discovery)
- type: nacos3
name: nacos-mcp
domain: nacos3.example.com
port: 8848
enableMCPServer: true
# ZooKeeper
- type: zookeeper
name: my-zk
domain: zk.example.com
port: 2181
zkServicesPath:
- /dubbo
# Consul
- type: consul
name: my-consul
domain: consul.example.com
port: 8500
consulDatacenter: dc1
consulServiceTag: prod
# Static/DNS
- type: static
name: static-backends
domain: backend.example.com
port: 8080
proxies:
- type: http_connect
name: corporate-proxy
serverAddress: proxy.example.com
serverPort: 3128
listenerPort: 80
connectTimeout: 5000
Spec Fields
| Field |
Type |
Description |
registries[] |
[]Registry |
Service registry configurations |
Registry fields:
| Field |
Type |
Description |
type |
string |
nacos2, nacos3, nacos, zookeeper, consul, eureka, static, dns |
name |
string |
Registry name |
domain |
string |
Registry host |
port |
int |
Registry port |
protocol |
string |
HTTP or HTTPS |
sni |
string |
SNI for TLS |
nacosNamespaceId |
string |
Nacos namespace ID |
nacosGroups |
[]string |
Nacos groups |
nacosAccessKey |
string |
Nacos auth key |
nacosSecretKey |
string |
Nacos auth secret |
nacosAddressServer |
string |
Nacos address server |
nacosRefreshInterval |
int |
Refresh interval (ms) |
zkServicesPath |
[]string |
ZooKeeper service paths |
consulDatacenter |
string |
Consul datacenter |
consulNamespace |
string |
Consul namespace |
consulServiceTag |
string |
Consul service tag |
consulRefreshInterval |
int |
Refresh interval (ms) |
authSecretName |
string |
Secret name for registry auth |
enableMCPServer |
bool |
Enable MCP server for Nacos 3.x |
allowMcpServers |
[]string |
Allowed MCP server addresses |
mcpServerBaseUrl |
string |
MCP server base URL |
mcpServerExportDomains |
[]string |
Domains to export via MCP |
enableScopeMcpServers |
bool |
Scope MCP servers |
vport.default |
int |
Default virtual port |
vport.services |
[]object |
Per-service vport overrides |
metadata |
map |
Extra metadata |
proxyName |
string |
Proxy name |
Proxy fields:
| Field |
Type |
Description |
type |
string |
http_connect |
name |
string |
Proxy name |
serverAddress |
string |
Proxy server address |
serverPort |
int |
Proxy server port |
listenerPort |
int |
Local listener port |
connectTimeout |
int |
Connection timeout (ms) |
EnvoyFilter — networking.istio.io/v1alpha3
Bundled Istio CRD for low-level Envoy filter chain patching.
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: custom-filter
namespace: higress-system
spec:
configPatches:
- applyTo: HTTP_FILTER
match:
context: GATEWAY
listener:
filterChain:
filter:
name: envoy.filters.network.http_connection_manager
subFilter:
name: envoy.filters.http.router
patch:
operation: INSERT_BEFORE
value:
name: envoy.filters.http.lua
typed_config:
"@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua
inline_code: |
function envoy_on_request(request_handle)
-- custom logic
end
Wasm Plugin System
Plugin Categories (41 built-in)
| Category |
Plugins |
Count |
| AI |
ai-proxy, ai-cache, ai-token-ratelimit, ai-quota, ai-security-guard, ai-statistics, ai-rag, ai-search, ai-agent, ai-transformer, ai-prompt-template, ai-prompt-decorator, ai-intent, ai-history, ai-json-resp, ai-data-masking, ai-load-balancer, ai-image-reader, model-mapper, model-router, mcp-router, mcp-server, chatgpt-proxy |
23 |
| Auth |
basic-auth, key-auth, hmac-auth, hmac-auth-apisix, jwt-auth, simple-jwt-auth, oauth/oidc, ext-auth, opa |
9 |
| Security |
waf, bot-detect, cors, ip-restriction, request-block, replay-protection |
6 |
| Traffic |
cluster-key-rate-limit, key-rate-limit, request-validation, traffic-tag, traffic-editor, response-cache |
6 |
| Transformation |
transformer, custom-response, cache-control, de-graphql, frontend-gray, nginx-rewrite-compatible |
6 |
Plugin Languages
- Go (69 plugins) — primary, via TinyGo + wasm-go SDK
- Rust (5), C++, AssemblyScript
Plugin Loading
- OCI images:
oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/<name>:<version>
- HTTP distribution: via plugin-server
- SDK:
github.com/higress-group/wasm-go
WasmPlugin AI Proxy Example
apiVersion: extensions.higress.io/v1alpha1
kind: WasmPlugin
metadata:
name: ai-proxy-openai
spec:
url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.0
pluginConfig:
provider:
type: openai
apiTokens:
- "sk-..."
modelMapping:
"gpt-4": "gpt-4o"
timeout: 120000
protocol: openai # or "original" for native provider protocol
AI Gateway Provider Options
| Provider |
type value |
Auth Method |
| OpenAI |
openai |
apiTokens[] |
| Azure OpenAI |
azure |
apiTokens[] |
| Anthropic Claude |
claude |
apiTokens[] |
| Google Gemini |
gemini |
apiTokens[] |
| AWS Bedrock |
aws-bedrock |
IAM (env) |
| DeepSeek |
deepseek |
apiTokens[] |
| Moonshot |
moonshot |
apiTokens[] |
| Qwen (Tongyi) |
qwen |
apiTokens[] |
| Alibaba Bailian |
bailian |
apiTokens[] |
| Doubao |
doubao |
apiTokens[] |
| Spark (Xunfei) |
spark |
apiTokens[] |
| Cloudflare Workers AI |
cloudflare |
apiTokens[] |
| Together AI |
together |
apiTokens[] |
| OpenRouter |
openrouter |
apiTokens[] |
| Mistral |
mistral |
apiTokens[] |
| NVIDIA Triton |
nvidia-triton |
— |
Common WasmPlugin Patterns
Rate Limiting:
spec:
url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/key-rate-limit:1.0.0
pluginConfig:
limit: 100
window_size: 60
key_source: X-Forwarded-For
JWT Auth:
spec:
url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/jwt-auth:1.0.0
pluginConfig:
consumers:
- name: myapp
credential: myapp-secret
iss: https://auth.example.com
CORS:
spec:
url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/cors:1.0.0
pluginConfig:
allow_origins: "https://app.example.com"
allow_methods: "GET,POST,PUT,DELETE"
allow_headers: "Content-Type,Authorization"
expose_headers: "X-Custom-Header"
max_age: 3600
Common Mistakes
- No short names defined — WasmPlugin/Http2Rpc/McpBridge have no kubectl short names. Use full plural:
kubectl get wasmplugins, kubectl get http2rpcs, kubectl get mcpbridges.
- WasmPlugin url without OCI — Only
oci:// and http:// schemes supported. Don't use docker://.
- Image pull secret — Private OCI registries need
imagePullSecret referencing a secret in the same namespace.
- Phase ordering — Plugins run in order: AUTHN → AUTHZ → STATS. Within same phase, lower priority runs first.
- matchRules overlap — If multiple rules match, first match wins. Order
domain → ingress → service by priority.
- Dubbo version required —
dubbo.version is required even if not used by the target service.
- McpBridge registry name — Each registry in
registries[] must have a unique name.
- Nacos namespace — Use
nacosNamespaceId (not nacosNamespace which is legacy) for Nacos multi-tenant.
- EnvoyFilter complexity — EnvoyFilter patches are powerful but break on Envoy version upgrades. Prefer WasmPlugin when possible.
- Gateway API mutual exclusion — When both Ingress and Gateway API define the same route, Gateway API takes precedence.
- Fail strategy —
FAIL_CLOSE blocks traffic on plugin error. FAIL_OPEN passes through. Use FAIL_CLOSE for auth, FAIL_OPEN for observability.
1---2name: higress-operator3description: Create and manage Higress CRDs — WasmPlugin, Http2Rpc, McpBridge, AI Gateway, 41 Wasm plugins, 16 AI provider integrations, and Gateway configuration.4---56# Higress — Operator CRDs & Configuration78**Repository:** `github.com/alibaba/higress` 9**Latest:** v2.2.2 (May 21, 2026) 10**CNCF:** Sandbox (March 2026) 11**License:** Apache 2.0 12**Stars:** 8.5k1314## Architecture1516```17Ingress/Gateway API/CRDs → higress-controller (Go) → Istio Pilot → xDS (LDS/RDS/CDS/EDS) → higress-gateway (Envoy + Wasm)18```1920- **Control plane**: higress-controller (Go) watches K8s resources, converts to Istio config, pushes via xDS21- **Data plane**: higress-gateway (Envoy-based) handles all traffic, runs Wasm plugins, zero-downtime config reload22- **Three ingress interfaces**: Standard K8s Ingress, Gateway API, Istio API (all simultaneous)2324## CRDs (3 custom + 1 bundled)2526| CRD | API Version | Kind | Short Names | Purpose |27|-----|-------------|------|-------------|---------|28| WasmPlugin | `extensions.higress.io/v1alpha1` | `WasmPlugin` | — | Wasm plugin lifecycle & config |29| Http2Rpc | `networking.higress.io/v1` | `Http2Rpc` | — | HTTP-to-RPC (Dubbo/gRPC) mapping |30| McpBridge | `networking.higress.io/v1` | `McpBridge` | — | Multi-registry service discovery |31| EnvoyFilter | `networking.istio.io/v1alpha3` | `EnvoyFilter` | — | Envoy filter chain patching (bundled) |3233### WasmPlugin — `extensions.higress.io/v1alpha1`3435Extends Envoy with Wasm-based plugins for auth, AI proxy, rate limiting, transformation, etc.3637```yaml38apiVersion: extensions.higress.io/v1alpha139kind: WasmPlugin40metadata:41 name: ai-proxy42 namespace: higress-system43spec:44 # Plugin source45 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.046 sha256: abc123...47 pluginName: ai-proxy48 imagePullPolicy: IfNotPresent49 imagePullSecret: my-registry-cred5051 # Plugin configuration (global)52 pluginConfig:53 provider:54 type: openai55 apiTokens:56 - "sk-..."57 modelMapping:58 "gpt-4": "gpt-4o"59 timeout: 1200006061 # Default config (applied when no matchRules match)62 defaultConfig: {}63 defaultConfigDisable: false6465 # Failure behavior66 failStrategy: FAIL_CLOSE # FAIL_CLOSE | FAIL_OPEN6768 # Position in filter chain69 phase: AUTHN # UNSPECIFIED_PHASE | AUTHN | AUTHZ | STATS70 priority: 1007172 # Wasm VM config73 vmConfig:74 env:75 - name: LOG_LEVEL76 value: debug7778 # Per-route overrides79 matchRules:80 - domain:81 - "api.example.com"82 config:83 provider:84 type: openai85 apiTokens:86 - "sk-another-token"87 configDisable: false88 - ingress:89 - "my-ingress"90 routeType: HTTP91 configDisable: true92 - service:93 - "llm-service.default.svc"94 config:95 provider:96 type: anthropic97```9899#### Spec Fields100101| Field | Type | Default | Description |102|-------|------|---------|-------------|103| `url` | string | — | Wasm module URL (`oci://...`, `http://...`) |104| `sha256` | string | — | SHA256 checksum |105| `pluginName` | string | — | Plugin name |106| `pluginConfig` | object | — | Plugin config (pass-through to plugin) |107| `defaultConfig` | object | `{}` | Default config for unmatched routes |108| `defaultConfigDisable` | bool | `false` | Disable plugin by default |109| `failStrategy` | enum | `FAIL_CLOSE` | `FAIL_CLOSE` or `FAIL_OPEN` |110| `phase` | enum | — | `UNSPECIFIED_PHASE`, `AUTHN`, `AUTHZ`, `STATS` |111| `priority` | int | — | Ordering within same phase |112| `imagePullPolicy` | enum | — | `UNSPECIFIED_POLICY`, `IfNotPresent`, `Always` |113| `imagePullSecret` | string | — | OCI pull secret name |114| `verificationKey` | string | — | Plugin signature verification key |115| `vmConfig.env` | []EnvVar | — | Wasm VM environment variables |116| `matchRules[]` | []MatchRule | — | Per-route config overrides |117118**MatchRule fields:**119120| Field | Type | Description |121|-------|------|-------------|122| `domain[]` | []string | Match by domain name |123| `ingress[]` | []string | Match by Ingress resource name |124| `service[]` | []string | Match by K8s service name |125| `routeType` | enum | `HTTP` or `GRPC` |126| `config` | object | Plugin config for this rule |127| `configDisable` | bool | Disable plugin for this rule |128129### Http2Rpc — `networking.higress.io/v1`130131Maps HTTP endpoints to Dubbo or gRPC services.132133```yaml134apiVersion: networking.higress.io/v1135kind: Http2Rpc136metadata:137 name: dubbo-user-service138spec:139 # Dubbo destination (oneOf: dubbo XOR grpc)140 dubbo:141 service: com.example.UserService142 version: 1.0.0143 group: prod144 methods:145 - serviceMethod: getUserById146 httpPath: /api/users/:id147 httpMethods:148 - GET149 headersAttach: x-request-id150 params:151 - paramSource: URL_PATH152 paramKey: id153 paramType: java.lang.Long154 - serviceMethod: createUser155 httpPath: /api/users156 httpMethods:157 - POST158 paramFromEntireBody:159 paramType: com.example.User160161 # OR gRPC destination (alternative to dubbo):162 # grpc:163 # proto_descriptor_str: "...base64..."164 # proto_descriptor_file_path: /etc/proto/user.pb165 # services:166 # - com.example.UserService167```168169#### Spec Fields170171| Field | Type | Required | Description |172|-------|------|----------|-------------|173| `dubbo.service` | string | oneOf | Dubbo service interface |174| `dubbo.version` | string | ✅ | Dubbo service version |175| `dubbo.group` | string | ❌ | Dubbo service group |176| `dubbo.methods[].serviceMethod` | string | ✅ | Dubbo method name |177| `dubbo.methods[].httpPath` | string | ✅ | HTTP path to map |178| `dubbo.methods[].httpMethods[]` | []string | ✅ | Allowed HTTP methods |179| `dubbo.methods[].headersAttach` | string | ❌ | Headers to propagate |180| `dubbo.methods[].params[].paramSource` | string | ✅ | `URL_PATH`, `URL_QUERY`, `REQUEST_HEADER` |181| `dubbo.methods[].params[].paramKey` | string | ✅ | Parameter key name |182| `dubbo.methods[].params[].paramType` | string | ✅ | Java type (e.g. `java.lang.Long`) |183| `dubbo.methods[].paramFromEntireBody.paramType` | string | ❌ | Use entire body as param |184| `grpc.proto_descriptor_str` | string | oneOf | Inline protobuf descriptor |185| `grpc.proto_descriptor_file_path` | string | ❌ | Path to proto descriptor file |186| `grpc.services[]` | []string | ✅ | gRPC service names |187188### McpBridge — `networking.higress.io/v1`189190Multi-registry service discovery for integrating external service registries.191192```yaml193apiVersion: networking.higress.io/v1194kind: McpBridge195metadata:196 name: default197 namespace: higress-system198spec:199 registries:200 # Nacos 2.x (gRPC)201 - type: nacos2202 name: my-nacos203 domain: nacos.example.com204 port: 8848205 protocol: HTTP206 nacosNamespaceId: public207 nacosGroups:208 - DEFAULT_GROUP209 nacosRefreshInterval: 5000210211 # Nacos 3.x (MCP auto-discovery)212 - type: nacos3213 name: nacos-mcp214 domain: nacos3.example.com215 port: 8848216 enableMCPServer: true217218 # ZooKeeper219 - type: zookeeper220 name: my-zk221 domain: zk.example.com222 port: 2181223 zkServicesPath:224 - /dubbo225226 # Consul227 - type: consul228 name: my-consul229 domain: consul.example.com230 port: 8500231 consulDatacenter: dc1232 consulServiceTag: prod233234 # Static/DNS235 - type: static236 name: static-backends237 domain: backend.example.com238 port: 8080239240 proxies:241 - type: http_connect242 name: corporate-proxy243 serverAddress: proxy.example.com244 serverPort: 3128245 listenerPort: 80246 connectTimeout: 5000247```248249#### Spec Fields250251| Field | Type | Description |252|-------|------|-------------|253| `registries[]` | []Registry | Service registry configurations |254255**Registry fields:**256257| Field | Type | Description |258|-------|------|-------------|259| `type` | string | `nacos2`, `nacos3`, `nacos`, `zookeeper`, `consul`, `eureka`, `static`, `dns` |260| `name` | string | Registry name |261| `domain` | string | Registry host |262| `port` | int | Registry port |263| `protocol` | string | `HTTP` or `HTTPS` |264| `sni` | string | SNI for TLS |265| `nacosNamespaceId` | string | Nacos namespace ID |266| `nacosGroups` | []string | Nacos groups |267| `nacosAccessKey` | string | Nacos auth key |268| `nacosSecretKey` | string | Nacos auth secret |269| `nacosAddressServer` | string | Nacos address server |270| `nacosRefreshInterval` | int | Refresh interval (ms) |271| `zkServicesPath` | []string | ZooKeeper service paths |272| `consulDatacenter` | string | Consul datacenter |273| `consulNamespace` | string | Consul namespace |274| `consulServiceTag` | string | Consul service tag |275| `consulRefreshInterval` | int | Refresh interval (ms) |276| `authSecretName` | string | Secret name for registry auth |277| `enableMCPServer` | bool | Enable MCP server for Nacos 3.x |278| `allowMcpServers` | []string | Allowed MCP server addresses |279| `mcpServerBaseUrl` | string | MCP server base URL |280| `mcpServerExportDomains` | []string | Domains to export via MCP |281| `enableScopeMcpServers` | bool | Scope MCP servers |282| `vport.default` | int | Default virtual port |283| `vport.services` | []object | Per-service vport overrides |284| `metadata` | map | Extra metadata |285| `proxyName` | string | Proxy name |286287**Proxy fields:**288289| Field | Type | Description |290|-------|------|-------------|291| `type` | string | `http_connect` |292| `name` | string | Proxy name |293| `serverAddress` | string | Proxy server address |294| `serverPort` | int | Proxy server port |295| `listenerPort` | int | Local listener port |296| `connectTimeout` | int | Connection timeout (ms) |297298### EnvoyFilter — `networking.istio.io/v1alpha3`299300Bundled Istio CRD for low-level Envoy filter chain patching.301302```yaml303apiVersion: networking.istio.io/v1alpha3304kind: EnvoyFilter305metadata:306 name: custom-filter307 namespace: higress-system308spec:309 configPatches:310 - applyTo: HTTP_FILTER311 match:312 context: GATEWAY313 listener:314 filterChain:315 filter:316 name: envoy.filters.network.http_connection_manager317 subFilter:318 name: envoy.filters.http.router319 patch:320 operation: INSERT_BEFORE321 value:322 name: envoy.filters.http.lua323 typed_config:324 "@type": type.googleapis.com/envoy.extensions.filters.http.lua.v3.Lua325 inline_code: |326 function envoy_on_request(request_handle)327 -- custom logic328 end329```330331## Wasm Plugin System332333### Plugin Categories (41 built-in)334335| Category | Plugins | Count |336|----------|---------|-------|337| **AI** | ai-proxy, ai-cache, ai-token-ratelimit, ai-quota, ai-security-guard, ai-statistics, ai-rag, ai-search, ai-agent, ai-transformer, ai-prompt-template, ai-prompt-decorator, ai-intent, ai-history, ai-json-resp, ai-data-masking, ai-load-balancer, ai-image-reader, model-mapper, model-router, mcp-router, mcp-server, chatgpt-proxy | 23 |338| **Auth** | basic-auth, key-auth, hmac-auth, hmac-auth-apisix, jwt-auth, simple-jwt-auth, oauth/oidc, ext-auth, opa | 9 |339| **Security** | waf, bot-detect, cors, ip-restriction, request-block, replay-protection | 6 |340| **Traffic** | cluster-key-rate-limit, key-rate-limit, request-validation, traffic-tag, traffic-editor, response-cache | 6 |341| **Transformation** | transformer, custom-response, cache-control, de-graphql, frontend-gray, nginx-rewrite-compatible | 6 |342343### Plugin Languages344- **Go** (69 plugins) — primary, via TinyGo + wasm-go SDK345- **Rust** (5), **C++**, **AssemblyScript**346347### Plugin Loading348- **OCI images**: `oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/<name>:<version>`349- **HTTP distribution**: via plugin-server350- **SDK**: [`github.com/higress-group/wasm-go`](https://github.com/higress-group/wasm-go)351352### WasmPlugin AI Proxy Example353354```yaml355apiVersion: extensions.higress.io/v1alpha1356kind: WasmPlugin357metadata:358 name: ai-proxy-openai359spec:360 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/ai-proxy:1.0.0361 pluginConfig:362 provider:363 type: openai364 apiTokens:365 - "sk-..."366 modelMapping:367 "gpt-4": "gpt-4o"368 timeout: 120000369 protocol: openai # or "original" for native provider protocol370```371372### AI Gateway Provider Options373374| Provider | `type` value | Auth Method |375|----------|-------------|-------------|376| OpenAI | `openai` | `apiTokens[]` |377| Azure OpenAI | `azure` | `apiTokens[]` |378| Anthropic Claude | `claude` | `apiTokens[]` |379| Google Gemini | `gemini` | `apiTokens[]` |380| AWS Bedrock | `aws-bedrock` | IAM (env) |381| DeepSeek | `deepseek` | `apiTokens[]` |382| Moonshot | `moonshot` | `apiTokens[]` |383| Qwen (Tongyi) | `qwen` | `apiTokens[]` |384| Alibaba Bailian | `bailian` | `apiTokens[]` |385| Doubao | `doubao` | `apiTokens[]` |386| Spark (Xunfei) | `spark` | `apiTokens[]` |387| Cloudflare Workers AI | `cloudflare` | `apiTokens[]` |388| Together AI | `together` | `apiTokens[]` |389| OpenRouter | `openrouter` | `apiTokens[]` |390| Mistral | `mistral` | `apiTokens[]` |391| NVIDIA Triton | `nvidia-triton` | — |392393### Common WasmPlugin Patterns394395**Rate Limiting:**396```yaml397spec:398 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/key-rate-limit:1.0.0399 pluginConfig:400 limit: 100401 window_size: 60402 key_source: X-Forwarded-For403```404405**JWT Auth:**406```yaml407spec:408 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/jwt-auth:1.0.0409 pluginConfig:410 consumers:411 - name: myapp412 credential: myapp-secret413 iss: https://auth.example.com414```415416**CORS:**417```yaml418spec:419 url: oci://higress-registry.cn-hangzhou.cr.aliyuncs.com/plugins/cors:1.0.0420 pluginConfig:421 allow_origins: "https://app.example.com"422 allow_methods: "GET,POST,PUT,DELETE"423 allow_headers: "Content-Type,Authorization"424 expose_headers: "X-Custom-Header"425 max_age: 3600426```427428## Common Mistakes429430- **No short names defined** — WasmPlugin/Http2Rpc/McpBridge have no kubectl short names. Use full plural: `kubectl get wasmplugins`, `kubectl get http2rpcs`, `kubectl get mcpbridges`.431- **WasmPlugin url without OCI** — Only `oci://` and `http://` schemes supported. Don't use `docker://`.432- **Image pull secret** — Private OCI registries need `imagePullSecret` referencing a secret in the same namespace.433- **Phase ordering** — Plugins run in order: AUTHN → AUTHZ → STATS. Within same phase, lower priority runs first.434- **matchRules overlap** — If multiple rules match, first match wins. Order `domain` → `ingress` → `service` by priority.435- **Dubbo version required** — `dubbo.version` is required even if not used by the target service.436- **McpBridge registry name** — Each registry in `registries[]` must have a unique `name`.437- **Nacos namespace** — Use `nacosNamespaceId` (not `nacosNamespace` which is legacy) for Nacos multi-tenant.438- **EnvoyFilter complexity** — EnvoyFilter patches are powerful but break on Envoy version upgrades. Prefer WasmPlugin when possible.439- **Gateway API mutual exclusion** — When both Ingress and Gateway API define the same route, Gateway API takes precedence.440- **Fail strategy** — `FAIL_CLOSE` blocks traffic on plugin error. `FAIL_OPEN` passes through. Use `FAIL_CLOSE` for auth, `FAIL_OPEN` for observability.