mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-01 01:28:11 -03:30
[calico] don't enable ipip encapsulation by default and use vxlan in CI (#8434)
* [calico] make vxlan encapsulation the default * don't enable ipip encapsulation by default * set calico_network_backend by default to vxlan * update sample inventory and documentation * [CI] pin default calico parameters for upgrade tests to ensure proper upgrade * [CI] improve netchecker connectivity testing * [CI] show logs for tests * [calico] tweak task name * [CI] Don't run the provisioner from vagrant since we run it in testcases_run.sh * [CI] move kube-router tests to vagrant to avoid network connectivity issues during netchecker check * service proxy mode still fails connectivity tests so keeping it manual mode * [kube-router] account for containerd use-case
This commit is contained in:
@@ -210,23 +210,42 @@ calico_node_readinessprobe_timeout: 10
|
||||
|
||||
## Config encapsulation for cross server traffic
|
||||
|
||||
Calico supports two types of encapsulation: [VXLAN and IP in IP](https://docs.projectcalico.org/v3.11/networking/vxlan-ipip). VXLAN is supported in some environments where IP in IP is not (for example, Azure).
|
||||
Calico supports two types of encapsulation: [VXLAN and IP in IP](https://docs.projectcalico.org/v3.11/networking/vxlan-ipip). VXLAN is the more mature implementation and enabled by default, please check your environment if you need *IP in IP* encapsulation.
|
||||
|
||||
*IP in IP* and *VXLAN* is mutualy exclusive modes.
|
||||
|
||||
Configure Ip in Ip mode. Possible values is `Always`, `CrossSubnet`, `Never`.
|
||||
|
||||
```yml
|
||||
calico_ipip_mode: 'Always'
|
||||
```
|
||||
|
||||
Configure VXLAN mode. Possible values is `Always`, `CrossSubnet`, `Never`.
|
||||
### IP in IP mode
|
||||
|
||||
To configure Ip in Ip mode you need to use the bird network backend.
|
||||
|
||||
```yml
|
||||
calico_ipip_mode: 'Always' # Possible values is `Always`, `CrossSubnet`, `Never`
|
||||
calico_vxlan_mode: 'Never'
|
||||
calico_network_backend: 'bird'
|
||||
```
|
||||
|
||||
If you use VXLAN mode, BGP networking is not required. You can disable BGP to reduce the moving parts in your cluster by `calico_network_backend: vxlan`
|
||||
### VXLAN mode (default)
|
||||
|
||||
To configure VXLAN mode you can use the default settings, the example below is provided for your reference.
|
||||
|
||||
```yml
|
||||
calico_ipip_mode: 'Never'
|
||||
calico_vxlan_mode: 'Always' # Possible values is `Always`, `CrossSubnet`, `Never`.
|
||||
calico_network_backend: 'vxlan'
|
||||
```
|
||||
|
||||
In VXLAN mode BGP networking is not required.
|
||||
We disable BGP to reduce the moving parts in your cluster by `calico_network_backend: vxlan`
|
||||
|
||||
### BGP mode
|
||||
|
||||
To enable BGP no-encapsulation mode:
|
||||
|
||||
```yml
|
||||
calico_ipip_mode: 'Never'
|
||||
calico_vxlan_mode: 'Never'
|
||||
calico_network_backend: 'bird'
|
||||
```
|
||||
|
||||
## Configuring interface MTU
|
||||
|
||||
|
||||
@@ -61,12 +61,12 @@ gcloud compute networks subnets create kubernetes \
|
||||
#### Firewall Rules
|
||||
|
||||
Create a firewall rule that allows internal communication across all protocols.
|
||||
It is important to note that the ipip protocol has to be allowed in order for
|
||||
It is important to note that the vxlan protocol has to be allowed in order for
|
||||
the calico (see later) networking plugin to work.
|
||||
|
||||
```ShellSession
|
||||
gcloud compute firewall-rules create kubernetes-the-kubespray-way-allow-internal \
|
||||
--allow tcp,udp,icmp,ipip \
|
||||
--allow tcp,udp,icmp,vxlan \
|
||||
--network kubernetes-the-kubespray-way \
|
||||
--source-ranges 10.240.0.0/24
|
||||
```
|
||||
|
||||
@@ -21,7 +21,9 @@ Some variables of note include:
|
||||
* *containerd_version* - Specify version of containerd to use when setting `container_manager` to `containerd`
|
||||
* *docker_containerd_version* - Specify which version of containerd to use when setting `container_manager` to `docker`
|
||||
* *etcd_version* - Specify version of ETCD to use
|
||||
* *ipip* - Enables Calico ipip encapsulation by default
|
||||
* *calico_ipip_mode* - Configures Calico ipip encapsulation - valid values are 'Never', 'Always' and 'CrossSubnet' (default 'Never')
|
||||
* *calico_vxlan_mode* - Configures Calico vxlan encapsulation - valid values are 'Never', 'Always' and 'CrossSubnet' (default 'Always')
|
||||
* *calico_network_backend* - Configures Calico network backend - valid values are 'none', 'bird' and 'vxlan' (default 'vxlan')
|
||||
* *kube_network_plugin* - Sets k8s network plugin (default Calico)
|
||||
* *kube_proxy_mode* - Changes k8s proxy mode to iptables mode
|
||||
* *kube_version* - Specify a given Kubernetes version
|
||||
|
||||
Reference in New Issue
Block a user