I use kubernetes with ubuntu and regular internet connection.
I created and exposed a deployment with the following properties:
tesb-node:
[ pod ip: 172.17.0.21 ]
[ service ip: 10.99.98.201 ]
[ port: 84 ]
[ service: 192.168.99.108:30178 ]
On the terminal I typed the following command:
minikube service tesb-node
The output from google chrome is:
This site can’t be reached192.168.99.108 refused to connect.
Search Google for 192 168 108 30178
ERR_CONNECTION_REFUSED
Is the app inside testb-node configured to listen on port 84?
Because if it’s not then that would explain why you get connection refused when trying to connect.
K8s is routing the request all the way to the pod but the pod is not listening on port 84.
Just specifying in the YAML isn’t enough, the actual app needs to listen on the correct port also.
That depends on your application.
If you coded it yourself then whatever language or framework you used should have details for changing the port.
If its an off the shelf software then the documentation for the software should have instructions.
It is a simple vs code application. What are the steps to configure a vs code application to listen to correct port after it is already exposed on Kubernetes? Or before?
My current vs code app no longer works somehow. So I tried a Hello world vs code app and then exposed it to kubernetes. The result is still the same.
from google chrome:
This site can’t be reached192.168.99.108 refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
from firefox:
Unable to connect
Firefox can’t establish a connection to the server at 192.168.99.108:30714.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
How do I make configuration for this app to listen to the correct port?
That’s a command line application, not a web service.
I’m not familiar with dotnet so I would suggest you look for some example dotnet web services and try to get a web service running locally on your Ubuntu laptop.
Once you can get it working on your laptop you could then try to get it working on minikube.
This site can’t be reached192.168.99.100 refused to connect.
Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Check your Internet connection
Check any cables and reboot any routers, modems, or other network devices you may be using.
Allow Chrome to access the network in your firewall or antivirus settings.
If it is already listed as a program allowed to access the network, try removing it from the list and adding it again.
If you use a proxy server…
Check your proxy settings or contact your network administrator to make sure the proxy server is working. If you don’t believe you should be using a proxy server: Go to the Chrome menu > Settings > Show advanced settings… > Change proxy settings… and make sure your configuration is set to “no proxy” or “direct.”
I tried this web application on another machine with the following commands:
(The webapp ran ok when I used docker run and pasted 0.0.0.0:7070 in chrome)