Ingress Gke
LogZilla documentation for Ingress Gke
Purpose
This example exposes syslog (TCP/UDP), JSON, RFC5424, and HTTP ingest via LoadBalancer Services, and publishes the UI, API, and WebSocket endpoints via an HTTP Ingress. Adapt annotations and class to other providers as needed.
GKE Ingress and Services
yamlapiVersion: v1
kind: Service
metadata:
name: syslogng-lb-tcp
spec:
ports:
- port: 514
protocol: TCP
targetPort: bsd-tcp
name: bsd-tcp-svc-lb
- port: 515
protocol: TCP
targetPort: json
name: json-svc-lb
- port: 601
protocol: TCP
targetPort: rfc5424
name: rfc5424-svc-lb
type: LoadBalancer
selector:
name: ingest
---
apiVersion: v1
kind: Service
metadata:
name: syslogng-lb-udp
spec:
ports:
- port: 514
protocol: UDP
targetPort: bsd-udp
name: bsd-udp-svc-lb
type: LoadBalancer
selector:
name: ingest
---
apiVersion: v1
kind: Service
metadata:
name: httpreceiver-lb
spec:
ports:
- port: 80
protocol: TCP
targetPort: http-recv-port
name: http-recv-port-ld
type: LoadBalancer
selector:
name: ingest
---
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: tornado-backendconfig
spec:
healthCheck:
timeoutSec: 5
checkIntervalSec: 10
timeoutSec: 3600
---
apiVersion: v1
kind: Service
metadata:
name: ingress-tornado
annotations:
cloud.google.com/backend-config: '{"default": "tornado-backendconfig"}'
cloud.google.com/neg: '{"ingress": true}'
spec:
ports:
- port: 8001
targetPort: 8001
protocol: TCP
type: ClusterIP
selector:
name: api
---
apiVersion: cloud.google.com/v1
kind: BackendConfig
metadata:
name: api-backendconfig
spec:
healthCheck:
timeoutSec: 5
checkIntervalSec: 10
---
apiVersion: v1
kind: Service
metadata:
name: ingress-api
annotations:
cloud.google.com/backend-config: '{"default": "api-backendconfig"}'
cloud.google.com/neg: '{"ingress": true}'
spec:
ports:
- port: 80
targetPort: 80
protocol: TCP
type: ClusterIP
selector:
name: api
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-gke
annotations:
spec.ingressClassName: "gce"
kubernetes.io/ingress.allow-http: "true"
spec:
defaultBackend:
service:
name: front
port:
number: 80
rules:
- http:
paths:
- path: /api/static/
pathType: Prefix
backend:
service:
name: front
port:
number: 80
- path: /incoming/
pathType: Prefix
backend:
service:
name: httpreceiver-lb
port:
number: 80
- path: /api/
pathType: Prefix
backend:
service:
name: ingress-api
port:
number: 80
- path: /ws/
pathType: Prefix
backend:
service:
name: ingress-tornado
port:
number: 8001
Notes
- The NEG annotations are specific to GKE HTTP(S) Load Balancers.
- For other providers, use the platform’s Ingress class and health checks.
- LoadBalancer Services expose syslog and HTTP ingest externally.