<p>I have deployed java API in ACR and pushed to Kubernetes. I am able to post the data to the service when I use a proxy. but the same service is not working using exposed endpoint. PFB corresponding Kubernetes YAML file:</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: taxservice-deployment
  labels:
    app: taxserviceapi
spec:
  replicas: 1
  template:
    metadata:
      name: taxserviceapi
      labels:
        app: taxserviceapi
    spec:
      containers:
      - name: taxserviceapi
        image : 3poacr.azurecr.io/3potaxservice:latest
        imagePullPolicy: Always
        ports:
        - containerPort: 8080
      restartPolicy: Always
      imagePullSecrets:
      - name: regcret5
  selector:
   matchLabels:
    app: taxserviceapi
---
apiVersion: v1
kind: Service
metadata:
  name: taxservice-service
spec:
  type: NodePort
  ports:
  - port: 80
    protocol: TCP
    targetPort: 8080
  selector:
    app: taxserviceapi
  externalTrafficPolicy: Local
</code></pre>

Girish
<p>In your service definition, you need to replace spec.type from <code>NodePort</code> to e.g., <code>LoadBalancer</code>.</p>

<p>See more information here:
<a href="https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types</a></p>
