# The libp2p port other nodes connect to, TCP and UDP (QUIC), on one address. # # Your router forwards 4001 (TCP and UDP) to this Service's address. This file # uses a LoadBalancer, which at home usually means MetalLB or kube-vip handing # out a LAN address; forward the router's port to that address. Without a load # balancer in the cluster use overlays/nodeport instead. # # Mixed TCP and UDP on one LoadBalancer needs Kubernetes 1.26 or later and a # load balancer implementation that supports it (MetalLB does). apiVersion: v1 kind: Service metadata: name: allmende-p2p spec: type: LoadBalancer # Keep the real client address (and skip a second hop through the cluster). externalTrafficPolicy: Local selector: app: allmende ports: - name: p2p-tcp port: 4001 targetPort: p2p-tcp protocol: TCP - name: p2p-quic port: 4001 targetPort: p2p-quic protocol: UDP