1. 程式人生 > >Amazon VPC CNI Plugin Version 1.1 Now Available

Amazon VPC CNI Plugin Version 1.1 Now Available

The Amazon VPC Container Networking Interface (CNI) plugin allows Kubernetes pods to receive native AWS VPC IP addresses. Because the CNI plugin is a core part of Amazon Elastic Container Service for Kubernetes (EKS), the EKS team will continue to develop the project in collaboration with our partners and customers.

Today, we are releasing version 1.1 of the Amazon VPC CNI plugin. This update introduces the ability to disable source NAT for pods, adds the ability to configure pre-allocation of secondary IP addresses, ensures that CNI plugin daemons are scheduled on all nodes in a cluster, adds elastic network interface (ENI) resource tagging, and more. Starting today, all new EKS clusters will automatically schedule the aws-node daemonset with version 1.1 of the CNI plugin. If you have an existing EKS cluster, you’ll need to update the “aws-node” daemonset to use the new version of the CNI plugin.

Let’s take a look at what’s included in this release and how to update the CNI plugin to version 1.1 for existing EKS clusters.

Features and Bug Fixes in Version 1.1

Ability to Disable Source Address Translation for Pods

The CNI plugin works by allocating multiple ENIs to EC2 instances, and then attaches secondary IP addresses to these ENIs. This allows the CNI to allocate as many IPs per instance as possible.

By default, the CNI configures pods with Source Network Address Translation (SNAT) enabled, which sets the return address for a packet to the primary public IP of the instance, to allow for communication with the internet. This way, when you use an AWS Internet Gateway and a public address, the return packet can be routed to the correct EC2 instance. Leave SNAT enabled (AWS_VPC_K8S_CNI_EXTERNALSNAT = False by default) if you want your pods to run in a public subnet and communicate with the internet through an internet gateway.

SNAT can cause issues, however, if traffic from another private IP space (e.g., over VPC peering, Transit VPC, or Direct Connect) attempts to communicate directly to a pod that is not attached to the primary ENI. To declare that NAT will be handled by an external device (such as an AWS NAT Gateway, i.e. not on the instance itself), you can disable Source Network Address Translation (SNAT) on the instance with a new environment variable, AWS_VPC_K8S_CNI_EXTERNALSNAT — set its value to “true”.

Disable SNAT if you need to allow inbound communication to your pods from external VPNs, direct connections, and external VPCs, and your pods do not need to access the Internet directly via an IGW. In other words, disabling SNAT is incompatible with nodes running in a public subnet; your nodes need to run in a private subnet and connect to the internet through an AWS NAT Gateway or another external NAT device.

Network Diagrams:

SNAT enabled diagram

SNAT disabled diagram Configurable IP Address Pool

Today, the EKS CNI plugin creates a “warm pool” of IP addresses by pre-allocating IP addresses on EKS nodes to reduce scheduling latency. In other words: because the instance already has IP addresses allocated to it, Kubernetes doesn’t need to wait for an IP address to be assigned before it can schedule a pod. However, there are some tradeoffs in this approach: if your EKS nodes are larger instance types and can support larger numbers of IP addresses, you might find that your nodes are hogging more IP addresses than you want.

You can use the WARM_IP_TARGET environment variable to tune the size of the IP address “warm pool.” You can define a threshold for available IP addresses below which L-IPAMD creates and attaches a new ENI to a node, allocates new IP addresses, and then adds them to the warm pool. This threshold can be configured using the WARM_IP_TARGET environment variable; it can also be configured in amazon-vpc-cni.yaml.

For example, an m4.4xlarge node can have up to 8 ENIs, and each ENI can have up to 30 IP addresses. This means that the m4.4xlarge could reserve up to 240 IP addresses from your VPC CIDR for its warm pool, even if there are no pods scheduled. Changing the WARM_IP_TARGET to a lower number will reduce how many IPs the node has attached, but if your number of pods scheduled exceeds the WARM_IP_TARGET, additional pod launches will require an EC2 AssignPrivateIpAddresses() API call, which can add latency to your pod startup times.

