Skip to content
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

Merged
merged 1 commit into from
Jan 30, 2021

Conversation

jianjuns
Copy link
Contributor

No description provided.

@jianjuns jianjuns force-pushed the noencap-doc branch 3 times, most recently from 2e85763 to a682647 Compare January 29, 2021 01:30
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),
Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@jianjuns
Copy link
Contributor Author

jianjuns commented Jan 29, 2021

@antoninbas : like to learn what you think about the current version.

@codecov-io
Copy link

codecov-io commented Jan 29, 2021

Codecov Report

❗ No coverage uploaded for pull request base (main@e61cfbc). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1798   +/-   ##
=======================================
  Coverage        ?   42.84%           
=======================================
  Files           ?      108           
  Lines           ?    13597           
  Branches        ?        0           
=======================================
  Hits            ?     5825           
  Misses          ?     7286           
  Partials        ?      486           
Flag Coverage Δ
unit-tests 42.84% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Comment on lines 16 to 17
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
Copy link
Contributor

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

Copy link
Contributor Author

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
Copy link
Contributor

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.

Copy link
Contributor Author

@jianjuns jianjuns Jan 29, 2021

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
    ... ...

Copy link
Contributor

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

... ...
```

After changing the option, you can deploy Antrea with the `Hybrid` mode by:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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:

Copy link
Contributor Author

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),
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as above


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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Comment on lines 148 to 149
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
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

- "--peer-router-asns=65000,65000"
```

Then you can deploy the kube-router DaemonSet by:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/by/with

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines +173 to +150
Antrea can be deployed either before or after kube-router, with the `NoEncap`
mode.
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

kubectl apply -f generic-kuberouter-only-advertise-routes.yaml
```

You can verify the kube-router Pods are running on the Nodes of your Kubernetes
Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@jianjuns jianjuns force-pushed the noencap-doc branch 2 times, most recently from 82aac67 to e7ea391 Compare January 29, 2021 04:24
... ...
trafficEncapMode: noEncap

#noSNAT: false
Copy link
Contributor

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?

Copy link
Contributor Author

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.

antoninbas
antoninbas previously approved these changes Jan 29, 2021
Copy link
Contributor

@antoninbas antoninbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

... ...
trafficEncapMode: noEncap

noSNAT: false
Copy link
Contributor

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

@jianjuns
Copy link
Contributor Author

/skip-all

@jianjuns jianjuns merged commit 282c159 into antrea-io:main Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants