Deepak Mourya:
Hi, I have created a nginx pod and expose a service with 8080 port. I am not able to curl my clusterIP for this service
root@controlplane:~# k describe svc nginx
Name: nginx
Namespace: default
Labels: run=nginx
Annotations: <none>
Selector: run=nginx
Type: ClusterIP
IP Families: <none>
IP: 10.102.94.17
IPs: 10.102.94.17
Port: <unset> 8080/TCP
TargetPort: 8080/TCP
Endpoints: 10.244.0.4:8080
Session Affinity: None
Events: <none>
root@controlplane:~# k get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 17m
nginx ClusterIP 10.102.94.17 <none> 8080/TCP 9m45s
root@controlplane:~# curl http://10.102.94.17:8080
curl: (7) Failed to connect to 10.102.94.17 port 8080: Connection refused
root@controlplane:~#