Reputation: 21
I am trying to expose my application on classic ALB on GCP through ingress. I've created a Nodeport service below:
apiVersion: v1
kind: Service
metadata:
name: ofamily-service-np
spec:
selector:
app: o-famil
type: NodePort
ports:
- protocol: TCP
port: 8000
targetPort: 8000
I have also created managedCertificate object:
apiVersion: networking.gke.io/v1
kind: ManagedCertificate
metadata:
name: duckdns
spec:
domains:
- ofamily.duckdns.org
Here's my ingress.yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: o-family-ingress
annotations:
kubernetes.io/ingress.class: "gce"
networking.gke.io/managed-certificates: "duckdns"
kubernetes.io/ingress.global-static-ip-name: "ingress"
spec:
rules:
- host: ofamily.duckdns.org
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: ofamily-service-np
port:
number: 8000
It creates a LoadBalancer
in the LoadBalancer it shows Network endpoint group details which shows unhealthy, I am unable to troubleshoot.
I am trying to expose my application on classic ALB on GCP through ingress. I've created a Nodeport service and ingress.yaml but the backend shows unhealthy. I am using GKE Autopilot cluster.
The same application works on loadbalancer service type but when I use Nodeport and ingress, it shows unhealthy.
Do I need to change something in the application or add readiness/liveliness probe in deployment or ingress?
Upvotes: 1
Views: 64