@@ -67,7 +67,7 @@ On most providers, the pod IPs are not externally accessible. The easiest way to
|
||||
Provided the pod IP is accessible, you should be able to access its http endpoint with curl on port 80:
|
||||
|
||||
```shell
|
||||
$ curl http://$(kubectl get pod nginx -o go-template={{.status.podIP}})
|
||||
$ curl http://$(kubectl get pod nginx -o go-template={% raw %}{{.status.podIP}}{% endraw %})
|
||||
```
|
||||
|
||||
Delete the pod by name:
|
||||
@@ -162,4 +162,4 @@ Finally, we have also introduced an environment variable to the `git-monitor` co
|
||||
## What's Next?
|
||||
|
||||
Continue on to [Kubernetes 201](/docs/user-guide/walkthrough/k8s201) or
|
||||
for a complete application see the [guestbook example](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/guestbook/)
|
||||
for a complete application see the [guestbook example](https://github.com/kubernetes/kubernetes/tree/{{page.githubbranch}}/examples/guestbook/)
|
||||
|
||||
@@ -106,8 +106,8 @@ On most providers, the service IPs are not externally accessible. The easiest wa
|
||||
Provided the service IP is accessible, you should be able to access its http endpoint with curl on port 80:
|
||||
|
||||
```shell
|
||||
$ export SERVICE_IP=$(kubectl get service nginx-service -o go-template={{.spec.clusterIP}})
|
||||
$ export SERVICE_PORT=$(kubectl get service nginx-service -o go-template'={{(index .spec.ports 0).port}}')
|
||||
$ export SERVICE_IP=$(kubectl get service nginx-service -o go-template={% raw %}{{.spec.clusterIP}}{% endraw %})
|
||||
$ export SERVICE_PORT=$(kubectl get service nginx-service -o go-template={% raw %}{{(index .spec.ports 0).port}}{% endraw %})
|
||||
$ curl http://${SERVICE_IP}:${SERVICE_PORT}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user