title: Ingress fanout gets Error: Server Error The server encountered a temporary error and could not complete your request. Please try again in 30 seconds
body: <p>I have 2 services. I want to create ingress fanout for them. 1 service runs properly, the other one  says</p>
  <blockquote>
  <p>Error: Server Error
  The server encountered a temporary error and could not complete your request.</p>
  <p>Please try again in 30 seconds.</p>
  </blockquote>
  <p>I opened all firewall settings. here are some details</p>
  <pre><code>bahaddin@b k get ingress -n ingress-nginx 
  
  
  NAME             CLASS    HOSTS   ADDRESS        PORTS   AGE
  
  fanout-ingress   &lt;none&gt;   *       35.201.67.49   80      2m57s
  
  
  bahaddin@bahaddin-ThinkPad-E15-Gen-2:~/projects/personal/exposer/k8s-ingress$ k get svc -n ingress-nginx
  NAME                                 TYPE           CLUSTER-IP     EXTERNAL-IP      PORT(S)                      AGE
  ingress-nginx-controller             LoadBalancer   10.12.1.185    34.134.200.199   80:30803/TCP,443:32306/TCP   10m
  ingress-nginx-controller-admission   ClusterIP      10.12.0.83     &lt;none&gt;           443/TCP                      10m
  web                                  NodePort       10.12.12.129   &lt;none&gt;           8080:30702/TCP               7m43s
  web2                                 NodePort       10.12.5.55     &lt;none&gt;           8080:30160/TCP               7m42s
  </code></pre>
  <p>Here you see that external IP of ingress-nginx-controller (34.134.200.199) is different than fanout-ingress address. but when firstly the fanout-ingress has created , it was the same IP as ingress-nginx-controller (34.134.200.199). I cannot understand why, after some seconds it has gained the newer IP (35.201.67.49). I would be happy to get answer this as well.</p>
  <p>The main question is , when I curl <a href="http://35.201.67.49/v2/" rel="nofollow noreferrer">http://35.201.67.49/v2/</a> I get the result properly. But when I curl <a href="http://35.201.67.49/web1/hello" rel="nofollow noreferrer">http://35.201.67.49/web1/hello</a> - which is another service and defined on service, ingress and deployment files below -  is not reachable. When I curl 35.201.67.49/web1/hello i got an error</p>
  <blockquote>
  <p>Error: Server Error The server encountered a temporary error and could
  not complete your request.</p>
  <p>Please try again in 30 seconds.</p>
  </blockquote>
  <p>fanput-ingress.yaml</p>
  <pre><code>apiVersion: networking.k8s.io/v1beta1
  kind: Ingress
  metadata:
    name: fanout-ingress
    namespace: ingress-nginx
  spec:
    rules:
      - http:
          paths:
            - path: /web1/*
              backend:
                serviceName: web
                servicePort: 8080
            - path: /v2/*
              backend:
                serviceName: web2
                servicePort: 8080
  </code></pre>
  <p>deployment and services</p>
  <pre><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: web
    namespace: ingress-nginx
  spec:
    selector:
      matchLabels:
        run: web
    template:
      metadata:
        labels:
          run: web
      spec:
        containers:
          - image: bago1/web1:latest
            imagePullPolicy: IfNotPresent
            name: web
            ports:
              - containerPort: 8080
                protocol: TCP
  ---
  apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: web2
    namespace: ingress-nginx
  spec:
    selector:
      matchLabels:
        run: web2
    template:
      metadata:
        labels:
          run: web2
      spec:
        containers:
          - image: gcr.io/google-samples/hello-app:2.0
            imagePullPolicy: IfNotPresent
            name: web2
            ports:
              - containerPort: 8080
                protocol: TCP
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: web
    namespace: ingress-nginx
  spec:
    ports:
      - port: 8080
        protocol: TCP
        targetPort: 8080
    selector:
      run: web
    type: NodePort
  
  ---
  apiVersion: v1
  kind: Service
  metadata:
    name: web2
    namespace: ingress-nginx
  spec:
    ports:
      - port: 8080
        protocol: TCP
        targetPort: 8080
    selector:
      run: web2
    type: NodePort
  </code></pre>
  <p>Here <a href="https://i.stack.imgur.com/UFlMB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UFlMB.png" alt="The result when I call API" /></a></p>