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

Update service.md #19

Merged
merged 2 commits into from
Mar 8, 2023
Merged

Update service.md #19

merged 2 commits into from
Mar 8, 2023

Conversation

bakerwater
Copy link
Contributor

@bakerwater bakerwater commented Mar 8, 2023

[文档修订以及将issue补充进文档] #5
@guangzhengli

文档修订以及将issue补充进文档
@bakerwater bakerwater marked this pull request as draft March 8, 2023 09:06
@bakerwater bakerwater marked this pull request as ready for review March 8, 2023 09:06
Copy link
Contributor Author

@bakerwater bakerwater left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文档修订,以及对issue的解决

docs/service.md Outdated
@@ -197,7 +197,17 @@ curl http://192.168.59.100:30000
curl http://192.168.59.100:30000
# [v3] Hello, Kubernetes!, From host: hellok8s-deployment-5d5545b69c-24lw5
```
如果是在dockers上构建,那你大概率无法通过`minikube ip`获取到的ip地址来请求,因为在Darwin、Windows、WSL上使用Docker驱动,网络受限,无法直接访问Node IP。你可以通过`minikube service service-hellok8s-nodeport --url`来公开服务,然后通过`curl`或者浏览器访问。(关闭终端或者ctrl+c退出后,服务会自动关闭)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢提交 PR,如果把这一段替换成下面这样的话,我感觉会更加清晰,你觉的可以吗?

如果本地使用 Docker Desktop(minikube start --driver=docker)的话,那你大概率无法通过 minikube ip 获取到的 ip 地址来请求, 因为 docker 部分网络限制导致无法通过 ip 直连 docker container,这代表 NodePort 类型的 Service、Ingress 组件都无法通过 minikube ip 提供的 ip 地址来访问。无法直接访问Node IP。你可以通过 minikube service service-hellok8s-nodeport --url 来公开服务,然后通过 curl 或者浏览器访问。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

赞同,确实会更加清晰

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

那你可以用下面这段话替换再提交一个 commit 吗,这样方便我直接合你的 PR。

如果本地使用 Docker Desktop(minikube start --driver=docker)的话,那你大概率无法通过 minikube ip 获取到的 ip 地址来请求, 因为 docker 部分网络限制导致无法通过 ip 直连 docker container,这代表 NodePort 类型的 Service、Ingress 组件都无法通过 minikube ip 提供的 ip 地址来访问。你可以通过 minikube service service-hellok8s-nodeport --url 来公开服务,然后通过 curl 或者浏览器访问。

@bakerwater
Copy link
Contributor Author

已更改 @guangzhengli

@guangzhengli guangzhengli merged commit 5ce332b into guangzhengli:main Mar 8, 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

Successfully merging this pull request may close these issues.

2 participants