A2A エージェントカードの URL が Kubernetes で 0.0.0.0 になり通信に失敗する
EKS 上で Travel Agent から Weather Agent に A2A 通信しようとしたら、以下のエラーで失敗した。
A2AClientHTTPError: HTTP Error 503: Network communication error
fetching agent card from http://0.0.0.0:9000/.well-known/agent-card.json:
All connection attempts failed原因は A2A サーバーがデフォルトで host=0.0.0.0 にバインドし、エージェントカードの url フィールドにもそのまま http://0.0.0.0:9000/ を記載すること。カードの取得自体は a2a_agents.json の URL で成功するが、LLM がカード内の url を読んで a2a_send_message の target_agent_url に渡すため、クラスター内で到達不能な 0.0.0.0 への接続を試みてしまう。
Helm values で a2a.http_url に Kubernetes Service の FQDN を設定すれば解決する。
a2a:
http_url: "http://weather-agent.agents:9000/"これでカードの url が http://weather-agent.agents:9000/ に書き換わり、クラスター内の他のエージェントから正しく到達できるようになった。
