Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Update docs for Azure CNI subnet requirements #2992

Merged
merged 4 commits into from
May 18, 2018

Conversation

CecileRobertMichon
Copy link
Contributor

What this PR does / why we need it: Improves documentation for subnet reserved IPs with Azure CNI (specifically, Azure CNI reserves 1 IP + as many IPs as the max-pod value of that node for each node). TODO: add validation to prevent deployment if subnet is too small.

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #2897

Special notes for your reviewer:

If applicable:

  • documentation
  • unit tests
  • tested backward compatibility (ie. deploy with previous version, upgrade with this branch)

Release note:

@ghost ghost added the in progress label May 16, 2018
@@ -733,10 +733,8 @@ func setAgentNetworkDefaults(a *api.Properties) {

// Allocate IP addresses for pods if VNET integration is enabled.
if a.OrchestratorProfile.IsAzureCNI() {
if a.OrchestratorProfile.OrchestratorType == api.Kubernetes {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was redundant because IsAzureCNI() returns false if a.OrchestratorProfile.OrchestratorType != api.Kubernetes

@@ -9,7 +9,7 @@
"jumpboxProfile": {
"name": "my-jb",
"vmSize": "Standard_D2_v2",
"diskSizeGB": 30,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a typo

@@ -9,7 +9,7 @@
"jumpboxProfile": {
"name": "my-jb",
"vmSize": "Standard_D2_v2",
"diskSizeGB": 30,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto

@@ -204,7 +204,7 @@ you can define stricter policies. Good resources to get information about that a

*Note: Custom VNET for Kubernetes Windows cluster has a [known issue](https://github.com/Azure/acs-engine/issues/1767).*

ACS Engine supports deploying into an existing VNET. Operators must specify the ARM path/id of Subnets for the `masterProfile` and any `agentPoolProfiles`, as well as the first IP address to use for IP static IP allocation in `firstConsecutiveStaticIP`. Additionally, to prevent source address NAT'ing within the VNET, we assign to the `vnetCidr` property in `masterProfile` the CIDR block that represents the usable address space in the existing VNET.
ACS Engine supports deploying into an existing VNET. Operators must specify the ARM path/id of Subnets for the `masterProfile` and any `agentPoolProfiles`, as well as the first IP address to use for static IP allocation in `firstConsecutiveStaticIP`. Please note that in any azure subnet, the first four and the last ip address is reserved and can not be used. Additionally, each POD now gets the IP address from the Subnet. As a result, enough IP addresses (equal to `ipAddressCount` for each node) should be available beyond `firstConsecutiveStaticIP`. By default, the `ipAddressCount` has a value of 31, 1 for the node and 30 for pods, (note that the number of pods can be changed via `KubeletConfig["--max-pods"]`). `ipAddressCount` can be changed if desired. Furthermore, to prevent source address NAT'ing within the VNET, we assign to the `vnetCidr` property in `masterProfile` the CIDR block that represents the usable address space in the existing VNET.
Copy link
Member

Choose a reason for hiding this comment

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

s/POD/pod

Copy link
Member

Choose a reason for hiding this comment

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

unless you meant https://www.pods.com

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh yeah thanks, not what I meant... I'll fix it

@CecileRobertMichon CecileRobertMichon changed the title [WIP] Update docs for Azure CNI subnet requirements and small fixes Update docs for Azure CNI subnet requirements and small fixes May 17, 2018
@codecov
Copy link

codecov bot commented May 17, 2018

Codecov Report

Merging #2992 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2992      +/-   ##
==========================================
+ Coverage   50.75%   50.77%   +0.02%     
==========================================
  Files          97       97              
  Lines       14682    14691       +9     
==========================================
+ Hits         7452     7460       +8     
- Misses       6533     6534       +1     
  Partials      697      697
Impacted Files Coverage Δ
pkg/acsengine/defaults.go 83.59% <100%> (+0.03%) ⬆️
pkg/api/vlabs/validate.go 45.81% <0%> (-0.08%) ⬇️
pkg/api/convertertoapi.go 55.69% <0%> (-0.07%) ⬇️
pkg/api/converterfromapi.go 9.68% <0%> (-0.02%) ⬇️
pkg/api/vlabs/types.go 21.42% <0%> (ø) ⬆️
pkg/api/common/const.go 0% <0%> (ø) ⬆️
pkg/api/types.go 33.33% <0%> (ø) ⬆️
pkg/acsengine/engine.go 62.73% <0%> (+0.14%) ⬆️
pkg/api/common/versions.go 84.35% <0%> (+0.84%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 36fac61...50aec7d. Read the comment docs.

@CecileRobertMichon CecileRobertMichon changed the title Update docs for Azure CNI subnet requirements and small fixes Update docs for Azure CNI subnet requirements May 17, 2018
@acs-bot acs-bot added the size/S label May 17, 2018
@jackfrancis
Copy link
Member

/lgtm

@jackfrancis
Copy link
Member

/approve

@acs-bot
Copy link

acs-bot commented May 18, 2018

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jackfrancis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jackfrancis jackfrancis merged commit 25cfb55 into Azure:master May 18, 2018
@ghost ghost removed the in progress label May 18, 2018
@CecileRobertMichon CecileRobertMichon deleted the fix-subnetIsFull branch June 6, 2018 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deploying ACS Engine K8s Cluster with jumpbox will fail with SubnetIsFull Error
3 participants