https://rancher.com/ logo
#k3s
Title
# k3s
j

jolly-waitress-71272

11/09/2022, 7:27 PM
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
b

bland-account-99790

11/10/2022, 6:55 PM
yes. That file is filled by reading the podCIDRs field in the k8s node object
8 Views