# gateway 無法成功抓取 muli-namesapces HTTProute   背景:目前已經將gist當中的三個yaml藉由kubectl apply上去了,也成功建立gke gateway api的資源(如圖)。其中gateway.yaml與httproute1.yaml執行在default namespace,httproute2.yaml則是執行在eck-elk-stack namespace。 問題:雖然成功建立了gke gateway api,但是當連線ip時僅有 ip/health 成功連線,ip/app/home則回應 ```response 404 (backend NotFound), service rules for the path non-existent ``` 預期結果:gateway api可以成功將/health接到default namespace的prod-bidagent svc,將/app/home接到eck-elk-stack namespace的eck-kibana-kb-http svc。 實際結果:僅/health的route有執行成功。 猜測:[gateway.yaml第八行](https://gist.github.com/JamesLu000/466f2d9a62fdf5b979cea1ac16e228f6#file-gateway-yaml-L8)到第十行not work,以至於無法route multi-namespace的流量 解決方法:[於httproute2.yaml第十一行新增namespace](https://gist.github.com/JamesLu000/466f2d9a62fdf5b979cea1ac16e228f6#file-httproute2-yaml-L11) 具體修正為gist下方回應 [code(gist)](https://gist.github.com/JamesLu000/466f2d9a62fdf5b979cea1ac16e228f6)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up