class EndpointAccess
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.EKS.EndpointAccess |
Java | software.amazon.awscdk.services.eks.EndpointAccess |
Python | aws_cdk.aws_eks.EndpointAccess |
TypeScript (source) | @aws-cdk/aws-eks » EndpointAccess |
Endpoint access characteristics.
Example
const cluster = new eks.Cluster(this, 'hello-eks', {
version: eks.KubernetesVersion.V1_21,
endpointAccess: eks.EndpointAccess.PRIVATE, // No access outside of your VPC.
});
Properties
Name | Type | Description |
---|---|---|
static PRIVATE | Endpoint | The cluster endpoint is only accessible through your VPC. |
static PUBLIC | Endpoint | The cluster endpoint is accessible from outside of your VPC. |
static PUBLIC_AND_PRIVATE | Endpoint | The cluster endpoint is accessible from outside of your VPC. |
static PRIVATE
Type:
Endpoint
The cluster endpoint is only accessible through your VPC.
Worker node traffic to the endpoint will stay within your VPC.
static PUBLIC
Type:
Endpoint
The cluster endpoint is accessible from outside of your VPC.
Worker node traffic will leave your VPC to connect to the endpoint.
By default, the endpoint is exposed to all adresses. You can optionally limit the CIDR blocks that can access the public endpoint using the PUBLIC.onlyFrom
method.
If you limit access to specific CIDR blocks, you must ensure that the CIDR blocks that you
specify include the addresses that worker nodes and Fargate pods (if you use them)
access the public endpoint from.
static PUBLIC_AND_PRIVATE
Type:
Endpoint
The cluster endpoint is accessible from outside of your VPC.
Worker node traffic to the endpoint will stay within your VPC.
By default, the endpoint is exposed to all adresses. You can optionally limit the CIDR blocks that can access the public endpoint using the PUBLIC_AND_PRIVATE.onlyFrom
method.
If you limit access to specific CIDR blocks, you must ensure that the CIDR blocks that you
specify include the addresses that worker nodes and Fargate pods (if you use them)
access the public endpoint from.
Methods
Name | Description |
---|---|
only | Restrict public access to specific CIDR blocks. |
From(...cidr)
onlypublic onlyFrom(...cidr: string[]): EndpointAccess
Parameters
- cidr
string
— CIDR blocks.
Returns
Restrict public access to specific CIDR blocks.
If public access is disabled, this method will result in an error.