Hi,
I have create a deployment and a nodeport service. The describe svc command shows that svc can route the traffic to 2 replicas and the type is nodePort with the node port that is asked in question, but not sure why the question says that svc is not accessible from outside. Can you please help me to understand what I missed there:
Hi @powerofviva
How was the Service of type NodePort created? The NodePort value when you describe the Service shows http 31800/TCP
. Here http
is the name assigned to ports called named ports. You can remove the http
and try.
Another issue I see is, port
and targetport
set to 8080
whereas, the default port for nginx is 80
.
Or
You can use the imperative command (screenshot) to save the config to YAML and manually set the nodePort
value to 31080
under the ports list.
Regards.