Update 12-smoke-test.md

Fixing to cater to the possibility that the nginx pod is not running on node-0
pull/852/head
mitchshiotani 2025-03-11 17:55:09 +09:00 committed by GitHub
parent 5a325c23d7
commit f6a63bc2d0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -168,12 +168,17 @@ NODE_PORT=$(kubectl get svc nginx \
--output=jsonpath='{range .spec.ports[0]}{.nodePort}')
```
Retrieve the hostname of the node on which the `nginx` pod is running on:
```bash
NODE_HOST=$(kubectl get pods -l app=nginx \
-o jsonpath="{.items[0].spec.nodeName}")
```
Make an HTTP request using the IP address and the `nginx` node port:
```bash
curl -I http://node-0:${NODE_PORT}
curl -I http://${NODE_HOST}:${NODE_PORT}
```
```text