Class: AWSCDK::EKS::FargateCluster
- Inherits:
-
Cluster
- Object
- Cluster
- AWSCDK::EKS::FargateCluster
- Defined in:
- eks/fargate_cluster.rb
Overview
Defines an EKS cluster that runs entirely on AWS Fargate.
The cluster is created with a default Fargate Profile that matches the
"default" and "kube-system" namespaces. You can add additional profiles using
add_fargate_profile.
Class Method Summary collapse
- .jsii_overridable_methods ⇒ Object
-
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
Instance Method Summary collapse
-
#add_auto_scaling_group_capacity(id, options) ⇒ AWSCDK::Autoscaling::AutoScalingGroup
Add nodes to this EKS cluster.
-
#add_cdk8s_chart(id, chart, options = nil) ⇒ AWSCDK::EKS::KubernetesManifest
Defines a CDK8s chart in this cluster.
-
#add_fargate_profile(id, options) ⇒ AWSCDK::EKS::FargateProfile
Adds a Fargate profile to this cluster.
-
#add_helm_chart(id, options) ⇒ AWSCDK::EKS::HelmChart
Defines a Helm chart in this cluster.
-
#add_manifest(id, *manifest) ⇒ AWSCDK::EKS::KubernetesManifest
Defines a Kubernetes resource in this cluster.
-
#add_nodegroup_capacity(id, options = nil) ⇒ AWSCDK::EKS::Nodegroup
Add managed nodegroup to this Amazon EKS cluster.
-
#add_service_account(id, options = nil) ⇒ AWSCDK::EKS::ServiceAccount
Creates a new service account with corresponding IAM Role (IRSA).
-
#admin_role ⇒ AWSCDK::IAM::Role
An IAM role with administrative permissions to create or update the cluster.
-
#alb_controller ⇒ AWSCDK::EKS::ALBController?
The ALB Controller construct defined for this cluster.
-
#apply_cross_stack_reference_strength(strength) ⇒ void
Override the cross-stack reference strength for this resource.
-
#apply_removal_policy(policy) ⇒ void
Apply the given removal policy to this resource.
-
#authentication_mode ⇒ AWSCDK::EKS::AuthenticationMode?
The authentication mode for the Amazon EKS cluster.
-
#aws_auth ⇒ AWSCDK::EKS::AWSAuth
Lazily creates the AwsAuth resource, which manages AWS authentication mapping.
-
#awscli_layer ⇒ AWSCDK::Lambda::ILayerVersion?
An AWS Lambda layer that contains the
awsCLI. -
#cluster_arn ⇒ String
The unique ARN assigned to the service by AWS in the form of arn:aws:eks:.
-
#cluster_certificate_authority_data ⇒ String
The certificate-authority-data for your cluster.
-
#cluster_encryption_config_key_arn ⇒ String
Amazon Resource Name (ARN) or alias of the customer master key (CMK).
-
#cluster_endpoint ⇒ String
The endpoint URL for the Cluster.
-
#cluster_handler_security_group ⇒ AWSCDK::EC2::ISecurityGroup?
A security group to associate with the Cluster Handler's Lambdas.
-
#cluster_name ⇒ String
The physical name of the Cluster.
-
#cluster_open_id_connect_issuer ⇒ String
If this cluster is kubectl-enabled, returns the OpenID Connect issuer.
-
#cluster_open_id_connect_issuer_url ⇒ String
If this cluster is kubectl-enabled, returns the OpenID Connect issuer url.
-
#cluster_ref ⇒ AWSCDK::Interfaces::AWSEKS::ClusterReference
A reference to a Cluster resource.
-
#cluster_security_group ⇒ AWSCDK::EC2::ISecurityGroup
The cluster security group that was created by Amazon EKS for the cluster.
-
#cluster_security_group_id ⇒ String
The id of the cluster security group that was created by Amazon EKS for the cluster.
-
#connect_auto_scaling_group_capacity(auto_scaling_group, options) ⇒ void
Connect capacity in the form of an existing AutoScalingGroup to the EKS cluster.
-
#connections ⇒ AWSCDK::EC2::Connections
Manages connection rules (Security Group Rules) for the cluster.
-
#default_capacity ⇒ AWSCDK::Autoscaling::AutoScalingGroup?
The auto scaling group that hosts the default capacity for this cluster.
-
#default_nodegroup ⇒ AWSCDK::EKS::Nodegroup?
The node group that hosts the default capacity for this cluster.
-
#default_profile ⇒ AWSCDK::EKS::FargateProfile
Fargate Profile that was created with the cluster.
-
#eks_pod_identity_agent ⇒ AWSCDK::EKS::IAddon?
Retrieves the EKS Pod Identity Agent addon for the EKS cluster.
-
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
- #generate_physical_name ⇒ String
-
#get_ingress_load_balancer_address(ingress_name, options = nil) ⇒ String
Fetch the load balancer address of an ingress backed by a load balancer.
-
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g.
bucket.bucketArn). -
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g.
bucket.bucketName). -
#get_service_load_balancer_address(service_name, options = nil) ⇒ String
Fetch the load balancer address of a service of type 'LoadBalancer'.
-
#grant_access(id, principal, access_policies, options = nil) ⇒ void
Grants the specified IAM principal access to the EKS cluster based on the provided access policies.
-
#initialize(scope, id, props) ⇒ FargateCluster
constructor
A new instance of FargateCluster.
-
#ip_family ⇒ AWSCDK::EKS::IPFamily?
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
-
#kubectl_environment ⇒ Hash{String => String}?
Custom environment variables when running
kubectlagainst this cluster. -
#kubectl_lambda_role ⇒ AWSCDK::IAM::IRole?
An IAM role that can perform kubectl operations against this cluster.
-
#kubectl_layer ⇒ AWSCDK::Lambda::ILayerVersion?
An AWS Lambda layer that includes
kubectlandhelm. -
#kubectl_memory ⇒ AWSCDK::Size?
The amount of memory allocated to the kubectl provider's lambda function.
-
#kubectl_private_subnets ⇒ Array<AWSCDK::EC2::ISubnet>?
Subnets to host the
kubectlcompute resources. -
#kubectl_role ⇒ AWSCDK::IAM::IRole?
An IAM role that can perform kubectl operations against this cluster.
-
#kubectl_security_group ⇒ AWSCDK::EC2::ISecurityGroup?
A security group to use for
kubectlexecution. -
#node ⇒ Constructs::Node
The tree node.
-
#on_event_layer ⇒ AWSCDK::Lambda::ILayerVersion?
The AWS Lambda layer that contains the NPM dependency
proxy-agent. -
#open_id_connect_provider ⇒ AWSCDK::IAM::IOpenIdConnectProvider
An
OpenIdConnectProviderresource associated with this cluster, and which can be used to link this cluster to AWS IAM. -
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
-
#prune ⇒ Boolean
Determines if Kubernetes resources can be pruned automatically.
-
#role ⇒ AWSCDK::IAM::IRole
IAM role assumed by the EKS Control Plane.
-
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
-
#to_string ⇒ String
Returns a string representation of this construct.
-
#vpc ⇒ AWSCDK::EC2::IVPC
The VPC in which this Cluster was created.
-
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Constructor Details
#initialize(scope, id, props) ⇒ FargateCluster
Returns a new instance of FargateCluster.
15 16 17 18 19 20 21 |
# File 'eks/fargate_cluster.rb', line 15 def initialize(scope, id, props) props = props.is_a?(Hash) ? ::AWSCDK::EKS::FargateClusterProps.new(**props.transform_keys(&:to_sym)) : props Jsii::Type.check_type(scope, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "scope") Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkZhcmdhdGVDbHVzdGVyUHJvcHMifQ==")), "props") Jsii::Object.instance_method(:initialize).bind(self).call(scope, id, props) end |
Class Method Details
.jsii_overridable_methods ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'eks/fargate_cluster.rb', line 23 def self.jsii_overridable_methods { :node => { kind: :property, name: "node", is_optional: false }, :env => { kind: :property, name: "env", is_optional: false }, :physical_name => { kind: :property, name: "physicalName", is_optional: false }, :stack => { kind: :property, name: "stack", is_optional: false }, :admin_role => { kind: :property, name: "adminRole", is_optional: false }, :aws_auth => { kind: :property, name: "awsAuth", is_optional: false }, :cluster_arn => { kind: :property, name: "clusterArn", is_optional: false }, :cluster_certificate_authority_data => { kind: :property, name: "clusterCertificateAuthorityData", is_optional: false }, :cluster_encryption_config_key_arn => { kind: :property, name: "clusterEncryptionConfigKeyArn", is_optional: false }, :cluster_endpoint => { kind: :property, name: "clusterEndpoint", is_optional: false }, :cluster_name => { kind: :property, name: "clusterName", is_optional: false }, :cluster_open_id_connect_issuer => { kind: :property, name: "clusterOpenIdConnectIssuer", is_optional: false }, :cluster_open_id_connect_issuer_url => { kind: :property, name: "clusterOpenIdConnectIssuerUrl", is_optional: false }, :cluster_ref => { kind: :property, name: "clusterRef", is_optional: false }, :cluster_security_group => { kind: :property, name: "clusterSecurityGroup", is_optional: false }, :cluster_security_group_id => { kind: :property, name: "clusterSecurityGroupId", is_optional: false }, :connections => { kind: :property, name: "connections", is_optional: false }, :open_id_connect_provider => { kind: :property, name: "openIdConnectProvider", is_optional: false }, :prune => { kind: :property, name: "prune", is_optional: false }, :role => { kind: :property, name: "role", is_optional: false }, :vpc => { kind: :property, name: "vpc", is_optional: false }, :alb_controller => { kind: :property, name: "albController", is_optional: true }, :authentication_mode => { kind: :property, name: "authenticationMode", is_optional: true }, :awscli_layer => { kind: :property, name: "awscliLayer", is_optional: true }, :cluster_handler_security_group => { kind: :property, name: "clusterHandlerSecurityGroup", is_optional: true }, :default_capacity => { kind: :property, name: "defaultCapacity", is_optional: true }, :default_nodegroup => { kind: :property, name: "defaultNodegroup", is_optional: true }, :eks_pod_identity_agent => { kind: :property, name: "eksPodIdentityAgent", is_optional: true }, :ip_family => { kind: :property, name: "ipFamily", is_optional: true }, :kubectl_environment => { kind: :property, name: "kubectlEnvironment", is_optional: true }, :kubectl_lambda_role => { kind: :property, name: "kubectlLambdaRole", is_optional: true }, :kubectl_layer => { kind: :property, name: "kubectlLayer", is_optional: true }, :kubectl_memory => { kind: :property, name: "kubectlMemory", is_optional: true }, :kubectl_private_subnets => { kind: :property, name: "kubectlPrivateSubnets", is_optional: true }, :kubectl_role => { kind: :property, name: "kubectlRole", is_optional: true }, :kubectl_security_group => { kind: :property, name: "kubectlSecurityGroup", is_optional: true }, :on_event_layer => { kind: :property, name: "onEventLayer", is_optional: true }, :default_profile => { kind: :property, name: "defaultProfile", is_optional: false }, :to_string => { kind: :method, name: "toString", is_optional: false }, :with => { kind: :method, name: "with", is_optional: false }, :apply_cross_stack_reference_strength => { kind: :method, name: "applyCrossStackReferenceStrength", is_optional: false }, :apply_removal_policy => { kind: :method, name: "applyRemovalPolicy", is_optional: false }, :generate_physical_name => { kind: :method, name: "generatePhysicalName", is_optional: false }, :get_resource_arn_attribute => { kind: :method, name: "getResourceArnAttribute", is_optional: false }, :get_resource_name_attribute => { kind: :method, name: "getResourceNameAttribute", is_optional: false }, :add_auto_scaling_group_capacity => { kind: :method, name: "addAutoScalingGroupCapacity", is_optional: false }, :add_cdk8s_chart => { kind: :method, name: "addCdk8sChart", is_optional: false }, :add_fargate_profile => { kind: :method, name: "addFargateProfile", is_optional: false }, :add_helm_chart => { kind: :method, name: "addHelmChart", is_optional: false }, :add_manifest => { kind: :method, name: "addManifest", is_optional: false }, :add_nodegroup_capacity => { kind: :method, name: "addNodegroupCapacity", is_optional: false }, :add_service_account => { kind: :method, name: "addServiceAccount", is_optional: false }, :connect_auto_scaling_group_capacity => { kind: :method, name: "connectAutoScalingGroupCapacity", is_optional: false }, :get_ingress_load_balancer_address => { kind: :method, name: "getIngressLoadBalancerAddress", is_optional: false }, :get_service_load_balancer_address => { kind: :method, name: "getServiceLoadBalancerAddress", is_optional: false }, :grant_access => { kind: :method, name: "grantAccess", is_optional: false }, } end |
.PROPERTY_INJECTION_ID ⇒ String
Uniquely identifies this class.
130 131 132 |
# File 'eks/fargate_cluster.rb', line 130 def self.PROPERTY_INJECTION_ID() Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_eks.FargateCluster", "PROPERTY_INJECTION_ID") end |
Instance Method Details
#add_auto_scaling_group_capacity(id, options) ⇒ AWSCDK::Autoscaling::AutoScalingGroup
Add nodes to this EKS cluster.
The nodes will automatically be configured with the right VPC and AMI for the instance type and Kubernetes version.
Note that if you specify updateType: RollingUpdate or updateType: ReplacingUpdate, your nodes might be replaced at deploy
time without notice in case the recommended AMI for your machine image type has been updated by AWS.
The default behavior for update_type is None, which means only new instances will be launched using the new AMI.
Spot instances will be labeled lifecycle=Ec2Spot and tainted with PreferNoSchedule.
In addition, the spot interrupt handler
daemon will be installed on all spot instances to handle
EC2 Spot Instance Termination Notices.
532 533 534 535 536 537 |
# File 'eks/fargate_cluster.rb', line 532 def add_auto_scaling_group_capacity(id, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EKS::AutoScalingGroupCapacityOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkF1dG9TY2FsaW5nR3JvdXBDYXBhY2l0eU9wdGlvbnMifQ==")), "options") jsii_call_method("addAutoScalingGroupCapacity", [id, ]) end |
#add_cdk8s_chart(id, chart, options = nil) ⇒ AWSCDK::EKS::KubernetesManifest
Defines a CDK8s chart in this cluster.
545 546 547 548 549 550 551 |
# File 'eks/fargate_cluster.rb', line 545 def add_cdk8s_chart(id, chart, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(chart, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLkNvbnN0cnVjdCJ9")), "chart") = .is_a?(Hash) ? ::AWSCDK::EKS::KubernetesManifestOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkt1YmVybmV0ZXNNYW5pZmVzdE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("addCdk8sChart", [id, chart, ]) end |
#add_fargate_profile(id, options) ⇒ AWSCDK::EKS::FargateProfile
Adds a Fargate profile to this cluster.
559 560 561 562 563 564 |
# File 'eks/fargate_cluster.rb', line 559 def add_fargate_profile(id, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EKS::FargateProfileOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkZhcmdhdGVQcm9maWxlT3B0aW9ucyJ9")), "options") jsii_call_method("addFargateProfile", [id, ]) end |
#add_helm_chart(id, options) ⇒ AWSCDK::EKS::HelmChart
Defines a Helm chart in this cluster.
571 572 573 574 575 576 |
# File 'eks/fargate_cluster.rb', line 571 def add_helm_chart(id, ) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EKS::HelmChartOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkhlbG1DaGFydE9wdGlvbnMifQ==")), "options") jsii_call_method("addHelmChart", [id, ]) end |
#add_manifest(id, *manifest) ⇒ AWSCDK::EKS::KubernetesManifest
Defines a Kubernetes resource in this cluster.
The manifest will be applied/deleted using kubectl as needed.
585 586 587 588 589 590 591 |
# File 'eks/fargate_cluster.rb', line 585 def add_manifest(id, *manifest) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") manifest.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6ImFueSJ9LCJraW5kIjoibWFwIn19")), "manifest[#{index}]") end jsii_call_method("addManifest", [id, *manifest]) end |
#add_nodegroup_capacity(id, options = nil) ⇒ AWSCDK::EKS::Nodegroup
Add managed nodegroup to this Amazon EKS cluster.
This method will create a new managed nodegroup and add into the capacity.
601 602 603 604 605 606 |
# File 'eks/fargate_cluster.rb', line 601 def add_nodegroup_capacity(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EKS::NodegroupOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLk5vZGVncm91cE9wdGlvbnMifQ==")), "options") unless .nil? jsii_call_method("addNodegroupCapacity", [id, ]) end |
#add_service_account(id, options = nil) ⇒ AWSCDK::EKS::ServiceAccount
Creates a new service account with corresponding IAM Role (IRSA).
613 614 615 616 617 618 |
# File 'eks/fargate_cluster.rb', line 613 def add_service_account(id, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") = .is_a?(Hash) ? ::AWSCDK::EKS::ServiceAccountOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLlNlcnZpY2VBY2NvdW50T3B0aW9ucyJ9")), "options") unless .nil? jsii_call_method("addServiceAccount", [id, ]) end |
#admin_role ⇒ AWSCDK::IAM::Role
An IAM role with administrative permissions to create or update the cluster.
This role also has systems:master permissions.
139 140 141 |
# File 'eks/fargate_cluster.rb', line 139 def admin_role() jsii_get_property("adminRole") end |
#alb_controller ⇒ AWSCDK::EKS::ALBController?
The ALB Controller construct defined for this cluster.
Will be undefined if alb_controller wasn't configured.
274 275 276 |
# File 'eks/fargate_cluster.rb', line 274 def alb_controller() jsii_get_property("albController") end |
#apply_cross_stack_reference_strength(strength) ⇒ void
This method returns an undefined value.
Override the cross-stack reference strength for this resource.
When set, any cross-stack reference to this resource will use the specified
mechanism instead of the global default determined by the
@aws-cdk/core:defaultCrossStackReferences context key. This is useful for
selectively weakening specific references to avoid the "deadly embrace" problem
without changing the app-wide default.
458 459 460 461 |
# File 'eks/fargate_cluster.rb', line 458 def apply_cross_stack_reference_strength(strength) Jsii::Type.check_type(strength, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZWZlcmVuY2VTdHJlbmd0aCJ9")), "strength") jsii_call_method("applyCrossStackReferenceStrength", [strength]) end |
#apply_removal_policy(policy) ⇒ void
This method returns an undefined value.
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.
The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS
account for data recovery and cleanup later (RemovalPolicy.RETAIN).
475 476 477 478 |
# File 'eks/fargate_cluster.rb', line 475 def apply_removal_policy(policy) Jsii::Type.check_type(policy, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5SZW1vdmFsUG9saWN5In0=")), "policy") jsii_call_method("applyRemovalPolicy", [policy]) end |
#authentication_mode ⇒ AWSCDK::EKS::AuthenticationMode?
Default: CONFIG_MAP.
The authentication mode for the Amazon EKS cluster.
The authentication mode determines how users and applications authenticate to the Kubernetes API server.
284 285 286 |
# File 'eks/fargate_cluster.rb', line 284 def authentication_mode() jsii_get_property("authenticationMode") end |
#aws_auth ⇒ AWSCDK::EKS::AWSAuth
Lazily creates the AwsAuth resource, which manages AWS authentication mapping.
146 147 148 |
# File 'eks/fargate_cluster.rb', line 146 def aws_auth() jsii_get_property("awsAuth") end |
#awscli_layer ⇒ AWSCDK::Lambda::ILayerVersion?
An AWS Lambda layer that contains the aws CLI.
If not defined, a default layer will be used containing the AWS CLI 1.x.
293 294 295 |
# File 'eks/fargate_cluster.rb', line 293 def awscli_layer() jsii_get_property("awscliLayer") end |
#cluster_arn ⇒ String
The unique ARN assigned to the service by AWS in the form of arn:aws:eks:.
153 154 155 |
# File 'eks/fargate_cluster.rb', line 153 def cluster_arn() jsii_get_property("clusterArn") end |
#cluster_certificate_authority_data ⇒ String
The certificate-authority-data for your cluster.
160 161 162 |
# File 'eks/fargate_cluster.rb', line 160 def () jsii_get_property("clusterCertificateAuthorityData") end |
#cluster_encryption_config_key_arn ⇒ String
Amazon Resource Name (ARN) or alias of the customer master key (CMK).
167 168 169 |
# File 'eks/fargate_cluster.rb', line 167 def cluster_encryption_config_key_arn() jsii_get_property("clusterEncryptionConfigKeyArn") end |
#cluster_endpoint ⇒ String
The endpoint URL for the Cluster.
This is the URL inside the kubeconfig file to use with kubectl
For example, https://5E1D0CEXAMPLEA591B746AFC5AB30262.yl4.us-west-2.eks.amazonaws.com
178 179 180 |
# File 'eks/fargate_cluster.rb', line 178 def cluster_endpoint() jsii_get_property("clusterEndpoint") end |
#cluster_handler_security_group ⇒ AWSCDK::EC2::ISecurityGroup?
Default: - No security group.
A security group to associate with the Cluster Handler's Lambdas.
The Cluster Handler's Lambdas are responsible for calling AWS's EKS API.
Requires place_cluster_handler_in_vpc to be set to true.
305 306 307 |
# File 'eks/fargate_cluster.rb', line 305 def cluster_handler_security_group() jsii_get_property("clusterHandlerSecurityGroup") end |
#cluster_name ⇒ String
The physical name of the Cluster.
185 186 187 |
# File 'eks/fargate_cluster.rb', line 185 def cluster_name() jsii_get_property("clusterName") end |
#cluster_open_id_connect_issuer ⇒ String
If this cluster is kubectl-enabled, returns the OpenID Connect issuer.
This is because the values is only be retrieved by the API and not exposed
by CloudFormation. If this cluster is not kubectl-enabled (i.e. uses the
stock CfnCluster), this is undefined.
196 197 198 |
# File 'eks/fargate_cluster.rb', line 196 def cluster_open_id_connect_issuer() jsii_get_property("clusterOpenIdConnectIssuer") end |
#cluster_open_id_connect_issuer_url ⇒ String
If this cluster is kubectl-enabled, returns the OpenID Connect issuer url.
This is because the values is only be retrieved by the API and not exposed
by CloudFormation. If this cluster is not kubectl-enabled (i.e. uses the
stock CfnCluster), this is undefined.
207 208 209 |
# File 'eks/fargate_cluster.rb', line 207 def cluster_open_id_connect_issuer_url() jsii_get_property("clusterOpenIdConnectIssuerUrl") end |
#cluster_ref ⇒ AWSCDK::Interfaces::AWSEKS::ClusterReference
A reference to a Cluster resource.
214 215 216 |
# File 'eks/fargate_cluster.rb', line 214 def cluster_ref() jsii_get_property("clusterRef") end |
#cluster_security_group ⇒ AWSCDK::EC2::ISecurityGroup
The cluster security group that was created by Amazon EKS for the cluster.
221 222 223 |
# File 'eks/fargate_cluster.rb', line 221 def cluster_security_group() jsii_get_property("clusterSecurityGroup") end |
#cluster_security_group_id ⇒ String
The id of the cluster security group that was created by Amazon EKS for the cluster.
228 229 230 |
# File 'eks/fargate_cluster.rb', line 228 def cluster_security_group_id() jsii_get_property("clusterSecurityGroupId") end |
#connect_auto_scaling_group_capacity(auto_scaling_group, options) ⇒ void
This method returns an undefined value.
Connect capacity in the form of an existing AutoScalingGroup to the EKS cluster.
The AutoScalingGroup must be running an EKS-optimized AMI containing the /etc/eks/bootstrap.sh script. This method will configure Security Groups, add the right policies to the instance role, apply the right tags, and add the required user data to the instance's launch configuration.
Spot instances will be labeled lifecycle=Ec2Spot and tainted with PreferNoSchedule.
If kubectl is enabled, the
spot interrupt handler
daemon will be installed on all spot instances to handle
EC2 Spot Instance Termination Notices.
Prefer to use add_auto_scaling_group_capacity if possible.
639 640 641 642 643 644 |
# File 'eks/fargate_cluster.rb', line 639 def connect_auto_scaling_group_capacity(auto_scaling_group, ) Jsii::Type.check_type(auto_scaling_group, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYXV0b3NjYWxpbmcuQXV0b1NjYWxpbmdHcm91cCJ9")), "autoScalingGroup") = .is_a?(Hash) ? ::AWSCDK::EKS::AutoScalingGroupOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkF1dG9TY2FsaW5nR3JvdXBPcHRpb25zIn0=")), "options") jsii_call_method("connectAutoScalingGroupCapacity", [auto_scaling_group, ]) end |
#connections ⇒ AWSCDK::EC2::Connections
Manages connection rules (Security Group Rules) for the cluster.
235 236 237 |
# File 'eks/fargate_cluster.rb', line 235 def connections() jsii_get_property("connections") end |
#default_capacity ⇒ AWSCDK::Autoscaling::AutoScalingGroup?
The auto scaling group that hosts the default capacity for this cluster.
This will be undefined if the default_capacity_type is not EC2 or
default_capacity_type is EC2 but default capacity is set to 0.
315 316 317 |
# File 'eks/fargate_cluster.rb', line 315 def default_capacity() jsii_get_property("defaultCapacity") end |
#default_nodegroup ⇒ AWSCDK::EKS::Nodegroup?
The node group that hosts the default capacity for this cluster.
This will be undefined if the default_capacity_type is EC2 or
default_capacity_type is NODEGROUP but default capacity is set to 0.
325 326 327 |
# File 'eks/fargate_cluster.rb', line 325 def default_nodegroup() jsii_get_property("defaultNodegroup") end |
#default_profile ⇒ AWSCDK::EKS::FargateProfile
Fargate Profile that was created with the cluster.
421 422 423 |
# File 'eks/fargate_cluster.rb', line 421 def default_profile() jsii_get_property("defaultProfile") end |
#eks_pod_identity_agent ⇒ AWSCDK::EKS::IAddon?
Retrieves the EKS Pod Identity Agent addon for the EKS cluster.
The EKS Pod Identity Agent is responsible for managing the temporary credentials used by pods in the cluster to access AWS resources. It runs as a DaemonSet on each node and provides the necessary credentials to the pods based on their associated service account.
337 338 339 |
# File 'eks/fargate_cluster.rb', line 337 def eks_pod_identity_agent() jsii_get_property("eksPodIdentityAgent") end |
#env ⇒ AWSCDK::Interfaces::ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed in a Stack (those created by
creating new class instances like new Role(), new Bucket(), etc.), this
is always the same as the environment of the stack they belong to.
For referenced resources (those obtained from referencing methods like
Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be
different than the stack they were imported into.
102 103 104 |
# File 'eks/fargate_cluster.rb', line 102 def env() jsii_get_property("env") end |
#generate_physical_name ⇒ String
481 482 483 |
# File 'eks/fargate_cluster.rb', line 481 def generate_physical_name() jsii_call_method("generatePhysicalName", []) end |
#get_ingress_load_balancer_address(ingress_name, options = nil) ⇒ String
Fetch the load balancer address of an ingress backed by a load balancer.
651 652 653 654 655 656 |
# File 'eks/fargate_cluster.rb', line 651 def get_ingress_load_balancer_address(ingress_name, = nil) Jsii::Type.check_type(ingress_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "ingressName") = .is_a?(Hash) ? ::AWSCDK::EKS::IngressLoadBalancerAddressOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkluZ3Jlc3NMb2FkQmFsYW5jZXJBZGRyZXNzT3B0aW9ucyJ9")), "options") unless .nil? jsii_call_method("getIngressLoadBalancerAddress", [ingress_name, ]) end |
#get_resource_arn_attribute(arn_attr, arn_components) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "ARN" attribute (e.g. bucket.bucketArn).
Normally, this token will resolve to arn_attr, but if the resource is
referenced across environments, arn_components will be used to synthesize
a concrete ARN with the resource's physical name. Make sure to reference
this.physicalName in arn_components.
495 496 497 498 499 500 |
# File 'eks/fargate_cluster.rb', line 495 def get_resource_arn_attribute(arn_attr, arn_components) Jsii::Type.check_type(arn_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "arnAttr") arn_components = arn_components.is_a?(Hash) ? ::AWSCDK::ARNComponents.new(**arn_components.transform_keys(&:to_sym)) : arn_components Jsii::Type.check_type(arn_components, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5Bcm5Db21wb25lbnRzIn0=")), "arnComponents") jsii_call_method("getResourceArnAttribute", [arn_attr, arn_components]) end |
#get_resource_name_attribute(name_attr) ⇒ String
Returns an environment-sensitive token that should be used for the resource's "name" attribute (e.g. bucket.bucketName).
Normally, this token will resolve to name_attr, but if the resource is
referenced across environments, it will be resolved to this.physicalName,
which will be a concrete name.
510 511 512 513 |
# File 'eks/fargate_cluster.rb', line 510 def get_resource_name_attribute(name_attr) Jsii::Type.check_type(name_attr, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "nameAttr") jsii_call_method("getResourceNameAttribute", [name_attr]) end |
#get_service_load_balancer_address(service_name, options = nil) ⇒ String
Fetch the load balancer address of a service of type 'LoadBalancer'.
663 664 665 666 667 668 |
# File 'eks/fargate_cluster.rb', line 663 def get_service_load_balancer_address(service_name, = nil) Jsii::Type.check_type(service_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "serviceName") = .is_a?(Hash) ? ::AWSCDK::EKS::ServiceLoadBalancerAddressOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLlNlcnZpY2VMb2FkQmFsYW5jZXJBZGRyZXNzT3B0aW9ucyJ9")), "options") unless .nil? jsii_call_method("getServiceLoadBalancerAddress", [service_name, ]) end |
#grant_access(id, principal, access_policies, options = nil) ⇒ void
This method returns an undefined value.
Grants the specified IAM principal access to the EKS cluster based on the provided access policies.
This method creates an AccessEntry construct that grants the specified IAM principal the access permissions
defined by the provided IAccessPolicy array. This allows the IAM principal to perform the actions permitted
by the access policies within the EKS cluster.
681 682 683 684 685 686 687 688 |
# File 'eks/fargate_cluster.rb', line 681 def grant_access(id, principal, access_policies, = nil) Jsii::Type.check_type(id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "id") Jsii::Type.check_type(principal, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "principal") Jsii::Type.check_type(access_policies, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19la3MuSUFjY2Vzc1BvbGljeSJ9LCJraW5kIjoiYXJyYXkifX0=")), "accessPolicies") = .is_a?(Hash) ? ::AWSCDK::EKS::GrantAccessOptions.new(**.transform_keys(&:to_sym)) : Jsii::Type.check_type(, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfZWtzLkdyYW50QWNjZXNzT3B0aW9ucyJ9")), "options") unless .nil? jsii_call_method("grantAccess", [id, principal, access_policies, ]) end |
#ip_family ⇒ AWSCDK::EKS::IPFamily?
Default: - IpFamily.IP_V4
Specify which IP family is used to assign Kubernetes pod and service IP addresses.
346 347 348 |
# File 'eks/fargate_cluster.rb', line 346 def ip_family() jsii_get_property("ipFamily") end |
#kubectl_environment ⇒ Hash{String => String}?
Custom environment variables when running kubectl against this cluster.
353 354 355 |
# File 'eks/fargate_cluster.rb', line 353 def kubectl_environment() jsii_get_property("kubectlEnvironment") end |
#kubectl_lambda_role ⇒ AWSCDK::IAM::IRole?
Default: - if not specified, the default role created by a lambda function will be used.
An IAM role that can perform kubectl operations against this cluster.
The role should be mapped to the system:masters Kubernetes RBAC role.
This role is directly passed to the lambda handler that sends Kube Ctl commands to the cluster.
365 366 367 |
# File 'eks/fargate_cluster.rb', line 365 def kubectl_lambda_role() jsii_get_property("kubectlLambdaRole") end |
#kubectl_layer ⇒ AWSCDK::Lambda::ILayerVersion?
An AWS Lambda layer that includes kubectl and helm.
372 373 374 |
# File 'eks/fargate_cluster.rb', line 372 def kubectl_layer() jsii_get_property("kubectlLayer") end |
#kubectl_memory ⇒ AWSCDK::Size?
The amount of memory allocated to the kubectl provider's lambda function.
379 380 381 |
# File 'eks/fargate_cluster.rb', line 379 def kubectl_memory() jsii_get_property("kubectlMemory") end |
#kubectl_private_subnets ⇒ Array<AWSCDK::EC2::ISubnet>?
Default: - If not specified, the k8s endpoint is expected to be accessible publicly.
Subnets to host the kubectl compute resources.
387 388 389 |
# File 'eks/fargate_cluster.rb', line 387 def kubectl_private_subnets() jsii_get_property("kubectlPrivateSubnets") end |
#kubectl_role ⇒ AWSCDK::IAM::IRole?
An IAM role that can perform kubectl operations against this cluster.
The role should be mapped to the system:masters Kubernetes RBAC role.
396 397 398 |
# File 'eks/fargate_cluster.rb', line 396 def kubectl_role() jsii_get_property("kubectlRole") end |
#kubectl_security_group ⇒ AWSCDK::EC2::ISecurityGroup?
Default: - If not specified, the k8s endpoint is expected to be accessible publicly.
A security group to use for kubectl execution.
404 405 406 |
# File 'eks/fargate_cluster.rb', line 404 def kubectl_security_group() jsii_get_property("kubectlSecurityGroup") end |
#node ⇒ Constructs::Node
The tree node.
87 88 89 |
# File 'eks/fargate_cluster.rb', line 87 def node() jsii_get_property("node") end |
#on_event_layer ⇒ AWSCDK::Lambda::ILayerVersion?
The AWS Lambda layer that contains the NPM dependency proxy-agent.
If undefined, a SAR app that contains this layer will be used.
414 415 416 |
# File 'eks/fargate_cluster.rb', line 414 def on_event_layer() jsii_get_property("onEventLayer") end |
#open_id_connect_provider ⇒ AWSCDK::IAM::IOpenIdConnectProvider
An OpenIdConnectProvider resource associated with this cluster, and which can be used to link this cluster to AWS IAM.
A provider will only be defined if this property is accessed (lazy initialization).
244 245 246 |
# File 'eks/fargate_cluster.rb', line 244 def open_id_connect_provider() jsii_get_property("openIdConnectProvider") end |
#physical_name ⇒ String
Returns a string-encoded token that resolves to the physical name that should be passed to the CloudFormation resource.
This value will resolve to one of the following:
- a concrete value (e.g.
"my-awesome-bucket") undefined, when a name should be generated by CloudFormation- a concrete name generated automatically during synthesis, in cross-environment scenarios.
116 117 118 |
# File 'eks/fargate_cluster.rb', line 116 def physical_name() jsii_get_property("physicalName") end |
#prune ⇒ Boolean
Determines if Kubernetes resources can be pruned automatically.
251 252 253 |
# File 'eks/fargate_cluster.rb', line 251 def prune() jsii_get_property("prune") end |
#role ⇒ AWSCDK::IAM::IRole
IAM role assumed by the EKS Control Plane.
258 259 260 |
# File 'eks/fargate_cluster.rb', line 258 def role() jsii_get_property("role") end |
#stack ⇒ AWSCDK::Stack
The stack in which this resource is defined.
123 124 125 |
# File 'eks/fargate_cluster.rb', line 123 def stack() jsii_get_property("stack") end |
#to_string ⇒ String
Returns a string representation of this construct.
428 429 430 |
# File 'eks/fargate_cluster.rb', line 428 def to_string() jsii_call_method("toString", []) end |
#vpc ⇒ AWSCDK::EC2::IVPC
The VPC in which this Cluster was created.
265 266 267 |
# File 'eks/fargate_cluster.rb', line 265 def vpc() jsii_get_property("vpc") end |
#with(*mixins) ⇒ Constructs::IConstruct
Applies one or more mixins to this construct.
Mixins are applied in order. The list of constructs is captured at the
start of the call, so constructs added by a mixin will not be visited.
Use multiple with() calls if subsequent mixins should apply to added
constructs.
441 442 443 444 445 446 |
# File 'eks/fargate_cluster.rb', line 441 def with(*mixins) mixins.each_with_index do |item, index| Jsii::Type.check_type(item, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJjb25zdHJ1Y3RzLklNaXhpbiJ9")), "mixins[#{index}]") end jsii_call_method("with", [*mixins]) end |