Merge pull request #320 from chentao1596/fix-test-http-service

update some descriptions about of 'Test HTTP Service'
This commit is contained in:
Manuel Alejandro de Brito Fontes 2017-02-24 20:59:56 -03:00 committed by GitHub
commit ff3674fcc6

View file

@ -27,8 +27,8 @@ key/cert pair with an arbitrarily chosen hostname, created as follows
```console ```console
$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=nginxsvc/O=nginxsvc" $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=nginxsvc/O=nginxsvc"
Generating a 2048 bit RSA private key Generating a 2048 bit RSA private key
......................................................................................................................................+++ ................+++
....................................................................+++ ................+++
writing new private key to 'tls.key' writing new private key to 'tls.key'
----- -----
@ -38,7 +38,7 @@ secret "tls-secret" created
## Test HTTP Service ## Test HTTP Service
All examples that require a test HTTP Service use the standard echoheaders pod, All examples that require a test HTTP Service use the standard http-svc pod,
which you can deploy as follows which you can deploy as follows
```console ```console
@ -47,35 +47,35 @@ service "http-svc" created
replicationcontroller "http-svc" created replicationcontroller "http-svc" created
$ kubectl get po $ kubectl get po
NAME READY STATUS RESTARTS AGE NAME READY STATUS RESTARTS AGE
echoheaders-p1t3t 1/1 Running 0 1d http-svc-p1t3t 1/1 Running 0 1d
$ kubectl get svc $ kubectl get svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
echoheaders 10.0.122.116 <none> 80/TCP 1d http-svc 10.0.122.116 <pending> 80:30301/TCP 1d
``` ```
You can test that the HTTP Service works by exposing it temporarily You can test that the HTTP Service works by exposing it temporarily
```console ```console
$ kubectl patch svc echoheaders -p '{"spec":{"type": "LoadBalancer"}}' $ kubectl patch svc http-svc -p '{"spec":{"type": "LoadBalancer"}}'
"echoheaders" patched "http-svc" patched
$ kubectl get svc echoheaders $ kubectl get svc http-svc
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
echoheaders 10.0.122.116 <pending> 80:32100/TCP 1d http-svc 10.0.122.116 <pending> 80:30301/TCP 1d
$ kubectl describe svc echoheaders $ kubectl describe svc http-svc
Name: echoheaders Name: http-svc
Namespace: default Namespace: default
Labels: app=echoheaders Labels: app=http-svc
Selector: app=echoheaders Selector: app=http-svc
Type: LoadBalancer Type: LoadBalancer
IP: 10.0.122.116 IP: 10.0.122.116
LoadBalancer Ingress: 108.59.87.136 LoadBalancer Ingress: 108.59.87.136
Port: http 80/TCP Port: http 80/TCP
NodePort: http 32100/TCP NodePort: http 30301/TCP
Endpoints: 10.180.1.6:8080 Endpoints: 10.180.1.6:8080
Session Affinity: None Session Affinity: None
Events: Events:
FirstSeen LastSeen Count From SubObjectPath Type Reason Message FirstSeen LastSeen Count From SubObjectPath Type Reason Message
--------- -------- ----- ---- ------------- -------- ------ ------- --------- -------- ----- ---- ------------- -------- ------ -------
@ -102,8 +102,8 @@ user-agent=curl/7.46.0
BODY: BODY:
-no body in request- -no body in request-
$ kubectl patch svc echoheaders -p '{"spec":{"type": "NodePort"}}' $ kubectl patch svc http-svc -p '{"spec":{"type": "NodePort"}}'
"echoheaders" patched "http-svc" patched
``` ```
## Ingress Class ## Ingress Class