Hi there,
My question is adding new rules in GKE Ingress won't auto-connect to the load balance backend, but strangely, all related resources all be auto-created success. Here's the workflow:
Step 1, create a new deployment and make sure it is alive
Step 2, expose the deployment as NodePort
Step 3, add this Service to an existing Ingress
Then we can see the backend service for the load balance is successfully created
And the network endpoint groups are also created
But they're not connected to the load balancer, and I have to do this manually
Does anyone have any idea about this?
Sincerely,
Ed
Hello @ed-bytebase
Can you include the deployment, service and ingress yaml that you are using so we can see how they are set up together? Kindly redact any sensitive information that these files have.
Sincerely,
James
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
creationTimestamp: "2023-03-18T07:48:03Z"
generation: 1
labels:
tenant: pool
version: 1.14.0
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: 4u5z93wr
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: 4u5z93wr
timestamp: "1679125683"
spec:
containers:
image: bytebase/bytebase:1.14.0
imagePullPolicy: Always
livenessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 300
successThreshold: 1
timeoutSeconds: 60
name: bytebase
ports:
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
failureThreshold: 3
httpGet:
path: /healthz
port: 8080
scheme: HTTP
initialDelaySeconds: 300
periodSeconds: 300
successThreshold: 1
timeoutSeconds: 60
resources:
limits:
cpu: 250m
ephemeral-storage: 400M
memory: 512Mi
requests:
cpu: 250m
ephemeral-storage: 400M
memory: 512Mi
apiVersion: v1
kind: Service
metadata:
annotations:
cloud.google.com/neg: '{"ingress":true}'
cloud.google.com/neg-status: '{"network_endpoint_groups":{"80":"k8s1-74c3cd43-default-service-4u5z93wr-80-3cf1182c"},"zones":["us-central1-a","us-central1-b"]}'
creationTimestamp: "2023-03-18T07:55:15Z"
labels:
tenant: 4u5z93wr
spec:
clusterIP: 10.12.131.57
clusterIPs:
- 10.12.131.57
externalTrafficPolicy: Cluster
internalTrafficPolicy: Cluster
ipFamilies:
- IPv4
ipFamilyPolicy: SingleStack
ports:
- nodePort: 30326
port: 80
protocol: TCP
targetPort: 8080
selector:
app: 4u5z93wr
sessionAffinity: None
type: NodePort
status:
loadBalancer: {}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.global-static-ip-name: bytebase-ip-01
name: bytebase-ingress-01
namespace: default
spec:
rules:
- host: 4u5z93wr.us-central1.bytebase.com # for tenant 4u5z93wr
http:
paths:
- backend:
service:
name: service-4u5z93wr
port:
number: 80
pathType: ImplementationSpecific
- host: 94xbo23h.us-central1.bytebase.com # for another tenant
http:
paths:
- backend:
service:
name: service-94xbo23h
port:
number: 80
pathType: ImplementationSpecific
# and many other rules for different tenant
tls:
- secretName: bytebase-ssl-01
status:
loadBalancer:
ingress:
- ip: xxx