use short domain name in examples

This commit is contained in:
金戟
2020-01-03 10:14:45 +08:00
parent 16bf014a35
commit bb763cb248
4 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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> #
```
+2 -2
View File
@@ -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> #
```