-
Notifications
You must be signed in to change notification settings - Fork 386
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
Add documentation for noEncap and hybrid modes, and kube-router #1798
Conversation
2e85763
to
a682647
Compare
to the cloud network routers for the Pod CIDRs of Nodes, and then the cloud | ||
network is able to route Pod traffic between Nodes. This Route Controller | ||
functionality is supported by the Cloud Provider implementations of the major | ||
clouds, including: [AWS](https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/legacy-cloud-providers/aws), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not find documentations for how to configure cloud providers. Probably we need more work to figure out how to configure each of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For in-tree providers, as far as I know, the --configure-cloud-routes
flag for kube-controller-manager
needs to be set to true
. I am not aware of any other requirement. At the moment, the flag also requires --allocate-node-cidrs
, but that's a requirement for Antrea anyway.
I believe the flag will work for Azure, GCP, AWS. I don't know about vSphere though, maybe @dantingl knows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I know --configure-cloud-routes, but there can be other requirements depending on the clouds. For example, Azure seems require a separate routing table being created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not want to talk about NSX-T configuration here - there will be lots of details (T1, etc.) to talk. Hopefully Danting can enhance vSphere CP documentation for route configuration, then we can just put a link here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, there is the --cloud-config
flag that takes an arbitrary configuration file, which is cloud-specific.
@antoninbas : like to learn what you think about the current version. |
Codecov Report
@@ Coverage Diff @@
## main #1798 +/- ##
=======================================
Coverage ? 42.84%
=======================================
Files ? 108
Lines ? 13597
Branches ? 0
=======================================
Hits ? 5825
Misses ? 7286
Partials ? 486
Flags with carried forward coverage won't be shown. Click here to find out more. |
docs/noencap-hybrid-modes.md
Outdated
in the same subnet. Thus it requires the Node network allow Pod IP addresses | ||
being sent out from the Nodes' NICs. This requirement is not supported in all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it requires the Node network to allow Pod IP addresses to be sent out
or
it requires that the Node network allow Pod IP addresses to be sent out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
option is defined in `antrea-agent.conf` of the `antrea` ConfigMap in the | ||
[Antrea deployment YAML](https://github.com/vmware-tanzu/antrea/blob/main/build/yamls/antrea.yml). | ||
|
||
```yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should not include this snippet unless there is a strong reason to, as then we will need to keep it in sync I feel like the instructions above are clear enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What you think about:
```yaml
trafficEncapMode: noEncap
Or:
```yaml
antrea-agent.conf: |
... ...
trafficEncapMode: noEncap
... ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
second one looks good to me
docs/noencap-hybrid-modes.md
Outdated
... ... | ||
``` | ||
|
||
After changing the option, you can deploy Antrea with the `Hybrid` mode by: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After changing the option, you can deploy Antrea with the `Hybrid` mode by: | |
After changing the configuration option, you can deploy Antrea in `Hybrid` mode with the usual command: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
to the cloud network routers for the Pod CIDRs of Nodes, and then the cloud | ||
network is able to route Pod traffic between Nodes. This Route Controller | ||
functionality is supported by the Cloud Provider implementations of the major | ||
clouds, including: [AWS](https://github.com/kubernetes/kubernetes/tree/master/staging/src/k8s.io/legacy-cloud-providers/aws), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For in-tree providers, as far as I know, the --configure-cloud-routes
flag for kube-controller-manager
needs to be set to true
. I am not aware of any other requirement. At the moment, the flag also requires --allocate-node-cidrs
, but that's a requirement for Antrea anyway.
I believe the flag will work for Azure, GCP, AWS. I don't know about vSphere though, maybe @dantingl knows.
options are defined in `antrea-agent.conf` of the `antrea` ConfigMap in the | ||
[Antrea deployment YAML](https://github.com/vmware-tanzu/antrea/blob/main/build/yamls/antrea.yml). | ||
|
||
```yaml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
docs/noencap-hybrid-modes.md
Outdated
|
||
We can run kube-router in the advertisement-only mode to advertise Pod CIDRs to | ||
the peered routers, so the routers can know how to route Pod traffic to the | ||
Nodes. To deploy kube-router in the advertisement-only, first download the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To deploy kube-router in advertisement-only mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/noencap-hybrid-modes.md
Outdated
The BGP peers should be configured by specifying the --peer-router-asns and | ||
--peer-router-ips parameters. Note, the ASNs and IPs must match the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: use back ticks around --peer-router-asns
and --peer-router-ips
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
docs/noencap-hybrid-modes.md
Outdated
- "--peer-router-asns=65000,65000" | ||
``` | ||
|
||
Then you can deploy the kube-router DaemonSet by: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/by/with
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Antrea can be deployed either before or after kube-router, with the `NoEncap` | ||
mode. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/with the NoEncap
mode/in NoEncap
mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
docs/noencap-hybrid-modes.md
Outdated
kubectl apply -f generic-kuberouter-only-advertise-routes.yaml | ||
``` | ||
|
||
You can verify the kube-router Pods are running on the Nodes of your Kubernetes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify that the kube-router Pods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
82aac67
to
e7ea391
Compare
docs/noencap-hybrid-modes.md
Outdated
... ... | ||
trafficEncapMode: noEncap | ||
|
||
#noSNAT: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mean noSNAT: true
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wanted to show the default value, but yes it seems confusing. Changed to: noSNAT: false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
docs/noencap-hybrid-modes.md
Outdated
... ... | ||
trafficEncapMode: noEncap | ||
|
||
noSNAT: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noSNAT: false # or true to disable Antrea SNAT for external traffic
/skip-all |
No description provided.