Watch
0
0
Fork
You've already forked hyperhive
0

k8s: the controller's listener is a ClusterIP service the host dials by name

The controller's api port was a hostPort on the node, which Pod Security baseline and restricted forbid. It is a ClusterIP Service now, behind a NetworkPolicy that admits only the node. The host's resolver (the hive's dnsmasq) forwards cluster.local to CoreDNS, and the gateway dials the Service by name through nginx's resolver. tcp.hostAddress goes.
This commit is contained in:
atlas 2026-11-23 17:20:22 +01:00 • committed by maia
commit 3cf89f25f1

View file

@ -530,10 +530,13 @@ What you provide:
on another host dials it. The port (`swarm.controller.tcp.port`, default 9443) stays closed
until you do, and `deploy.swarm-controller.tcp.listenAddress` picks the bound address.
With `deploy.swarm-controller.runtime = "k8s"` the listener is the pod's `hostPort`. The gateway
dials `deploy.swarm-controller.tcp.hostAddress` (the hive bridge's address by default) at the
same port, and still verifies the certificate as `swarm.controller.tcp.domain`, so that name
needs no address of its own. The pod issues its server leaf itself
With `deploy.swarm-controller.runtime = "k8s"` a ClusterIP Service publishes the
pod's listener. The gateway dials the Service's name,
`swarm-controller.hyperhive.svc.cluster.local` by default, at the same port. The
hive's resolver answers it through the cluster's DNS, so `gateway.dns.enable`
has to be on. The gateway still verifies the certificate as
`swarm.controller.tcp.domain`, so that name needs no address of its own. The
pod issues its server leaf itself
([`runtime.md`](../k8s/runtime.md#the-controller)).
What you don't: both certificates come from the secret store with no manual step