change -o template to -o go-template=...
This commit is contained in:
@@ -108,7 +108,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:
|
||||
|
||||
```sh
|
||||
$ curl http://$(kubectl get pod nginx -o=template -t={{.status.podIP}})
|
||||
$ curl http://$(kubectl get pod nginx -o go-template={{.status.podIP}})
|
||||
```
|
||||
|
||||
Delete the pod by name:
|
||||
|
@@ -217,8 +217,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:
|
||||
|
||||
```console
|
||||
$ export SERVICE_IP=$(kubectl get service nginx-service -o=template -t={{.spec.clusterIP}})
|
||||
$ export SERVICE_PORT=$(kubectl get service nginx-service -o=template '-t={{(index .spec.ports 0).port}}')
|
||||
$ 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}}')
|
||||
$ curl http://${SERVICE_IP}:${SERVICE_PORT}
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user