<p>I can obtain my service by running</p>

<pre><code>$ kubectl get service &lt;service-name&gt; --namespace &lt;namespace name&gt;

NAME          TYPE           CLUSTER-IP  EXTERNAL-IP  PORT(S)       AGE
service name  LoadBalancer   *********   *********    port numbers  16h
</code></pre>

<p>here is my service running at kubernetes but I can't access it through public IP. below are my service and deployment files added . i am using azre devops to build and release container image to azure container registry . As you see above on service describe i got external ip and cluster ip but when i try this ip in browser or use curl i get no response.   `</p>

<pre><code>{
  "kind": "Service",
  "apiVersion": "v1",
  "metadata": {
    "name": "service-name",
    "namespace": "namespace-name",
    "selfLink": "*******************",
    "uid": "*******************",
    "resourceVersion": "1686278",
    "creationTimestamp": "2019-07-15T14:12:11Z",
    "labels": {
      "run": "service name"
    }
  },
  "spec": {
    "ports": [
      {
        "protocol": "TCP",
        "port": 80,
        "targetPort": ****,
        "nodePort": ****
      }
    ],
    "selector": {
      "run": "profile-management-service"
    },
    "clusterIP": "**********",
    "type": "LoadBalancer",
    "sessionAffinity": "None",
    "externalTrafficPolicy": "Cluster"
  },
  "status": {
    "loadBalancer": {
      "ingress": [
        {
          "ip": "*************"
        }
      ]
    }
  }
}
{
  "kind": "Deployment",
  "apiVersion": "extensions/v1beta1",
  "metadata": {
    "name": "deployment-name",
    "namespace": "namespace-name",
    "selfLink": "*************************",
    "uid": "****************************",
    "resourceVersion": "1686172",
    "generation": 1,
    "creationTimestamp": "2019-07-15T14:12:04Z",
    "labels": {
      "run": "deployment-name"
    },
    "annotations": {
      "deployment.kubernetes.io/revision": "1"
    }
  },
  "spec": {
    "replicas": 1,
    "selector": {
      "matchLabels": {
        "run": "deployment-name"
      }
    },
    "template": {
      "metadata": {
        "creationTimestamp": null,
        "labels": {
          "run": "deployment-name"
        }
      },
      "spec": {
        "containers": [
          {
            "name": "deployment-name",
            "image": "dev/containername:50",
            "ports": [
              {
                "containerPort": ****,
                "protocol": "TCP"
              }
            ],
            "resources": {},
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "IfNotPresent"
          }
        ],
        "restartPolicy": "Always",
        "terminationGracePeriodSeconds": 30,
        "dnsPolicy": "ClusterFirst",
        "securityContext": {},
        "schedulerName": "default-scheduler"
      }
    },
    "strategy": {
      "type": "RollingUpdate",
      "rollingUpdate": {
        "maxUnavailable": 1,
        "maxSurge": 1
      }
    },
    "revisionHistoryLimit": 2147483647,
    "progressDeadlineSeconds": 2147483647
  },
  "status": {
    "observedGeneration": 1,
    "replicas": 1,
    "updatedReplicas": 1,
    "readyReplicas": 1,
    "availableReplicas": 1,
    "conditions": [
      {
        "type": "Available",
        "status": "True",
        "lastUpdateTime": "2019-07-15T14:12:04Z",
        "lastTransitionTime": "2019-07-15T14:12:04Z",
        "reason": "MinimumReplicasAvailable",
        "message": "Deployment has minimum availability."
      }
    ]
  }
}
</code></pre>

<p>`</p>

bilal_khan
<p>Apparently there's a mismatch in label and selector:</p>

<p>Service selector</p>

<pre><code>"selector": {
      "run": "profile-management-service"
</code></pre>

<p>While deployment label </p>

<pre><code>"labels": {
      "run": "deployment-name"
    },
</code></pre>

<p>Also check <strong>targetPort</strong> value of the service, it should match <strong>containerPort</strong> of your deployment</p>