This parameter allows you to perform a balancing act. We recommend tuning it based on your pod launch needs: how many pods do you need to schedule and how fast do you need them to start up, versus how much of your VPC IP space you’d like your EKS nodes to occupy.

CNI Plugin Daemons Scheduled to All Nodes

Previously, node taints like NoExecute and NoSchedule would prevent daemon pods, such as aws-node, calico-node, and calico-typha, from being scheduled to each node in the cluster. Now, these daemons are always scheduled to all nodes.

ENI Tagging

With this enhancement, the CNI plugin adds two new tags, node.k8s.amazonaws.com/instance_id and cluster.k8s.amazonaws.com/name, to the ENIs it creates, for easier identification and filtering.

If the environment variable CLUSTER_NAME is not set, only the node.k8s.amazonaws.com/instance_id tag is set. For example:

node.k8s.amazonaws.com/instance_id = i-0bf1f4f8e688b70fd

If CLUSTER_NAME is set, then both tags will be set. For example, if CLUSTER_NAME=mycluster

node.k8s.amazonaws.com/instance_id = i-0bf1f4f8e688b70fd
cluster.k8s.amazonaws.com/name     = mycluster-1531613390

Release Pod IP on CNI Failure

This fixes a scenario in which a pod remains in a permanent ContainerCreating state and thus cannot be deleted if the CNI Plugin fails to set up the network stack for it for any reason. By releasing the IP address so the L-IPAM daemon can reclaim it, the node kubelet is then able to initiate a pod delete request.

Updating the CNI plugin

If you have an existing EKS cluster, it’s likely you’re running version 1.0 of the CNI plugin and you’ll need to manually update the CNI plugin to version 1.1. To check the version you’re currently running, you can run the following command:

kubectl describe daemonset aws-node --namespace kube-system | grep Image | cut -d "/" -f 2

All EKS clusters created from today forward (22:00 UTC July 26th, 2018) will automatically schedule the aws-node daemonset with 1.1 of the CNI plugin. If you prefer, you can recreate your cluster instead of updating.

To upgrade, run the following command:

kubectl apply -f https://raw.githubusercontent.com/aws/amazon-vpc-cni-k8s/master/config/v1.1/aws-k8s-cni.yaml

Next Steps

For more information about pod networking in Amazon EKS, please see the Amazon EKS Documentation.

For more information about the changes to the CNI Plugin, see the changelog on the GitHub repository.

We encourage you to create issues and submit PRs to the AWS CNI Plugin GitHub repository. We look forward to seeing your contributions in future releases of the CNI plugin!

相關推薦

Amazon VPC CNI Plugin Version 1.1 Now Available

The Amazon VPC Container Networking Interface (CNI) plugin allows Kubernetes pods to receive native AWS VPC IP addresses. Because the CNI plugin i

Exploring the Networking Foundation for EKS: amazon-vpc-cni-k8s + Calico

At AWS re:invent, Amazon announced Elastic Container Service for Kubernetes (EKS), and revealed details of how container networking would

OpenSource I 探索EKS的網路基礎:amazon-vpc-cni-k8s + Calico

Amazon 在 AWS re:invent 上宣佈推出 Elastic Container Service for Kubernetes (EKS) 並詳細介紹了容器網路將如何在此令人振奮的新平臺上工作 — 以及得到保護。特別是 EKS 利用了新推出的 AWS Container Netw

PyTorch 1.0 preview now available in Amazon SageMaker and the AWS Deep Learning AMIs

Amazon SageMaker and the AWS Deep Learning AMIs (DLAMI) now provide an easy way to evaluate the PyTorch 1.0 preview release. PyTorch 1.0 adds seam

freeradius 啟動報錯Refusing to start with libssl version OpenSSL 1.0.1

all bss sim span family sin pop div con 改動etc/raddb下的radiusd.conf文件 找到allow_vulnerable_openssl = no,改動成allow_vulnerable_openssl = ye

