Hi, I have created a pod ``` k run nginx --image nginx ``` and i have create . . .

Flora:
hi, I have created a pod

k run nginx --image nginx

and i have created a Node port svc:

k expose po nginx --name svc-nginx --port 80 --type NodePort

and when I run get svc I have :

svc-nginx    NodePort    10.100.156.236   <none>        80:32024/TCP   8s

but when I do curl like this it is not working, why? :

curl 10.100.156.236:32024
curl svc-nginx:32024

Aditya Samant:
10.100.156.236 is the ClusterIP and can be accessed from within the cluster only.
To use NodePort, you need to use the IP of your node.

Use this command
kubectl get node -o wide

Then use the IP of any of the nodes (controlplane or worker) with the NodePort

curl :32024

Flora:
thanks it works:+1: