Interface ICommonClusterOptions
Options for configuring an EKS cluster.
Namespace: Amazon.CDK.AWS.EKS
Assembly: Amazon.CDK.AWS.EKS.dll
Syntax (csharp)
public interface ICommonClusterOptions
Syntax (vb)
Public Interface ICommonClusterOptions
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.EC2;
using Amazon.CDK.AWS.EKS;
using Amazon.CDK.AWS.IAM;
KubernetesVersion kubernetesVersion;
Role role;
SecurityGroup securityGroup;
Subnet subnet;
SubnetFilter subnetFilter;
Vpc vpc;
var commonClusterOptions = new CommonClusterOptions {
Version = kubernetesVersion,
// the properties below are optional
ClusterName = "clusterName",
OutputClusterName = false,
OutputConfigCommand = false,
Role = role,
SecurityGroup = securityGroup,
Vpc = vpc,
VpcSubnets = new [] { new SubnetSelection {
AvailabilityZones = new [] { "availabilityZones" },
OnePerAz = false,
SubnetFilters = new [] { subnetFilter },
SubnetGroupName = "subnetGroupName",
SubnetName = "subnetName",
Subnets = new [] { subnet },
SubnetType = SubnetType.ISOLATED
} }
};
Synopsis
Properties
ClusterName | Name for the cluster. |
OutputClusterName | Determines whether a CloudFormation output with the name of the cluster will be synthesized. |
OutputConfigCommand | Determines whether a CloudFormation output with the |
Role | Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf. |
SecurityGroup | Security Group to use for Control Plane ENIs. |
Version | The Kubernetes version to run in the cluster. |
Vpc | The VPC in which to create the Cluster. |
VpcSubnets | Where to place EKS Control Plane ENIs. |
Properties
ClusterName
Name for the cluster.
virtual string ClusterName { get; }
Property Value
System.String
Remarks
Default: - Automatically generated name
OutputClusterName
Determines whether a CloudFormation output with the name of the cluster will be synthesized.
virtual Nullable<bool> OutputClusterName { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
Default: false
OutputConfigCommand
Determines whether a CloudFormation output with the aws eks update-kubeconfig
command will be synthesized.
virtual Nullable<bool> OutputConfigCommand { get; }
Property Value
System.Nullable<System.Boolean>
Remarks
This command will include the cluster name and, if applicable, the ARN of the masters IAM role.
Default: true
Role
Role that provides permissions for the Kubernetes control plane to make calls to AWS API operations on your behalf.
virtual IRole Role { get; }
Property Value
Remarks
Default: - A role is automatically created for you
SecurityGroup
Security Group to use for Control Plane ENIs.
virtual ISecurityGroup SecurityGroup { get; }
Property Value
Remarks
Default: - A security group is automatically created
Version
The Kubernetes version to run in the cluster.
KubernetesVersion Version { get; }
Property Value
Vpc
The VPC in which to create the Cluster.
virtual IVpc Vpc { get; }
Property Value
Remarks
Default: - a VPC with default configuration will be created and can be accessed through cluster.vpc
.
VpcSubnets
Where to place EKS Control Plane ENIs.
virtual ISubnetSelection[] VpcSubnets { get; }
Property Value
Remarks
If you want to create public load balancers, this must include public subnets.
For example, to only select private subnets, supply the following:
vpcSubnets: [{ subnetType: ec2.SubnetType.PRIVATE_WITH_NAT }]
Default: - All public and private subnets