Unable to start service

I use kubernetes with ubuntu and regular internet connection.

I created and exposed a deployment with the following properties:
[ pod ip: ]
[ service ip: ]
[ port: 84 ]
[ service: ]

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

How do I resolve or fix this issue?

Is Ubuntu running directly on your laptop/pc or inside a VM?

Ubuntu is running directly on laptop

Can you give the output of:

kubectl get service
minikube service list

And then SSH to minikube VM and run netstat:

minikube ssh
netstat -nal | grep 30178

Can you get output of the above commands?

Kind regards,

kubectl get service

hello-node LoadBalancer 8080:32744/TCP 148d
helo-svc NodePort 82:31647/TCP 159d
kubernetes ClusterIP 443/TCP 165d
my-service LoadBalancer 8080:32734/TCP 158d
my-service2 LoadBalancer 8080:32241/TCP 154d
tesb-node LoadBalancer 84:30178/TCP 147d
tesc-node NodePort 85:31107/TCP 109d

minikube service list


default hello-node
default helo-svc
default kubernetes No node port
default my-service
default my-service2
default tesb-node
default tesc-node
kube-system default-http-backend
kube-system elasticsearch-logging No node port
kube-system heapster No node port
kube-system kibana-logging
kube-system kube-dns No node port
kube-system kubernetes-dashboard No node port
kube-system logviewer
kube-system metrics-server No node port
kube-system monitoring-grafana
kube-system monitoring-influxdb No node port
kube-system registry No node port
storage-gluster heketi No node port
----------------- ----------------------- -----------------------------

minikube ssh

_ _
_ _ ( ) ( )
___ ___ () ___ ()| |/’) _ _ | |_ __
/’ _ _| |/’ _ \| || , < ( ) ( )| '_\ /’\ | ( ) ( ) || || ( ) || || |\\ | () || |) )( /
) (
) (
)()() ()()() ()\___/'(_,__/'_

$ netstat -nal | grep 30178
tcp 0 0 :::30178 :::* LISTEN

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.

Kind regards,

How do I configure the app and pod to listen on the correct port to avoid refused connection?

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?

Well vs code is a code editor, not a language.
Is it a simple hello world type application?

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.
Checking the connection
Checking the proxy and the firewall

from firefox:

Unable to connect
Firefox can’t establish a connection to the server at
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?

Can you share the hello world code here?

Here are some of the codes:


FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env

(# Copy csproj and restore as distinct layers)
COPY *.csproj ./
RUN dotnet restore

(# Copy everything else and build)
COPY . ./
RUN dotnet publish -c Release -o out

(# Build runtime image)
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
COPY --from=build-env /app/out .
ENTRYPOINT [“dotnet”, “myapp4.dll”]


Exe netcoreapp2.2

using System;

namespace myapp4
class Program
static void Main(string args)
Console.WriteLine(“Hello World!”);

If this is not enough what else do I need to include?

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.

Kind regards,

Do you know any example dotnet web services that I can try and use with minikube?

No, I don’t know much about dotnet so can’t really give any recommendations.

Thank you for your suggestion, I am going to look into that.

I created a webapp using visual studio code, then I exposed the app in kubernetes using the following command in ubuntu terminal:

kubectl expose deployment weba-node --name=weba-node --type=LoadBalancer --type=NodePort --port=5010

and the result is: (google chrome)

This site can’t be reached192.168.99.100 refused to connect.

Checking the connection
Checking the proxy and the firewall
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.”


FROM mcr.microsoft.com/dotnet/core/aspnet:3.1 AS base

FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build
COPY [“weba.csproj”, “./”]
RUN dotnet restore “./weba.csproj”
COPY . .
WORKDIR “/src/.”
RUN dotnet build “weba.csproj” -c Release -o /app/build

FROM build AS publish
RUN dotnet publish “weba.csproj” -c Release -o /app/publish

FROM base AS final
COPY --from=publish /app/publish .
ENTRYPOINT [“dotnet”, “weba.dll”]



What other steps can I take to resolve this?

I tried this web application on another machine with the following commands:
(The webapp ran ok when I used docker run and pasted in chrome)

kubectl expose deployment weba1-node --name=weba-1node --type=LoadBalancer --type=NodePort --port=7070

the result is:

This site can’t be reached192.168.99.100 refused to connect.
Checking the connection
Checking the proxy and the firewall

The IP is:
(no mention of port 7070)

How did this happen?