Add flannel-external-ip when there is a k3s node-external-ip #6180
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Manuel Buil [email protected]
Proposed Changes
Make sure that if node-external-ip is defined in the k3s config, the annotation
flannel.alpha.coreos.com/public-ip-overwrite
is added for each node, so that flannel can configured itself correctlyTypes of Changes
Bugfix
Verification
1 - Create two VMs which do not belong to the same subnet (e.g. in different public clouds). These VMs must have a public IP
2 - Deploy k3s with the following config in one VM:
3 - Deploy k3s agent with the following config in another VM:
4 - Run
kubectl get nodes -o yaml
. You should see the annotation:flannel.alpha.coreos.com/public-ip:
andflannel.alpha.coreos.com/public-ip-overwrite:
in both nodes. Both annotations must point at the publicIP of the node (what we passed as node-external-ip)5 - Deploy a pod in each node/VM and ping between them. It should work
Testing
Not covered
Linked Issues
#6177
User-Facing Change
Further Comments