k8s: the queue's exporter is a ClusterIP service only the node reaches
The exporter's metrics port was a hostPort on the bridge's address, which Pod Security baseline and restricted forbid. It is a ClusterIP Service now, and the pod has a NetworkPolicy that admits the client port from any source and nothing else, so only the node reads the exporter, as the raw-table rules made it. The gateway's /metrics location dials the Service by name through nginx's resolver. The raw-table rules no longer name the exporter's port.
This commit is contained in:
parent
3cf89f25f1
commit
7ef9444e42
1 changed files with 228 additions and 63 deletions
|
|
@ -88,11 +88,12 @@ agents ask the same resolver, so they get the same names. A name is no route:
|
|||
the hive's egress rules decide whether the host forwards their traffic to the
|
||||
cluster's addresses, and a pod's NetworkPolicy refuses what it forwards.
|
||||
|
||||
A pod that serves the host, such as the controller's, has a NetworkPolicy that
|
||||
selects it for ingress and allows nothing. kube-router, the policy engine, adds
|
||||
a rule at the top of every pod's chain that admits traffic from any address of
|
||||
the node (`-m addrtype --src-type LOCAL`, commented "from local node"), so the
|
||||
host reaches the pod and no other pod does.
|
||||
A pod that serves the host, such as the controller or the queue's exporter, has
|
||||
a NetworkPolicy that selects it for ingress and allows no more than the port it
|
||||
serves everyone, if it has one. kube-router, the policy engine, adds a rule at
|
||||
the top of every pod's chain that admits traffic from any address of the node
|
||||
(`-m addrtype --src-type LOCAL`, commented "from local node"), so the host
|
||||
reaches the pod and no other pod does.
|
||||
|
||||
## Logging in to the secret store
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue