mirror of
https://github.com/dredx/prole.git
synced 2026-09-24 16:44:33 +00:00
37 lines
1.2 KiB
YAML
37 lines
1.2 KiB
YAML
# garage-service-ilb.yaml
|
|
# Internal LoadBalancer for Garage S3 API — exposes port 3900 to the same GCP VPC.
|
|
#
|
|
# Purpose: Allow knoe-dev-0 (APP cluster) to reach Garage running in knoe-cnpg-0 (DB cluster)
|
|
# for GitLab object storage, without requiring a service mesh or cross-cluster DNS.
|
|
#
|
|
# Both clusters share the same VPC (us-west3); an ILB IP is routable between them.
|
|
#
|
|
# Apply to the DB cluster (knoe-cnpg-0):
|
|
# kubectl --context=gke_plenary-truck-485623-p7_us-west3_knoe-cnpg-0 \
|
|
# -n knoe-system apply -f k8s/knoe/garage-service-ilb.yaml
|
|
#
|
|
# Then retrieve the ILB IP with:
|
|
# kubectl --context=gke_plenary-truck-485623-p7_us-west3_knoe-cnpg-0 \
|
|
# -n knoe-system get svc garage-s3-ilb \
|
|
# -o jsonpath='{.status.loadBalancer.ingress[0].ip}'
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: garage-s3-ilb
|
|
labels:
|
|
app: garage
|
|
role: cross-cluster-s3
|
|
annotations:
|
|
# GCP Internal LoadBalancer — stays within the VPC, no public IP
|
|
networking.gke.io/load-balancer-type: "Internal"
|
|
spec:
|
|
type: LoadBalancer
|
|
loadBalancerIP: "" # GCP assigns automatically; pin here after first apply
|
|
selector:
|
|
app: garage
|
|
ports:
|
|
- name: s3
|
|
port: 3900
|
|
targetPort: s3
|
|
protocol: TCP
|