fix(smoke-test): dynamically fetch node name for service curl test

pull/811/head
Shahrooz Aghili 2024-09-20 09:52:40 +02:00
parent a9cb5f7ba5
commit 473c267609
1 changed files with 6 additions and 1 deletions

View File

@ -168,11 +168,16 @@ Retrieve the node port assigned to the `nginx` service:
NODE_PORT=$(kubectl get svc nginx \
--output=jsonpath='{range .spec.ports[0]}{.nodePort}')
```
Identify the node where the nginx pod is scheduled:
```bash
NODE_NAME=$(kubectl get pod -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_NAME}:${NODE_PORT}
```
```text