Amazon EKS

v0.35.0 published on Wednesday, Nov 10, 2021 by Pulumi

VpcCni

VpcCni manages the configuration of the Amazon VPC CNI plugin for Kubernetes by applying its YAML chart.

Create a VpcCni Resource

new VpcCni(name: string, args: VpcCniArgs, opts?: CustomResourceOptions);
@overload
def VpcCni(resource_name: str,
           opts: Optional[ResourceOptions] = None,
           cni_configure_rpfilter: Optional[bool] = None,
           cni_custom_network_cfg: Optional[bool] = None,
           cni_external_snat: Optional[bool] = None,
           custom_network_config: Optional[bool] = None,
           disable_tcp_early_demux: Optional[bool] = None,
           enable_pod_eni: Optional[bool] = None,
           eni_config_label_def: Optional[str] = None,
           eni_mtu: Optional[int] = None,
           external_snat: Optional[bool] = None,
           image: Optional[str] = None,
           init_image: Optional[str] = None,
           kubeconfig: Optional[Any] = None,
           log_file: Optional[str] = None,
           log_level: Optional[str] = None,
           node_port_support: Optional[bool] = None,
           security_context_privileged: Optional[bool] = None,
           veth_prefix: Optional[str] = None,
           warm_eni_target: Optional[int] = None,
           warm_ip_target: Optional[int] = None)
@overload
def VpcCni(resource_name: str,
           args: VpcCniArgs,
           opts: Optional[ResourceOptions] = None)
