k8s: the queue's client port is a loadbalancer service
The queue's client port was a hostPort on 0.0.0.0, which Pod Security baseline and restricted forbid. It is a LoadBalancer Service now, which k3s's service load balancer binds on every address of the node with a hostPort of its own in kube-system, so hives on other hosts keep their URL. No node port is allocated. The stt policy allows the load balancer's pods in place of the queue's, and the prune unit waits for them to go before the host unit starts. The egress published-port rule and the raw-table rules apply to the load balancer's hostPort as to the pod's.
This commit is contained in:
parent
c2d57df7f5
commit
796fd6201f
1 changed files with 200 additions and 75 deletions
|
|
@ -1,10 +1,11 @@
|
|||
# The iptables rules that give the queue pod's client `hostPort` the reach the
|
||||
# queue's container has. A `hostPort` is a DNAT rule, and what a DNAT rule
|
||||
# rewrites is forwarded, never delivered to the host: the INPUT rules (the
|
||||
# firewall's `allowedTCPPorts` and per-interface rules) never see it, and the
|
||||
# cluster's own forwarding rules accept it. The raw table is read before the
|
||||
# DNAT and before any of those, so a rule there reads the original
|
||||
# destination, as INPUT does for the container's listener.
|
||||
# The iptables rules that give the `hostPort` the cluster's load balancer binds
|
||||
# for the queue's client port the reach the queue's container has. A
|
||||
# `hostPort` is a DNAT rule, and what a DNAT rule rewrites is forwarded, never
|
||||
# delivered to the host: the INPUT rules (the firewall's `allowedTCPPorts` and
|
||||
# per-interface rules) never see it, and the cluster's own forwarding rules
|
||||
# accept it. The raw table is read before the DNAT and before any of those, so a
|
||||
# rule there reads the original destination, as INPUT does for the container's
|
||||
# listener.
|
||||
#
|
||||
# The client port is dropped for a packet addressed to the host unless it
|
||||
# arrives on one of `trusted` (the host's loopback, the hive bridge and the
|
||||
|
|
|
|||
Loading…
Reference in a new issue