Kubernetes Istio ingress gateway responds with 503 always

前端 未结 1 520
旧时难觅i
旧时难觅i 2021-01-26 14:12

I\'m configuring Istio using Helm. Here you can find my istio-config.yaml:

global:
  proxy:
    accessLogFile: \"/dev/stdout\"
    resources:
               


        
相关标签:
1条回答
  • 2021-01-26 14:44

    I solve this problem. istio-gateway was not capable to do redirect due to one of my services have a ClusterIP assigned:

    $ kubectl get svc --all-namespaces
    NAMESPACE              NAME                             TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)                                                                                                                                      AGE
    default                activemq                         ClusterIP      None             <none>        61616/TCP                                                                                                                                    3h17m
    default                api-exchange                     ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h16m
    default                api-response                     ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h16m
    default                authorization-server             ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h17m
    default                de-communication                 ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h16m
    default                gateway                          ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h17m
    default                identity                         ClusterIP      None             <none>        88/TCP,8080/TCP                                                                                                                              3h18m
    default                kubernetes                       ClusterIP      10.96.0.1        <none>        443/TCP                                                                                                                                      3h19m
    default                matchengine                      ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h16m
    default                monitor-redis                    ClusterIP      None             <none>        8081/TCP                                                                                                                                     3h17m
    default                postgres                         ClusterIP      None             <none>        5432/TCP                                                                                                                                     3h18m
    default                redis                            ClusterIP      None             <none>        6379/TCP                                                                                                                                     3h18m
    default                synchronization                  ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h15m
    default                tx-flow                          ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h15m
    default                tx-manager                       ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h15m
    default                tx-scheduler                     ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h15m
    default                ubc-config                       ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h16m
    default                ubc-services-config              ClusterIP      None             <none>        8888/TCP                                                                                                                                     3h18m
    default                user-admin                       ClusterIP      None             <none>        8080/TCP                                                                                                                                     3h17m
    

    Here one of my YAML with ClusterIP: None:

    apiVersion: v1
    kind: Service
    metadata:
      name: ubc-config
      labels:
        app: ubc-config
    spec:
      clusterIP: None
      ports:
      - port: 8080
        name: ubc-config
      selector:
        app: ubc-config
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: ubc-config
    spec:
      selector:
        matchLabels:
          app: ubc-config
      replicas: 1
      template:
        metadata:
          labels:
            app: ubc-config
        spec:
          containers:
          - name: ubc-config
            image: ubc-config
            ports:
            - containerPort: 8080
    

    As you can see, Service.spec.ClusterIP is set to NONE. To solve the problem I only change my YAML configuration to:

    apiVersion: v1
    kind: Service
    metadata:
      name: ubc-config
      labels:
        app: ubc-config
    spec:
      ports:
      - port: 8080
        name: http-ubcconfig
      selector:
        app: ubc-config
    ---
    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: ubc-config
    spec:
      selector:
        matchLabels:
          app: ubc-config
      replicas: 1
      template:
        metadata:
          labels:
            app: ubc-config
        spec:
          containers:
          - name: ubc-config
            image: ubc-config
            ports:
            - containerPort: 8080
              name: http-ubcconfig
    

    I hope this helps someone.

    0 讨论(0)
提交回复
热议问题