I'm learning kubernetes via a LinkedIn learning course. A tutorial I'm doing runs this hello world application via kubectl
and minikube
. Everything appears in working order, but I cannot interact with the application using minikube service helloworld
. The request keeps timing out.
The tutorial first asks to create a deployment using the command kubectl create -f helloworld.yaml
then to expose the service via command kubectl expose deployment helloworld --type=NodePort
and then it says interact with the app by doing minikube service helloworld
. The diagnostics after create and expose show that everything on my end matches the tutorial's setup, but the last step fails for me whereas it launches the browser and shows the hello world app in the tutorial demo.
How would I go about debugging this error as an absolute beginner?
EDIT:
When I run kubectl describe services
, I get the following output
$ kubectl describe services
Name: helloworld
Namespace: default
Labels: <none>
Annotations: <none>
Selector: app=helloworld
Type: NodePort
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.96.6.203
IPs: 10.96.6.203
Port: <unset> 80/TCP
TargetPort: 80/TCP
NodePort: <unset> 30433/TCP
Endpoints: 172.17.0.2:80
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
When I check the port 30433, by doing nc -zv <hostname> 30433
, I get an error:
nc: connectx to <hostname> port 30433 (tcp) failed: Connection refused
nc: connectx to <hostname> port 30433 (tcp) failed: Network is unreachable