0

Im trying to forward to my api on /api/ and my UI on /

My UI is all working fine and my logs for the nginx ingress and api (which ive tested with port forwarding) are all working fine. But when i curl or go to IP/api/healthz (which would be the healthcheck for Hasura) I get 502 bad gateway

Service for hasura:

apiVersion: v1
kind: Service
metadata:
  name: hasura-svc
  labels:
    app: hasura-app
spec:
  selector:
    app: hasura-app
  type: NodePort
  ports:
    - port: 8080
      targetPort: 8080
      protocol: TCP

Deployment for Hasura:

kind: Deployment
metadata:
  name: hasura-dep
  labels:
    hasuraService: custom
    app: hasura-app
spec:
  selector:
    matchLabels:
      app: hasura-app
  replicas: 1
  template:
    metadata:
      creationTimestamp: null
      labels:
        app: hasura-app
    spec:
      containers:
        - name: hasura-app
          image: hasura/graphql-engine:v1.3.0
          imagePullPolicy: IfNotPresent
          command: ["graphql-engine"]
          args: ["serve", "--enable-console"]
          envFrom:
            - configMapRef:
                name: hasura-cnf
          ports:
            - containerPort: 8080
              protocol: TCP
          resources: {}

nginx service:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx
  annotations:
    kubernetes.io/ingress.global-static-ip-name: "gcloud-ip"
spec:
  backend:
    serviceName: nginx
    servicePort: 80
  rules:
  - http:
      paths:
      - path: /api/*
        backend:
          serviceName: hasura-svc
          servicePort: 8080
      - path: /*
        backend:
          serviceName: client
          servicePort: 3333
Happy Machine
  • 987
  • 8
  • 30

0 Answers0