<p>I dockerized this <a href="https://github.com/dstar55/docker-hello-world-spring-boot" rel="nofollow noreferrer">https://github.com/dstar55/docker-hello-world-spring-boot</a> example and deployed to my Azure kubernetes cluster and the image won't display in the internal or external IP. I can't seem to figure it out! It's driving me nuts. Any help or advise? Thanks!</p>

<p>It should just print hello world in the web browser.</p>

<p>I'm running Kubernetes in Windows 10. To access Kubernetes I'm running</p>

<p>az aks browse --resource-group docker-cluster --name final2</p>

<p>It then connects and I'm able to view the dashboard locally. When I click services to find the internal IP, when I type this in the browser I'm getting this error. </p>

<p><a href="https://i.stack.imgur.com/7lx1H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7lx1H.png" alt="The dashboard is up and this is the service I am trying to run in the browser"></a>
<a href="https://i.stack.imgur.com/5oADg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5oADg.png" alt="Error"></a></p>

<p>Yaml File - </p>

<pre><code>{
  "kind": "Deployment",
  "apiVersion": "extensions/v1beta1",
  "metadata": {
    "name": "spring-boot-example-3",
    "namespace": "default",
    "selfLink": "/apis/extensions/v1beta1/namespaces/default/deployments/spring-boot-example-3",
    "uid": "5fd1ec75-1c6d-11ea-bd7c-a63f8eaf100e",
    "resourceVersion": "11119",
    "generation": 2,
    "creationTimestamp": "2019-12-11T23:24:27Z",
    "labels": {
      "k8s-app": "spring-boot-example-3"
    },
    "annotations": {
      "deployment.kubernetes.io/revision": "1"
    }
  },
  "spec": {
    "replicas": 3,
    "selector": {
      "matchLabels": {
        "k8s-app": "spring-boot-example-3"
      }
    },
    "template": {
      "metadata": {
        "name": "spring-boot-example-3",
        "creationTimestamp": null,
        "labels": {
          "k8s-app": "spring-boot-example-3"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "spring-boot-example-3",
            "image": "bcook88/spring-boot4",
            "resources": {},
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "Always",
            "securityContext": {
              "privileged": false
            }
          }
        ],
        "restartPolicy": "Always",
        "terminationGracePeriodSeconds": 30,
        "dnsPolicy": "ClusterFirst",
        "securityContext": {},
        "schedulerName": "default-scheduler"
      }
    },
    "strategy": {
      "type": "RollingUpdate",
      "rollingUpdate": {
        "maxUnavailable": "25%",
        "maxSurge": "25%"
      }
    },
    "revisionHistoryLimit": 10,
    "progressDeadlineSeconds": 600
  },
  "status": {
    "observedGeneration": 2,
    "replicas": 3,
    "updatedReplicas": 3,
    "readyReplicas": 3,
    "availableReplicas": 3,
    "conditions": [
      {
        "type": "Progressing",
        "status": "True",
        "lastUpdateTime": "2019-12-11T23:24:31Z",
        "lastTransitionTime": "2019-12-11T23:24:27Z",
        "reason": "NewReplicaSetAvailable",
        "message": "ReplicaSet \"spring-boot-example-3-66d65987d7\" has successfully progressed."
      },
      {
        "type": "Available",
        "status": "True",
        "lastUpdateTime": "2019-12-11T23:29:11Z",
        "lastTransitionTime": "2019-12-11T23:29:11Z",
        "reason": "MinimumReplicasAvailable",
        "message": "Deployment has minimum availability."
      }
    ]
  }
}
</code></pre>

<p>Serivce - </p>

<pre><code>    {
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "spring-boot-example-3",
    "namespace": "default",
    "selfLink": "/api/v1/namespaces/default/services/spring-boot-example-3",
    "uid": "5fdaa8c1-1c6d-11ea-bd7c-a63f8eaf100e",
    "resourceVersion": "23726",
    "creationTimestamp": "2019-12-11T23:24:27Z",
    "labels": {
      "k8s-app": "spring-boot-example-3"
    }
  },
  "spec": {
    "ports": [
      {
        "name": "tcp-80-85-67vw4",
        "protocol": "TCP",
        "port": 80,
        "targetPort": 85,
        "nodePort": 30910
      }
    ],
    "selector": {
      "k8s-app": "spring-boot-example-3"
    },
    "clusterIP": "10.0.91.29",
    "type": "LoadBalancer",
    "sessionAffinity": "None",
    "externalTrafficPolicy": "Cluster"
  },
  "status": {
    "loadBalancer": {
      "ingress": [
        {
          "ip": "52.141.220.136"
        }
      ]
    }
  }
}
</code></pre>

<p>The log shows that the application is running correctly and it does run correctly locally. </p>

<p><a href="https://i.stack.imgur.com/KdXKS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KdXKS.png" alt="Log showing successful execution. Should be able to pull this up in a web browser and see hello world"></a></p>

notech214
<p>According to the screenshot that you provide, it seems you create the service with a NodePort type Load Balancer for your application. It means you cannot access your application outside the AKS cluster nodes(generally the nodes do not have public IP). And you need to change the port with 8080 instead of 80 like it shows in the Dockerfile.</p>

<p>The solution is that you need to recreate your service with the load balancer type, then it will give you an external IP which you can access outside the cluster through the browser.</p>

<p>And you can also take a look at <a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">Publishing the services(service types)</a>.</p>
