i am not able to access my application from browser. What mistake i am doing ?
if i give Ipaddress:30010 -> my app is not getting reached. (attached my pod.yaml and service.yaml here in attachment)
You need to add targetPort
setting in the ports section on your Service.yaml. This specifies the destination port of the container.
ports:
- name: http
port: 5432
targetPort: 5432
nodePort: 30010
port
is a setting for in-cluster communication, that other containers in the cluster can access via {serviceName}:port
.
You need to find your node ip. If you are using minikube then you find node ip list. By running kubectl cluster-info. Then in your browser go to http:node-ip:30010