I was just checking the network driver used for google kubernetes engine
. It seems calico
is the default GKE driver for network policy.
networkPolicyConfig: {}
clusterIpv4Cidr: 172.31.92.0/22
createTime: '2022-01-18T19:41:27+00:00'
--
networkPolicy:
enabled: true
provider: CALICO
Is it possible to change calico
and replace with some other networking addon
for gke
?
Calico is only used for Network Policies in GKE. By default GKE uses a Google Network Plugin. You also have the option to enable Dataplane V2 which is eBPF Based.
In both cases the Plugins are managed by Google and you cannot change them
To complement @boredabdel's answer ;
You cannot change the network plugin, however if you choose to disable Network Policy :
Note that this connectivity differs drastically depending on whether you use GKE's native Container Network Interface (CNI) or choose to use Calico's implementation by enabling Network policy when you create the cluster.
If you use GKE's CNI, one end of the Virtual Ethernet Device (
veth
) pair is attached to the Pod in its namespace, and the other is connected to the Linux bridge device cbr0.1 In this case, the following command shows the various Pods' MAC addresses attached tocbr0
:
arp -n
Running the following command in the toolbox container shows the root namespace end of each veth pair attached to
cbr0
:
brctl show cbr0
If Network Policy is enabled, one end of the veth pair is attached to the Pod and the other to
eth0
. In this case, the following command shows the various Pods' MAC addresses attached to different veth devices:
arp -n
Running the following command in the toolbox container shows that there is not a Linux bridge device named cbr0
:
brctl show
The iptables rules that facilitate forwarding within the cluster differ from one scenario to the other. It is important to have this distinction in mind during detailed troubleshooting of connectivity issues.
Also have a look at the documentation regarding Migrating from Calico to Dataplane v.2 which may affect networking also.
Additionally you may also find Network overview for GKE documentation usefull.
Here's also a very detailed explanation of a networking inside GKE .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.