System.Data.OracleClient 需要 Oracle 客戶端軟件 version 8.1.7 或更高版本

model oracle ora mod 版本 users 客戶端軟件 system .com 說明: 執行當前 Web 請求期間,出現未經處理的異常。請檢查堆棧跟蹤信息,以了解有關該錯誤以及代碼中導致錯誤的出處的詳細信息。 異常詳細信息: System.Servi

eclipse環境Dynamic web module version 3.1版本的進步,簡化Dynamic web object 中Servlet類的配置,不用web.xml配置<Servlet>

-a utf-8 新建 分享 tde ati servle eclipse cati eclipse環境Dynamic web module version 3.1版本之前,Dynamic web object 中Servlet類的配置,要在web.xml 配置<Se

錯誤報告:ffi requires Ruby version >= 1.9.

ins cocoa tin rpm default 就是 奇怪 錯誤信息 p s 今天在定制RPM包時,使用命令gem install fpm時,出現以下錯誤報告:[root@m01 ansible_playbook]# gem install fpmBuilding na

解決 You are using pip version 7.1.2, however version 18.0 is available.報錯

完美 bsp -- 安裝目錄 方法 exe win .exe 嘗試 Windows下安裝 Pyhton的mysql庫時 命令行一直報 You are using pip version 7.1.2, however version 18.0 is available

was built for newer iOS version (11.1) than being linked (8.0)

作者:阿爾卡 連結:https://cdn2.jianshu.io/p/4aca5ef896fc 來源:簡書 簡書著作權歸作者所有,任何形式的轉載都請聯絡作者獲得授權並註明出處。 日常消滅警告,遇到問題如下 ld: warning: object file (/Users/wangl

You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip

pip提示: You are using pip version 10.0.1, however version 18.1 is available.You should consider upgrading via the 'python -m pip install --upgrade pip' c

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.1 or one

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:3.0.1 or one of its dependencies could not be resolved: F

【原始碼】人臉識別DEMO version 1.1.0.0

部分MATLAB原始碼如下: %% Simple Face Recognition Example % Copyright 2014-2015 The MathWorks, Inc. %% Load Image Information from ATT Face Database

[python問題] You are using pip version 7.1.2, however version 18.1 is available

 在windows環境下在安裝paramiko的時候 ,使用命令python -m pip install paramiko 一直報錯  You are using pip version 7.1.2, however version 18.1 is available  解決辦法,pip版本升級。在Py

【原始碼】便捷實用的MATLAB資料採集APP version 4.1.0.0

該應用程式是一個快速啟動、執行資料採集工具箱的APP。 This app is a quick way to get up andrunning with the Data Acquisition Toolbox. 允許使用者快速發現、連線、控制來自MATLAB的資料採集卡,而

You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading v

You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' comma

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project sharp-common: Execution default-test of go

1 [INFO] Scanning for projects... 2 [INFO] 3 [INFO] -----------------------< com.sharp:sharp-common >----------------------- 4 [INFO] Buildin

Requested 'libusbmuxd >= 1.1.0' but version of libusbmuxd is 1.0.10解決辦法

遇見問題 在部署Flutter執行環境時遇見一個問題: 在終端執行 flutter doctor:下面報錯,並提示 brew install --HEAD libimobiledevice brew

is too old (format 10) to work with client version '1.9.6 (r1800392)' (expects

TortoiseSVN1.6升到1.9時,報錯。 這個錯誤提示就是告訴你要對本地資料夾進行一次upgrade操作。對版本庫本地資料夾的頂層資料夾點右鍵,選擇svn upgrade。     1.6以下版本的SVN客戶端會在每個資料夾下存放一個.svn隱藏資料夾,1

An SDK corresponding to WDK version '8 1' was not found Ple

                安裝了VS2015加WDK10,新建了KMDF工程時編譯時報了上述錯誤。是需要下載安裝windows10的SDK。出現這種情況,你可能是缺少了第三步,檢查下面的各項安裝是否完備:        一般來說, Visual Studio 2015 支援 WDK 10. Visual