EndpointAccess Class
Endpoint access characteristics.
| Source | aws-eks-v2/lib/cluster.ts |
|---|---|
| Type last changed |
Example
const cluster = new eks.Cluster(this, 'hello-eks', {
version: eks.KubernetesVersion.V1_37,
endpointAccess: eks.EndpointAccess.PRIVATE, // No access outside of your VPC.
});
cluster = eks.Cluster(self, "hello-eks",
version=eks.KubernetesVersion.V1_37,
endpoint_access=eks.EndpointAccess.PRIVATE
)
Cluster cluster = Cluster.Builder.create(this, "hello-eks")
.version(KubernetesVersion.V1_37)
.endpointAccess(EndpointAccess.PRIVATE)
.build();
// Install: dotnet add package Amazon.CDK.Lib
var cluster = new Cluster(this, "hello-eks", new ClusterProps {
Version = KubernetesVersion.V1_37,
EndpointAccess = EndpointAccess.PRIVATE
});
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
cluster := eks.NewCluster(this, jsii.String("hello-eks"), &ClusterProps{
Version: eks.KubernetesVersion_V1_37(),
EndpointAccess: eks.EndpointAccess_PRIVATE(),
})
Properties
PRIVATEEndpointAccessPRIVATEEndpointAccessPRIVATEEndpointAccessPRIVATEEndpointAccessPRIVATEEndpointAccess static #Worker node traffic to the endpoint will stay within your VPC.
PUBLICEndpointAccessPUBLICEndpointAccessPUBLICEndpointAccessPUBLICEndpointAccessPUBLICEndpointAccess static #notes
Worker node traffic will leave your VPC to connect to the endpoint.
By default, the endpoint is exposed to all addresses. 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.
PUBLIC_AND_PRIVATEEndpointAccessPUBLIC_AND_PRIVATEEndpointAccessPUBLIC_AND_PRIVATEEndpointAccessPUBLIC_AND_PRIVATEEndpointAccessPUBLIC_AND_PRIVATEEndpointAccess static #notes
Worker node traffic to the endpoint will stay within your VPC.
By default, the endpoint is exposed to all addresses. 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
onlyFrom(...cidr: string[]): EndpointAccess // chainabledef only_from(self, cidr: str) -> EndpointAccesspublic EndpointAccess onlyFrom(String cidr)public EndpointAccess OnlyFrom(string cidr)func OnlyFrom(Cidr *string) EndpointAccess #If public access is disabled, this method will result in an error.
1 parameter
Parameters
cidrcidrcidrcidrCidr— CIDR blocks.