Kubernetes manifests for a public node, and --announce
k8s/base (kustomize): StatefulSet with a volume, p2p LoadBalancer for 4001 TCP+UDP, ClusterIP for the UI, optional ingress; k8s/overlays/nodeport for clusters without a load balancer. The pod waits for 'allmende init' so the recovery phrase never goes to a log. --announce makes a node that sits behind a router or in a container announce the address others can dial (e.g. /dns4/name/tcp/4001), so a bootstrap node behind a port forward works, and the DNS records it prints name the host. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user