<p>I am trying to set micro-services on Kubernetes on Google Cloud Platform. I've created a <code>deployment</code>, <code>clusterIp</code> and <code>ingress</code> configuration files.</p>

<p>First after creating a cluster, I run this command to install <code>nginx</code> ingress.</p>

<pre><code>helm install my-nginx stable/nginx-ingress --set rbac.create=true
</code></pre>

<p>I use <code>helm v3</code>.</p>

<p>Then I apply deployment and clusterIp configurations.</p>

<p>deployment and clusterIp configurations:</p>

<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: app-production-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      component: app-production
  template:
    metadata:
      labels:
        component: app-production
    spec:
      containers:
        - name: app-production
          image: eu.gcr.io/my-project/app:1.0
          ports:
            - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: app-production-cluser-ip-service
spec:
  type: ClusterIP
  selector:
    component: app-production
  ports:
    - port: 80
      targetPort: 80
      protocol: TCP
</code></pre>

<p>My ingress config is:</p>

<pre><code>apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: ingress-service
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
    - host: app.example.com
      http:
        paths:
          - path: /
            backend:
              serviceName: app-production-cluster-ip-service
              servicePort: 80
</code></pre>

<p>I get this error from Google Cloud Platform logs withing ingress controller:</p>

<pre><code>Error obtaining Endpoints for Service "default/app-production-cluster-ip-service": no object matching key "default/app-production-cluster-ip-service" in local store
</code></pre>

<p>But when I do <code>kubectl get endpoints</code> command the output is this:</p>

<pre><code>NAME                                          ENDPOINTS                     AGE
app-production-cluser-ip-service              10.60.0.12:80,10.60.1.13:80   17m
</code></pre>

<p>I am really not sure what I'm doing wrong.</p>

madeye
<p>The service name mentioned in the ingress not matching. Please recreate a service and check</p>

<pre><code>    apiVersion: v1
    kind: Service
    metadata:
      name: app-production-cluster-ip-service
    spec:
      type: ClusterIP
      selector:
        component: app-production
      ports:
        - port: 80
          targetPort: 80
          protocol: TCP
</code></pre>
