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

Document encap mode installation for EKS #2929

Merged
merged 1 commit into from
Oct 29, 2021
Merged

Conversation

jianjuns
Copy link
Contributor

@jianjuns jianjuns commented Oct 25, 2021

Signed-off-by: Jianjun Shen [email protected]

Closes #867

@jianjuns jianjuns added area/provider/aws Issues or PRs related to aws provider. kind/documentation Categorizes issue or PR as related to a documentation. labels Oct 25, 2021
@jianjuns jianjuns requested a review from antoninbas October 25, 2021 02:49
@jianjuns jianjuns force-pushed the eks-encap branch 2 times, most recently from 21c7615 to 748cf22 Compare October 25, 2021 03:02
@codecov-commenter
Copy link

codecov-commenter commented Oct 25, 2021

Codecov Report

Merging #2929 (d0ac51d) into main (8336f7a) will decrease coverage by 20.99%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2929       +/-   ##
===========================================
- Coverage   61.59%   40.59%   -21.00%     
===========================================
  Files         283      158      -125     
  Lines       23644    19950     -3694     
===========================================
- Hits        14563     8099     -6464     
- Misses       7512    11080     +3568     
+ Partials     1569      771      -798     
Flag Coverage Δ
kind-e2e-tests ?
unit-tests 40.59% <ø> (-0.25%) ⬇️

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

Impacted Files Coverage Δ
pkg/ovs/openflow/default.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/util/runtime/runtime.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/agent/cniserver/pod_configuration_linux.go 0.00% <0.00%> (-100.00%) ⬇️
pkg/ovs/openflow/logs.go 9.52% <0.00%> (-90.48%) ⬇️
pkg/apis/controlplane/register.go 0.00% <0.00%> (-90.00%) ⬇️
pkg/agent/nodeportlocal/k8s/annotations.go 0.00% <0.00%> (-83.88%) ⬇️
pkg/agent/agent_linux.go 0.00% <0.00%> (-80.00%) ⬇️
pkg/agent/client.go 0.00% <0.00%> (-77.42%) ⬇️
pkg/ovs/ovsconfig/ovs_client_linux.go 0.00% <0.00%> (-76.93%) ⬇️
pkg/flowaggregator/certificate.go 0.00% <0.00%> (-76.58%) ⬇️
... and 233 more

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.

thanks for validating this, it will be very useful to have that as a reference

do you want to also mention

  1. the advantages of using encap mode (more Pods per Node, encryption)
  2. what won't work anymore, notably aggregation

docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@jianjuns jianjuns left a comment

Choose a reason for hiding this comment

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

  1. the advantages of using encap mode (more Pods per Node, encryption)

Makes sense. Add some description in eks-installation.md.

  1. what won't work anymore, notably aggregation

I found aggregation is working! Might be some changes in EKS.

docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
docs/eks-installation.md Show resolved Hide resolved
docs/eks-installation.md Outdated Show resolved Hide resolved
@antoninbas
Copy link
Contributor

I found aggregation is working! Might be some changes in EKS.

I think aggregation for Antrea APIs work fine, but I'm not sure how aggregation to a regular Pod (not hostNetwork) can work. Did you check with the metrics server? What's the packet path in that case?

@jianjuns
Copy link
Contributor Author

I think aggregation for Antrea APIs work fine, but I'm not sure how aggregation to a regular Pod (not hostNetwork) can work. Did you check with the metrics server? What's the packet path in that case?

Ah, you must be right. Let me check, and I can add that if it does not work. Do you have any other issues in mind?

@antoninbas
Copy link
Contributor

@jianjuns you may want to test, but I think the built-in apiserver proxy doesn't work either because it relies on the apiserver being able to connect direcly to Pods: https://kubernetes.io/docs/tasks/access-application-cluster/access-cluster/#manually-constructing-apiserver-proxy-urls. So trying to use the proxy to connect to a Service or Pod should fail.

I can't think of anything else.

@jianjuns
Copy link
Contributor Author

@antoninbas : added description about the control plane -> Pod connection issue.


In `encap` mode, Antrea acts as the primary CNI of an EKS cluster, and
implements all Pod networking functionalities, including IPAM and routing across
Nodes. The major benefit of Antrea as the primary CNI is that - it can get rid
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think you need the "-" here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed it.

Nodes. The major benefit of Antrea as the primary CNI is that - it can get rid
of the Pods per Node limits with Amazon VPC CNI. For example, the default mode
of VPC CNI allocates a secondary IP for each Pod, and the maximum number of Pods
can be created on a Node is decided by the on the maximum number of elastic
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
can be created on a Node is decided by the on the maximum number of elastic
that can be created on a Node is decided by the maximum number of elastic

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks!

network interfaces and secondary IPs per interface that can be attached to an
EC2 instance type. When Antrea is the primary CNI, Pods are connected to the
Antrea overlay network and Pod IPs are allocated from the private CIDRs
configured for an EKS cluster, and so number of Pods per Node is no longer
Copy link
Contributor

Choose a reason for hiding this comment

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

the number of Pods per Node

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.

EC2 instance type. When Antrea is the primary CNI, Pods are connected to the
Antrea overlay network and Pod IPs are allocated from the private CIDRs
configured for an EKS cluster, and so number of Pods per Node is no longer
limited by number of secondary IPs per instance.
Copy link
Contributor

Choose a reason for hiding this comment

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

the number

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.

configured for an EKS cluster, and so number of Pods per Node is no longer
limited by number of secondary IPs per instance.

Note: as a general limitation in EKS's custom CNI support, Antrea cannot be
Copy link
Contributor

Choose a reason for hiding this comment

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

as a general limitation when using custom CNIs with EKS, Antrea...

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.

Note: as a general limitation in EKS's custom CNI support, Antrea cannot be
installed to the EKS control plane Nodes. As a result, EKS control plane
cannot initiate a connection to a Pod in Antrea overlay network, when Antrea
runs in `encap` mode, and so applications that require the control plane to Pod
Copy link
Contributor

Choose a reason for hiding this comment

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

that require control plane to Pod connections

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.

antoninbas
antoninbas previously approved these changes Oct 28, 2021
@jianjuns
Copy link
Contributor Author

/skip-all

@jianjuns
Copy link
Contributor Author

/skip-all

@jianjuns jianjuns merged commit 55a18c0 into antrea-io:main Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/aws Issues or PRs related to aws provider. kind/documentation Categorizes issue or PR as related to a documentation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Antrea as primary CNI in EKS
3 participants