mirror of
https://github.com/wahyd4/kt-connect.git
synced 2026-08-09 05:16:02 +10:00
use short domain name in examples
This commit is contained in:
@@ -70,7 +70,7 @@ $ curl http://172.19.143.139:8080
|
||||
Access Server internal DNS address
|
||||
|
||||
```
|
||||
$ curl http://tomcat.default.svc.cluster.local:8080
|
||||
$ curl http://tomcat:8080
|
||||
```
|
||||
|
||||
### Exchange: Access local from cluster
|
||||
@@ -103,7 +103,7 @@ Access local tomcat by internal service DNS address:
|
||||
> Note: if `kubectl connect` not running, you can only access from cluster
|
||||
|
||||
```
|
||||
$ curl http://tomcat.default.svc.cluster.local:8080 | grep '<h1>'
|
||||
$ curl http://tomcat:8080 | grep '<h1>'
|
||||
<h1>Apache Tomcat/8.5.37</h1> #
|
||||
```
|
||||
|
||||
|
||||
+2
-1
@@ -1 +1,2 @@
|
||||
curl http://tomcat.default.svc.cluster.local:8080 | grep title
|
||||
curl http://tomcat.default.svc.cluster.local:8080 | grep title
|
||||
curl http://tomcat:8080 | grep title
|
||||
+2
-2
@@ -56,7 +56,7 @@ $ curl http://172.19.143.139:8080
|
||||
Access Server internal DNS address
|
||||
|
||||
```
|
||||
$ curl http://tomcat.default.svc.cluster.local:8080
|
||||
$ curl http://tomcat:8080
|
||||
```
|
||||
|
||||
## Exchange: Access local from cluster
|
||||
@@ -86,7 +86,7 @@ Access local tomcat by internal service DNS address:
|
||||
> Note: if `kubectl connect` not running, you can only access from cluster
|
||||
|
||||
```
|
||||
$ curl http://tomcat.default.svc.cluster.local:8080 | grep '<h1>'
|
||||
$ curl http://tomcat:8080 | grep '<h1>'
|
||||
<h1>Apache Tomcat/8.5.37</h1> #
|
||||
```
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ $ curl http://172.19.143.139:8080
|
||||
使用Service的域名访问:
|
||||
|
||||
```
|
||||
$ curl http://tomcat.default.svc.cluster.local:8080
|
||||
$ curl http://tomcat:8080
|
||||
```
|
||||
|
||||
## Exchange: 将集群流量转发到本地
|
||||
@@ -86,7 +86,7 @@ SSH Remote port-forward for POD starting
|
||||
> 注意如果未运行`ktctl connect`,只能从集群内访问
|
||||
|
||||
```
|
||||
$ curl http://tomcat.default.svc.cluster.local:8080 | grep '<h1>'
|
||||
$ curl http://tomcat:8080 | grep '<h1>'
|
||||
<h1>Apache Tomcat/8.5.37</h1> #
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user