Answers: <p>Do not use GKE ingress, it's a nightmare. Use nginx-controller helm package instead. You will have to configure something like this:</p>
  <pre><code>apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: argo-ingress
    annotations:
      kubernetes.io/ingress.class: nginx
      nginx.ingress.kubernetes.io/backend-protocol: http
      cert-manager.io/cluster-issuer: &quot;letsencrypt&quot;
  spec:
    rules:
      - host: argo.example.com
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: argo-system-argo-workflows-server
                  port:
                    number: 2746
    tls:
    - hosts:
        - argo.example.com
      secretName: argo-tls-cert
  
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2022-12-31T02:46:32.017Z
Answers: 2022-12-31T02:46:32.017Z
Answers: Abe
Body: <p>I am trying to expose my argo workflows deployment to a domain but I keep getting <strong>Server Error</strong> when I access the domain: argo.example.com.  I setup a GKE ingress and been trying to fix the health checks by redirecting http to https, which is why I added a custom FrontendConfig and BackendConfig. However, I see the health check for &quot;/&quot; passing. See configuration below.</p>
  <p>argo-server command args:</p>
  <pre><code>...
  - args:
      - server
      - --namespaced
      - --auth-mode
      - server
      - --secure
      - &quot;true&quot;
  ...
  </code></pre>
  <p>ingress:</p>
  <pre><code>apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: argo-ingress
    annotations:
      networking.gke.io/managed-certificates: &quot;argo-cert&quot;
      networking.gke.io/v1beta1.FrontendConfig: argo-frontend-config
  spec:
    rules:
      - host: argo.example.com
        http:
          paths:
            - backend:
                service:
                  name: argo-server-expose
                  port:
                    number: 2746
              path: /*
              pathType: ImplementationSpecific
  </code></pre>
  <p>Frontend:</p>
  <pre><code>apiVersion: networking.gke.io/v1beta1
  kind: FrontendConfig
  metadata:
    name: argo-frontend-config
    namespace: argo
  spec:
    redirectToHttps:
      enabled: true
  </code></pre>
  <p>Backend:</p>
  <pre><code>apiVersion: cloud.google.com/v1
  kind: BackendConfig
  metadata:
    name: argo-backend-config
    namespace: argo
  spec:
    healthCheck:
      checkIntervalSec: 30
      timeoutSec: 5
      healthyThreshold: 1
      unhealthyThreshold: 2
      type: HTTPS
      requestPath: /
      port: 2746
  </code></pre>
  <p>Service:</p>
  <pre><code>apiVersion: v1
  kind: Service
  metadata:
    name: argo-server-expose
    namespace: argo
    annotations:
      cloud.google.com/neg: '{&quot;ingress&quot;: true}'
      cloud.google.com/backend-config: '{&quot;ports&quot;: {&quot;http&quot;:&quot;argo-backend-config&quot;}}'
  spec:
    type: NodePort
    ports:
      - name: http
        port: 2746
        protocol: TCP
        targetPort: 2746
    selector:
      app: argo-server
  </code></pre>
  
Comments: CC BY-SA 4.0
Comments: 2022-12-14T17:00:45.613Z
Comments: I am having the same problem, did you find a solution?
Comments: Chris Stenkamp
Comments: CC BY-SA 4.0
Comments: 2022-12-31T02:46:41.210Z
Comments: Posted an answer @ChrisStenkamp
Comments: Abe
Tags: <kubernetes><ingress><gcp><google-kubernetes-engine>
Title: Argo workflows health checks failing in GKE
UserDisplayName: Abe
ThreadText: # Argo workflows health checks failing in GKE
  
  (Asked by: username_0 on 2022-06-12)
  
  I am trying to expose my argo workflows deployment to a domain but I keep getting **Server Error** when I access the domain: argo.example.com. I setup a GKE ingress and been trying to fix the health checks by redirecting http to https, which is why I added a custom FrontendConfig and BackendConfig. However, I see the health check for "/" passing. See configuration below.
  
  argo-server command args:
  
  ```
  ...
  - args:
      - server
      - --namespaced
      - --auth-mode
      - server
      - --secure
      - "true"
  ...
  
  ```
  
  ingress:
  
  ```
  apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: argo-ingress
    annotations:
      networking.gke.io/managed-certificates: "argo-cert"
      networking.gke.io/v1beta1.FrontendConfig: argo-frontend-config
  spec:
    rules:
      - host: argo.example.com
        http:
          paths:
            - backend:
                service:
                  name: argo-server-expose
                  port:
                    number: 2746
              path: /*
              pathType: ImplementationSpecific
  
  ```
  
  Frontend:
  
  ```
  apiVersion: networking.gke.io/v1beta1
  kind: FrontendConfig
  metadata:
    name: argo-frontend-config
    namespace: argo
  spec:
    redirectToHttps:
      enabled: true
  
  ```
  
  Backend:
  
  ```
  apiVersion: cloud.google.com/v1
  kind: BackendConfig
  metadata:
    name: argo-backend-config
    namespace: argo
  spec:
    healthCheck:
      checkIntervalSec: 30
      timeoutSec: 5
      healthyThreshold: 1
      unhealthyThreshold: 2
      type: HTTPS
      requestPath: /
      port: 2746
  
  ```
  
  Service:
  
  ```
  apiVersion: v1
  kind: Service
  metadata:
    name: argo-server-expose
    namespace: argo
    annotations:
      cloud.google.com/neg: '{"ingress": true}'
      cloud.google.com/backend-config: '{"ports": {"http":"argo-backend-config"}}'
  spec:
    type: NodePort
    ports:
      - name: http
        port: 2746
        protocol: TCP
        targetPort: 2746
    selector:
      app: argo-server
  
  ```
  
  **Tags:** kubernetes, ingress, gcp, google-kubernetes-engine
  
  > **Comments:**
  > **username_1**: I am having the same problem, did you find a solution?  
  > **username_0**: Posted an answer @username_1  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-12-31. Score: 0
  
  Do not use GKE ingress, it's a nightmare. Use nginx-controller helm package instead. You will have to configure something like this:
  
  ```
  apiVersion: networking.k8s.io/v1
  kind: Ingress
  metadata:
    name: argo-ingress
    annotations:
      kubernetes.io/ingress.class: nginx
      nginx.ingress.kubernetes.io/backend-protocol: http
      cert-manager.io/cluster-issuer: "letsencrypt"
  spec:
    rules:
      - host: argo.example.com
        http:
          paths:
            - path: /
              pathType: Prefix
              backend:
                service:
                  name: argo-system-argo-workflows-server
                  port:
                    number: 2746
    tls:
    - hosts:
        - argo.example.com
      secretName: argo-tls-cert
  
  ```
  
  
  ---
  
  