Closed electrocucaracha closed 4 years ago
default route not being added is usually the sign of your Flannel config being wrong. please share
also please read https://github.com/nokia/danm/issues/135
This was the flannel configuration file:
{
"name": "cbr0",
"cniVersion": "0.3.1",
"plugins": [
{
"type": "flannel",
"delegate": {
"hairpinMode": true,
"isDefaultGateway": true
}
},
{
"type": "portmap",
"capabilities": {
"portMappings": true
}
}
]
}
So I changed to this one
{
"name": "cbr0",
"type": "flannel",
"cniVersion": "0.3.1",
"delegate": {
"hairpinMode": true,
"isDefaultGateway": true
}
}
And the default routes are added
kubectl exec -ti test -- ip route
default via 10.244.1.1 dev eth0
10.244.0.0/16 via 10.244.1.1 dev eth0
10.244.1.0/24 dev eth0 scope link src 10.244.1.9
Thanks for the quick response on this.
Is this a BUG REPORT or FEATURE REQUEST?:
What happened: The default route is not adding the default network into the routing table
What you expected to happen:
How to reproduce it: I've defined a Default Cluster Network using Flannel as CNI
Once DANM setup is completed, I've created a single Pod with no explicit connection.
Anything else we need to know?: This issue affects pods that are trying to connect to services outside of the Pod subnet(10.244.0.0/16), e. g. Kubernetes Services(10.96.0.0/12).
Environment:
danm -version
): v4.2.0kubectl version
): v1.18.2uname -a
): Linux ubuntu1804.localdomain 4.15.0-112-generic #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux