I'm rookie to k8s.
I know the pod IP is set in range by --cluster-cidr
. eg. 10.244.0.0/18
My question is how to access the pod IP from outside the k8s cluster.
I heard of 2 ways to do that:
-
- Make Docker bridge use a self defined Linux bridge, some tricks in
/etc/docker/daemon.json
, then add route records at the router device byip route add 10.244.0.0/18 via {k8sNodeIp}
(or something like that, I dont know details).
- Make Docker bridge use a self defined Linux bridge, some tricks in
-
- Similar to the upper one, but they seems accomplish that without the "bridge tricks", just add some route records(tell me if I'm wrong).
These solutions are from two different teams.
I dont know if the k8s network plugin got involved, the first one uses flannel
and the last one uses calico
.
Any docs about that?