func NewVpcCni(ctx *Context, name string, args VpcCniArgs, opts ...ResourceOption) (*VpcCni, error)
public VpcCni(string name, VpcCniArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VpcCniArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args VpcCniArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VpcCniArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VpcCniArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VpcCni Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The VpcCni resource accepts the following input properties:

Kubeconfig object
The kubeconfig to use when setting the VPC CNI options.
CniConfigureRpfilter bool
Specifies whether ipamd should configure rp filter for primary interface. Default is false.
CniCustomNetworkCfg bool
Specifies that your pods may use subnets and security groups that are independent of your worker node’s VPC configuration. By default, pods share the same subnet and security groups as the worker node’s primary interface. Setting this variable to true causes ipamd to use the security groups and VPC subnet in a worker node’s ENIConfig for elastic network interface allocation. You must create an ENIConfig custom resource for each subnet that your pods will reside in, and then annotate or label each worker node to use a specific ENIConfig (multiple worker nodes can be annotated or labelled with the same ENIConfig). Worker nodes can only be annotated with a single ENIConfig at a time, and the subnet in the ENIConfig must belong to the same Availability Zone that the worker node resides in. For more information, see CNI Custom Networking in the Amazon EKS User Guide. Default is false
CniExternalSnat bool
Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied. 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 Internet Gateway. However, your nodes must be running in a private subnet and connected to the internet through an AWS NAT Gateway or another external NAT device. Default is false
CustomNetworkConfig bool

Specifies that your pods may use subnets and security groups (within the same VPC as your control plane resources) that are independent of your cluster’s resourcesVpcConfig.

Defaults to false.

DisableTcpEarlyDemux bool
Allows the kubelet’s liveness and readiness probes to connect via TCP when pod ENI is enabled. This will slightly increase local TCP connection latency.
EnablePodEni bool
Specifies whether to allow IPAMD to add the vpc.amazonaws.com/has-trunk-attached label to the node if the instance has capacity to attach an additional ENI. Default is false. If using liveness and readiness probes, you will also need to disable TCP early demux.
EniConfigLabelDef string

Specifies the ENI_CONFIG_LABEL_DEF environment variable value for worker nodes. This is used to tell Kubernetes to automatically apply the ENIConfig for each Availability Zone Ref: https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html (step 5(c))

Defaults to the official AWS CNI image in ECR.

EniMtu int

Used to configure the MTU size for attached ENIs. The valid range is from 576 to 9001.

Defaults to 9001.

ExternalSnat bool

Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied.

Defaults to false.

Image string

Specifies the container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI image in ECR.

InitImage string

Specifies the init container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI init container image in ECR.

LogFile string

Specifies the file path used for logs.

Defaults to “stdout” to emit Pod logs for kubectl logs.

LogLevel string

Specifies the log level used for logs.

Defaults to “DEBUG” Valid values: “DEBUG”, “INFO”, “WARN”, “ERROR”, or “FATAL”.

NodePortSupport bool

Specifies whether NodePort services are enabled on a worker node’s primary network interface. This requires additional iptables rules and that the kernel’s reverse path filter on the primary interface is set to loose.

Defaults to true.

SecurityContextPrivileged bool
Pass privilege to containers securityContext. This is required when SELinux is enabled. This value will not be passed to the CNI config by default
VethPrefix string

Specifies the veth prefix used to generate the host-side veth device name for the CNI.

The prefix can be at most 4 characters long.

Defaults to “eni”.

WarmEniTarget int

Specifies the number of free elastic network interfaces (and all of their available IP addresses) that the ipamD daemon should attempt to keep available for pod assignment on the node.

Defaults to 1.

WarmIpTarget int
Specifies the number of free IP addresses that the ipamD daemon should attempt to keep available for pod assignment on the node.
Kubeconfig interface{}
The kubeconfig to use when setting the VPC CNI options.
CniConfigureRpfilter bool
Specifies whether ipamd should configure rp filter for primary interface. Default is false.
CniCustomNetworkCfg bool
Specifies that your pods may use subnets and security groups that are independent of your worker node’s VPC configuration. By default, pods share the same subnet and security groups as the worker node’s primary interface. Setting this variable to true causes ipamd to use the security groups and VPC subnet in a worker node’s ENIConfig for elastic network interface allocation. You must create an ENIConfig custom resource for each subnet that your pods will reside in, and then annotate or label each worker node to use a specific ENIConfig (multiple worker nodes can be annotated or labelled with the same ENIConfig). Worker nodes can only be annotated with a single ENIConfig at a time, and the subnet in the ENIConfig must belong to the same Availability Zone that the worker node resides in. For more information, see CNI Custom Networking in the Amazon EKS User Guide. Default is false
CniExternalSnat bool
Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied. 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 Internet Gateway. However, your nodes must be running in a private subnet and connected to the internet through an AWS NAT Gateway or another external NAT device. Default is false
CustomNetworkConfig bool

Specifies that your pods may use subnets and security groups (within the same VPC as your control plane resources) that are independent of your cluster’s resourcesVpcConfig.

Defaults to false.

DisableTcpEarlyDemux bool
Allows the kubelet’s liveness and readiness probes to connect via TCP when pod ENI is enabled. This will slightly increase local TCP connection latency.
EnablePodEni bool
Specifies whether to allow IPAMD to add the vpc.amazonaws.com/has-trunk-attached label to the node if the instance has capacity to attach an additional ENI. Default is false. If using liveness and readiness probes, you will also need to disable TCP early demux.
EniConfigLabelDef string

Specifies the ENI_CONFIG_LABEL_DEF environment variable value for worker nodes. This is used to tell Kubernetes to automatically apply the ENIConfig for each Availability Zone Ref: https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html (step 5(c))

Defaults to the official AWS CNI image in ECR.

EniMtu int

Used to configure the MTU size for attached ENIs. The valid range is from 576 to 9001.

Defaults to 9001.

ExternalSnat bool

Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied.

Defaults to false.

Image string

Specifies the container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI image in ECR.

InitImage string

Specifies the init container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI init container image in ECR.

LogFile string

Specifies the file path used for logs.

Defaults to “stdout” to emit Pod logs for kubectl logs.

LogLevel string

Specifies the log level used for logs.

Defaults to “DEBUG” Valid values: “DEBUG”, “INFO”, “WARN”, “ERROR”, or “FATAL”.

NodePortSupport bool

Specifies whether NodePort services are enabled on a worker node’s primary network interface. This requires additional iptables rules and that the kernel’s reverse path filter on the primary interface is set to loose.

Defaults to true.

SecurityContextPrivileged bool
Pass privilege to containers securityContext. This is required when SELinux is enabled. This value will not be passed to the CNI config by default
VethPrefix string

Specifies the veth prefix used to generate the host-side veth device name for the CNI.

The prefix can be at most 4 characters long.

Defaults to “eni”.

WarmEniTarget int

Specifies the number of free elastic network interfaces (and all of their available IP addresses) that the ipamD daemon should attempt to keep available for pod assignment on the node.

Defaults to 1.

WarmIpTarget int
Specifies the number of free IP addresses that the ipamD daemon should attempt to keep available for pod assignment on the node.
kubeconfig any
The kubeconfig to use when setting the VPC CNI options.
cniConfigureRpfilter boolean
Specifies whether ipamd should configure rp filter for primary interface. Default is false.
cniCustomNetworkCfg boolean
Specifies that your pods may use subnets and security groups that are independent of your worker node’s VPC configuration. By default, pods share the same subnet and security groups as the worker node’s primary interface. Setting this variable to true causes ipamd to use the security groups and VPC subnet in a worker node’s ENIConfig for elastic network interface allocation. You must create an ENIConfig custom resource for each subnet that your pods will reside in, and then annotate or label each worker node to use a specific ENIConfig (multiple worker nodes can be annotated or labelled with the same ENIConfig). Worker nodes can only be annotated with a single ENIConfig at a time, and the subnet in the ENIConfig must belong to the same Availability Zone that the worker node resides in. For more information, see CNI Custom Networking in the Amazon EKS User Guide. Default is false
cniExternalSnat boolean
Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied. 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 Internet Gateway. However, your nodes must be running in a private subnet and connected to the internet through an AWS NAT Gateway or another external NAT device. Default is false
customNetworkConfig boolean

Specifies that your pods may use subnets and security groups (within the same VPC as your control plane resources) that are independent of your cluster’s resourcesVpcConfig.

Defaults to false.

disableTcpEarlyDemux boolean
Allows the kubelet’s liveness and readiness probes to connect via TCP when pod ENI is enabled. This will slightly increase local TCP connection latency.
enablePodEni boolean
Specifies whether to allow IPAMD to add the vpc.amazonaws.com/has-trunk-attached label to the node if the instance has capacity to attach an additional ENI. Default is false. If using liveness and readiness probes, you will also need to disable TCP early demux.
eniConfigLabelDef string

Specifies the ENI_CONFIG_LABEL_DEF environment variable value for worker nodes. This is used to tell Kubernetes to automatically apply the ENIConfig for each Availability Zone Ref: https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html (step 5(c))

Defaults to the official AWS CNI image in ECR.

eniMtu number

Used to configure the MTU size for attached ENIs. The valid range is from 576 to 9001.

Defaults to 9001.

externalSnat boolean

Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied.

Defaults to false.

image string

Specifies the container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI image in ECR.

initImage string

Specifies the init container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI init container image in ECR.

logFile string

Specifies the file path used for logs.

Defaults to “stdout” to emit Pod logs for kubectl logs.

logLevel string

Specifies the log level used for logs.

Defaults to “DEBUG” Valid values: “DEBUG”, “INFO”, “WARN”, “ERROR”, or “FATAL”.

nodePortSupport boolean

Specifies whether NodePort services are enabled on a worker node’s primary network interface. This requires additional iptables rules and that the kernel’s reverse path filter on the primary interface is set to loose.

Defaults to true.

securityContextPrivileged boolean
Pass privilege to containers securityContext. This is required when SELinux is enabled. This value will not be passed to the CNI config by default
vethPrefix string

Specifies the veth prefix used to generate the host-side veth device name for the CNI.

The prefix can be at most 4 characters long.

Defaults to “eni”.

warmEniTarget number

Specifies the number of free elastic network interfaces (and all of their available IP addresses) that the ipamD daemon should attempt to keep available for pod assignment on the node.

Defaults to 1.

warmIpTarget number
Specifies the number of free IP addresses that the ipamD daemon should attempt to keep available for pod assignment on the node.
kubeconfig Any
The kubeconfig to use when setting the VPC CNI options.
cni_configure_rpfilter bool
Specifies whether ipamd should configure rp filter for primary interface. Default is false.
cni_custom_network_cfg bool
Specifies that your pods may use subnets and security groups that are independent of your worker node’s VPC configuration. By default, pods share the same subnet and security groups as the worker node’s primary interface. Setting this variable to true causes ipamd to use the security groups and VPC subnet in a worker node’s ENIConfig for elastic network interface allocation. You must create an ENIConfig custom resource for each subnet that your pods will reside in, and then annotate or label each worker node to use a specific ENIConfig (multiple worker nodes can be annotated or labelled with the same ENIConfig). Worker nodes can only be annotated with a single ENIConfig at a time, and the subnet in the ENIConfig must belong to the same Availability Zone that the worker node resides in. For more information, see CNI Custom Networking in the Amazon EKS User Guide. Default is false
cni_external_snat bool
Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied. 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 Internet Gateway. However, your nodes must be running in a private subnet and connected to the internet through an AWS NAT Gateway or another external NAT device. Default is false
custom_network_config bool

Specifies that your pods may use subnets and security groups (within the same VPC as your control plane resources) that are independent of your cluster’s resourcesVpcConfig.

Defaults to false.

disable_tcp_early_demux bool
Allows the kubelet’s liveness and readiness probes to connect via TCP when pod ENI is enabled. This will slightly increase local TCP connection latency.
enable_pod_eni bool
Specifies whether to allow IPAMD to add the vpc.amazonaws.com/has-trunk-attached label to the node if the instance has capacity to attach an additional ENI. Default is false. If using liveness and readiness probes, you will also need to disable TCP early demux.
eni_config_label_def str

Specifies the ENI_CONFIG_LABEL_DEF environment variable value for worker nodes. This is used to tell Kubernetes to automatically apply the ENIConfig for each Availability Zone Ref: https://docs.aws.amazon.com/eks/latest/userguide/cni-custom-network.html (step 5(c))

Defaults to the official AWS CNI image in ECR.

eni_mtu int

Used to configure the MTU size for attached ENIs. The valid range is from 576 to 9001.

Defaults to 9001.

external_snat bool

Specifies whether an external NAT gateway should be used to provide SNAT of secondary ENI IP addresses. If set to true, the SNAT iptables rule and off-VPC IP rule are not applied, and these rules are removed if they have already been applied.

Defaults to false.

image str

Specifies the container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI image in ECR.

init_image str

Specifies the init container image to use in the AWS CNI cluster DaemonSet.

Defaults to the official AWS CNI init container image in ECR.

log_file str

Specifies the file path used for logs.

Defaults to “stdout” to emit Pod logs for kubectl logs.

log_level str

Specifies the log level used for logs.

Defaults to “DEBUG” Valid values: “DEBUG”, “INFO”, “WARN”, “ERROR”, or “FATAL”.

node_port_support bool

Specifies whether NodePort services are enabled on a worker node’s primary network interface. This requires additional iptables rules and that the kernel’s reverse path filter on the primary interface is set to loose.

Defaults to true.

security_context_privileged bool
Pass privilege to containers securityContext. This is required when SELinux is enabled. This value will not be passed to the CNI config by default
veth_prefix str

Specifies the veth prefix used to generate the host-side veth device name for the CNI.

The prefix can be at most 4 characters long.

Defaults to “eni”.

warm_eni_target int

Specifies the number of free elastic network interfaces (and all of their available IP addresses) that the ipamD daemon should attempt to keep available for pod assignment on the node.

Defaults to 1.

warm_ip_target int
Specifies the number of free IP addresses that the ipamD daemon should attempt to keep available for pod assignment on the node.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcCni resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Package Details

Repository
https://github.com/pulumi/pulumi-eks
License
Apache-2.0