Service NodePort
Applications running in a Kubernetes cluster find and communicate with each other, and the outside world, through the Service abstraction
We are using a Nginx webserver that echoes back the source IP of requests it receives through an HTTP header.
Create a Nginx WebServer with echoserver Image
Expose the echoserver Image pod with the help of a service.
Get the Service IP Address
Run a Client Server to test NodePort Connectivity
Inside the Busy Box Image, we are going to run the below commands.
Check the IP Address of the Client.
Use Wget to call the Web-app-svc from the Busybox Pod
Replace "10.0.170.92" with the IPv4 address of the Kubernetes Worker Node and Port which is in 30000 range.
If you observe the output has "client_address"
The client_address is not always the client pod's IP address. there a natting done, when it is sent to Destination.
Cleanup
Delete Service and Deployment
Last updated