I'm running postgres on the same host as a k3s server. How do I determine generically what CIDR I need to plop in pg_hba.conf in order for containers to connect to the db? I can see containers are being assigned from 10.42.0.0/16, is that always the default in K3s with flannel? Is there somewhere I can read from to get the exact CIDR?
Looks like I can safely read from /run/flannel/subnet.env
11/10/2022, 6:55 PM
yes. That file is filled by reading the podCIDRs field in the k8s node object