Skip to main content

Access the Application in a Pod

In the previous tutorial, we created a Pod that runs an Nginx container. Now, let's see how to access the application running inside the Pod.

Generally, when we run an Nginx server, it comes with default "Welcome to nginx!" page. On Windows, we hit the localhost:80 in a browser and on Linux we run curl localhost:80 command to see this default web page.

To access this page, we need to expose the Pod's port to the outside world. We can do this using a Kubernetes Service.

Since we have this Nginx Pod on minikube, how do we access?

Accessing the Application in a Pod

For now, to access this application

  1. we first need to know the IP address of the Pod. We can get the IP either by using the describe command or by the wide option with the get pods command.
kubectl describe pod frontend-pod

vagrant@vagrant:~$ kubectl describe pod frontend-pod Name: frontend-pod Namespace: default Priority: 0 Service Account: default Node: minikube/192.168.49.2 Start Time: Sun, 07 Jun 2026 06:34:30 +0000 Labels: <none> Annotations: <none> Status: Running IP: 10.244.0.10

kubectl get pods -o wide

vagrant@vagrant:~/kubernetes-tutorial$ kubectl get pods -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES frontend-pod 1/1 Running 0 27m 10.244.0.10 minikube <none> <none>

  1. SSH to the minikube node
minikube ssh
  1. Once you are inside the minikube node, you can use curl to access the application using the Pod's IP address:
curl 10.244.0.10
docker@minikube:~$ curl 10.244.0.10
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
  body {
      width: 35em;
      margin: 0 auto;
      font-family: Tahoma, Verdana, Arial, sans-serif;
  }
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>

<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>

<p><em>Thank you for using nginx.</em></p>
</body>
</html>