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

在一个 pod 中, 无法 ping 通同一个命名空间下的 service 的 cluster IP #232

Open
nimo10050 opened this issue Nov 17, 2023 · 0 comments

Comments

@nimo10050
Copy link

环境

mac book pro2018( intel 处理器)
Docker Desktop (Engine: 24.0.2)
Kubernetes: v1.25.9

现象

default 命名空间下, 有一个 test-nginx 的 pod , 有一个 hello-nginx 的 service

nimo@MacbookPro ~ % kubectl get svc
NAME          TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
hello-nginx   ClusterIP   10.105.66.131   <none>        8080/TCP   84m
kubernetes    ClusterIP   10.96.0.1       <none>        443/TCP    13d
my-nginx      ClusterIP   10.100.123.87   <none>        88/TCP     4d10h

pod 里面, 无法通过 cluster ipservice name, ping 通 service

root@test-nginx:/etc# ping hello-nginx
PING hello-nginx.default.svc.cluster.local (10.105.66.131) 56(84) bytes of data.
^C
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

1 participant