-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pod IP is allocated outside of Node's podCIDR #2592
Comments
@squat this is actually expected behavior. The IP addresses given to pods are managed by the chosen CNI IPAM plugin. Calico's IPAM plugin doesn't respect the values given to You can, however, use a different IPAM plugin if the |
@caseydavenport ah got it. Thanks! It’s not important necessarily for the CIDRs actually to match the podCIDRs on the node (though it is a little confusing as a user); rather, I’d like to know if there is a way to determine the subnet that Calico reserves for a given node. Is this captured in a Calico custom resource for example? |
Yeah, you can use |
Perfect. There’s no need to modify them, only to identify the mapping from node<->CIDR, so this is totally sufficient. I could have sworn that a few months ago the CIDRs allocated by Calico matched those allocated by the node controller. Did this behavior change recently? Or was it a happy coincidence? |
Yeah, the default IPAM behavior changed in v3.6. |
I launched a three node vanilla Typhoon cluster on bare metal launching no extra pods.
When I run
kubectl get pods -n kube-system -o yaml
I notice that my pods have IPs like:These pod IPs are outside of the podCIDRs for any node in the cluster, which are:
The default Calico IPPool is 10.2.0.0/16:
But the actual blocks do not seem to align with what the node resource says is allocated to it.
Is it expected for Calico to ignore the podCIDR on the node resources? How can make Calico respect the assigned podCIDR?
Expected Behavior
I expected pod IPs to always be contained by the podCIDR shown in the node resource.
Current Behavior
Pod IPs are allocated from blocks outside of the node's podCIDR.
Steps to Reproduce (for bugs)
Your Environment
Three node bare metal Typhoon cluster.
Kubernetes v1.14.0
Calico v3.6.1
Any help is appreciated. Thanks!
The text was updated successfully, but these errors were encountered: