Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request Crane Dashboard Service of Proxy Interface,Appear 502 Bad Gateway #791

Closed
ChenZhuang1217 opened this issue May 11, 2023 · 4 comments

Comments

@ChenZhuang1217
Copy link

ChenZhuang1217 commented May 11, 2023

Describe the bug

Request Crane Dashboard Service of Proxy Interface,Appear 502 Bad Gateway

Reproduce steps

curl Craned-Service-ClusterIP:9090/api/v1/cluster

image

Expected #behavior

Modify Dashboard's ConfigMap to change all agent port 8082 requests in Nginx to 127.0.0.1 and communicate through the local Lo card.

Because in Kubernetes, the Pod cannot access itself directly through Service and port unless configured with -hairpin-mode.

image

Environment (please complete the following information):

  • K8S Version: [1.18.3]
  • Crane Version: [0.9.0]
  • Browser [chrome]
@ChenZhuang1217 ChenZhuang1217 added the kind/bug Something isn't working label May 11, 2023
@qmhu
Copy link
Member

qmhu commented May 11, 2023

Why to change the configmap and expect it works?
And why we need to support it?

@ChenZhuang1217
Copy link
Author

为什么要更改 configmap 并期望它有效? 为什么我们需要支持它?

If no adjustment is made, 502 Bad Gateways are displayed when clusters are added to the Dashboard. Since the two containers are in the same Pod, you are advised to use the Lo local NIC for communication.

@ChenZhuang1217
Copy link
Author

Why to change the configmap and expect it works? And why we need to support it?

The cluster is always in the confirmation state
image

Dashboard Container Log Output Request Interface 502
image

@qmhu
Copy link
Member

qmhu commented May 12, 2023

这里主要的考虑是通过DNS Domain访问服务,这样可以兼容各种环境的场景,如果你本地遇到访问不通的问题,可以自己修改配置解决。但是整体项目的配置会考虑更通用的场景。我不认为一个bug。

@qmhu qmhu removed the kind/bug Something isn't working label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants