Ayush
Ayush

Reputation: 131

App not rendering on browser after running services and pods

Problem Facing: When I try to run kubectl apply command on both the files below and try to see the app in the browser in http://192.168.49.2:30080/ the app did not render.I tried to run minikube service fleetman - webapp --url but still no progress . Please Help !!!

Additional information :minikube ip -192.168.49.2 .

Note:I have installed docker Desktop app on my mac book air catalina.

Browser message: This site can’t be reached 192.168.49.2 took too long to respond.

Docker image Link :https://hub.docker.com/r/richardchesterwood/k8s-fleetman-webapp-angular

first-pod.yaml file

apiVersion: v1
kind: Pod
metadata:
 name: webapp
 labels : 
   mylabelname: webapp
spec:
 containers:
   - name: webapp
     image: richardchesterwood/k8s-fleetman-webapp-angular:release0

webapp-services.yaml file

apiVersion: v1
kind: Service
metadata:
  name: fleetman-webapp

spec:
  # This defines which pods are going to be represented by this Service
  # The service becomes a network endpoint for either other services
  # or maybe external users to connect to (eg browser)
  selector:
     mylabelname: webapp

  ports:
    - name: http
      port: 80
      nodePort: 30080

  type: NodePort

Upvotes: 1

Views: 474

Answers (1)

Kamol Hasan
Kamol Hasan

Reputation: 13536

Try creating minikube with driver none:

$ minikube start --driver=none

The none driver allows advanced minikube users to skip VM creation, allowing minikube to be run on a user-supplied VM.

Hence you will be able to communicate to your app via your host (ie. user-supplied VM) network address.

Upvotes: 2

Related Questions