0

Not able to access deployed application url on ibm ICP kubernetes using nodeport.

Application run successfully but not able to access on browser when launch the application.

logs run command - kubectl describe pods <podname>

logs -

       roar-app:
        Container ID:   docker://c3ac3059f493a9567fd79d76879dc7fa230a6790969e2f8ea6c922ed37300480
        Image:          mycluster.icp:8500/ibmcom/roartomcat:2
        Image ID:       docker- 

     pullable://mycluster.icp:8500/ibmcom/roartomcat@sha256:c85353bc1cba104940e8f008752decc38b2191af06af7e0bc7fa7c4b83138570
        Port:           <none>
        Host Port:      <none>
        State:          Running
          Started:      Fri, 31 Jan 2020 06:33:50 +0000
        Ready:          True
        Restart Count:  0
        Limits:
          cpu:     500m
          memory:  2Gi
        Requests:
          cpu:        100m
          memory:     128Mi
        Environment:  <none>
        Mounts:
          /var/run/secrets/kubernetes.io/serviceaccount from default-token-kb5vk (ro)
       Conditions:
      Type              Status
      Initialized       True 
      Ready             True 
      ContainersReady   True 
      PodScheduled      True 
     Volumes:
      default-token-kb5vk:
        Type:        Secret (a volume populated by a Secret)
        SecretName:  default-token-kb5vk
        Optional:    false
      QoS Class:       Burstable
      Node-Selectors:  <none>
      Tolerations:     node.kubernetes.io/memory-pressure:NoSchedule
                     node.kubernetes.io/not-ready:NoExecute for 300s
                     node.kubernetes.io/unreachable:NoExecute for 300s
     Events:
      Type    Reason     Age    From                  Message
      ----    ------     ----   ----                  -------
      Normal  Scheduled  9m45s  default-scheduler     Successfully assigned default/roar-app-7d68649546-xwx6p 
     to 10.99.15.21
      Normal  Pulling    9m28s  kubelet, 10.99.15.21  pulling image "mycluster.icp:8500/ibmcom/roartomcat:2"
      Normal  Pulled     9m22s  kubelet, 10.99.15.21  Successfully pulled image "mycluster.icp:8500/ibmcom/roartomcat:2"
      Normal  Created    9m22s  kubelet, 10.99.15.21  Created container
      Normal  Started    9m21s  kubelet, 10.99.15.21  Started container

access application url - <ip>:<nodeport>/<mapping url>

http://10.99.15.26:31762/ne

Error - This site can’t be reached 10.99.15.26 took too long to respond.

Try:

    Checking the connection
    Checking the proxy and the firewall
    Running Windows Network Diagnostics

Can anybody to help figure out this issue how to access the application using nodeport host url if it was not a right way as Not able to access deployed application url on IBM ICP kubernetes using nodeport. application run successfully but not able to access on browser when launch the application.

Anuradha Fernando
  • 1,063
  • 12
  • 17
Ansh Jain
  • 43
  • 6
  • How you accessing the private IP address from the browser? did you try sending a curl request to the ```http://10.99.15.26:31762/ne1``` from a different node in the sam e 10.99.15.xxx network? – Anuradha Fernando Jan 31 '20 at 08:36
  • 1
    If the curl works fine, that means there is an access error. The given IP address is not public, thus you have to find the public IP address assigned to the node by ICP, and make sure the ```TCP:31726``` is open from the firewall and use the public IP address to access the service. – Anuradha Fernando Jan 31 '20 at 08:38
  • I am trying using postman but its not work, for curl its also not accessable – Ansh Jain Jan 31 '20 at 08:46
  • This is a proxy ip 10.99.15.26 which was try to access in browser – Ansh Jain Jan 31 '20 at 09:02
  • What's the output of `kubectl get svc -o wide` command ? – mario Jan 31 '20 at 14:25
  • What are the `targetPort` and the `selector` settings on the service exposing this NodePort? Does it match the port that the container is exposing? – Justin Kulikauskas Feb 02 '20 at 22:52
  • The output of kubectl get svc -o wide is roar-app NodePort 10.0.117.86 8090:31762/TCP 3d16h app=roar-app,run=roar-app – Ansh Jain Feb 03 '20 at 04:59
  • target port is 8080, yes it match the port of the container that is exposing – Ansh Jain Feb 03 '20 at 05:01
  • can anybody update on it – Ansh Jain Feb 06 '20 at 05:45
  • In the output you added I see port `8090`. Could you run `kubectl get svc roar-app -o yaml` and post its result in your question ? – mario Feb 10 '20 at 17:39
  • This is a port enabled issue by open the port to the ip is working – Ansh Jain Feb 17 '20 at 07:08

0 Answers0