OpenMCF logoOpenMCF

Loading...

AWS EKS Cluster

Deploys an AWS EKS cluster control plane with configurable public/private API endpoint access, optional envelope encryption of Kubernetes secrets via KMS, and optional control plane logging to CloudWatch. The component requires at least two subnets in distinct Availability Zones for high availability.

What Gets Created

When you deploy an AwsEksCluster resource, OpenMCF provisions:

  • EKS Cluster — an aws:eks:Cluster control plane placed in the specified subnets, using the provided IAM role for AWS API interactions, with configurable public and private endpoint access
  • Control Plane Log Streams — created only when enableControlPlaneLogs is true; enables all five log types (API server, audit, authenticator, controller manager, scheduler) to CloudWatch Logs
  • Secrets Encryption Configuration — configured only when kmsKeyArn is provided; enables envelope encryption of Kubernetes secrets using the specified customer-managed KMS key

Prerequisites

  • AWS credentials configured via environment variables or OpenMCF provider config
  • At least two subnets in different Availability Zones within the target VPC (private subnets recommended)
  • An IAM role with the AmazonEKSClusterPolicy attached, for the EKS service to manage cluster resources
  • A KMS key ARN if enabling envelope encryption of Kubernetes secrets

Quick Start

Create a file eks-cluster.yaml:

apiVersion: aws.openmcf.org/v1
kind: AwsEksCluster
metadata:
  name: my-cluster
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.AwsEksCluster.my-cluster
spec:
  region: us-west-2
  subnetIds:
    - subnet-0a1b2c3d4e5f00001
    - subnet-0a1b2c3d4e5f00002
  clusterRoleArn: arn:aws:iam::123456789012:role/EksClusterServiceRole

Deploy:

openmcf apply -f eks-cluster.yaml

This creates an EKS cluster with a public API endpoint across two subnets, using the default Kubernetes version.

Configuration Reference

Required Fields

FieldTypeDescriptionValidation
regionstringAWS region where the EKS cluster will be created (e.g., us-west-2, eu-west-1).Required; non-empty
subnetIdsstring[]Subnet IDs in the cluster's VPC where the EKS control plane attaches network interfaces. Use at least two subnets in distinct Availability Zones.Minimum 2 items required
subnetIds[].valuestringDirect subnet ID value—
subnetIds[].valueFromobjectForeign key reference to an AwsVpc resourceDefault kind: AwsVpc, field: status.outputs.private_subnets.[*].id
clusterRoleArnstringARN of an IAM role for the EKS cluster to use when interacting with AWS services. Must have AmazonEKSClusterPolicy attached.Required
clusterRoleArn.valuestringDirect IAM role ARN value—
clusterRoleArn.valueFromobjectForeign key reference to an AwsIamRole resourceDefault kind: AwsIamRole, field: status.outputs.role_arn

Optional Fields

FieldTypeDefaultDescription
versionstringLatest supportedKubernetes version for the cluster control plane (e.g., "1.29"). If not set, AWS uses the latest supported version.
disablePublicEndpointboolfalseWhen true, the cluster API endpoint is accessible only within the VPC. When false, the endpoint is publicly accessible.
publicAccessCidrsstring[]["0.0.0.0/0"]IPv4 CIDR blocks allowed to access the cluster's public API endpoint. Each entry must be a valid IPv4 CIDR (e.g., "203.0.113.0/24"). Ignored when disablePublicEndpoint is true.
enableControlPlaneLogsboolfalseEnables all control plane log types (API, audit, authenticator, controller manager, scheduler) to CloudWatch Logs.
kmsKeyArnstring—KMS key ARN for envelope encryption of Kubernetes secrets. If not set, the cluster uses the default AWS-managed EKS key. Can reference an AwsKmsKey resource via valueFrom.

Examples

Private Cluster with Restricted Access

An EKS cluster with the public endpoint disabled, accessible only from within the VPC:

apiVersion: aws.openmcf.org/v1
kind: AwsEksCluster
metadata:
  name: private-cluster
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: dev.AwsEksCluster.private-cluster
spec:
  region: us-west-2
  subnetIds:
    - subnet-private-az1
    - subnet-private-az2
  clusterRoleArn: arn:aws:iam::123456789012:role/EksClusterServiceRole
  version: "1.29"
  disablePublicEndpoint: true

Cluster with Logging and CIDR Restrictions

A cluster with control plane logging enabled and public access restricted to specific CIDR blocks:

apiVersion: aws.openmcf.org/v1
kind: AwsEksCluster
metadata:
  name: monitored-cluster
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: staging.AwsEksCluster.monitored-cluster
spec:
  region: us-west-2
  subnetIds:
    - subnet-private-az1
    - subnet-private-az2
    - subnet-private-az3
  clusterRoleArn: arn:aws:iam::123456789012:role/EksClusterServiceRole
  version: "1.29"
  publicAccessCidrs:
    - 203.0.113.0/24
    - 198.51.100.0/24
  enableControlPlaneLogs: true

Full-Featured Production Cluster

Production configuration with KMS encryption, control plane logging, and private endpoint:

apiVersion: aws.openmcf.org/v1
kind: AwsEksCluster
metadata:
  name: prod-cluster
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.AwsEksCluster.prod-cluster
spec:
  region: us-east-1
  subnetIds:
    - subnet-private-az1
    - subnet-private-az2
    - subnet-private-az3
  clusterRoleArn: arn:aws:iam::123456789012:role/EksClusterServiceRole
  version: "1.29"
  disablePublicEndpoint: true
  enableControlPlaneLogs: true
  kmsKeyArn: arn:aws:kms:us-east-1:123456789012:key/abcd1234-5678-90ab-cdef-example11111

Using Foreign Key References

Reference other OpenMCF-managed resources instead of hardcoding ARNs and IDs:

apiVersion: aws.openmcf.org/v1
kind: AwsEksCluster
metadata:
  name: ref-cluster
  labels:
    openmcf.org/provisioner: pulumi
    pulumi.openmcf.org/organization: my-org
    pulumi.openmcf.org/project: my-project
    pulumi.openmcf.org/stack.name: prod.AwsEksCluster.ref-cluster
spec:
  region: us-west-2
  subnetIds:
    - valueFrom:
        kind: AwsVpc
        name: my-vpc
        field: status.outputs.private_subnets.[0].id
    - valueFrom:
        kind: AwsVpc
        name: my-vpc
        field: status.outputs.private_subnets.[1].id
  clusterRoleArn:
    valueFrom:
      kind: AwsIamRole
      name: eks-cluster-role
      field: status.outputs.role_arn
  version: "1.29"
  enableControlPlaneLogs: true
  kmsKeyArn:
    valueFrom:
      kind: AwsKmsKey
      name: eks-secrets-key
      field: status.outputs.key_arn

Stack Outputs

After deployment, the following outputs are available in status.outputs:

OutputTypeDescription
endpointstringURL of the Kubernetes API server for the EKS cluster
cluster_ca_certificatestringBase64-encoded certificate authority data for the cluster
cluster_security_group_idstringID of the security group created by EKS for the cluster control plane
oidc_issuer_urlstringURL of the OpenID Connect issuer for the cluster, used for IAM Roles for Service Accounts (IRSA)
cluster_arnstringAmazon Resource Name of the EKS cluster
namestringName assigned to the EKS cluster

Related Components

  • AwsVpc — provides the subnets for cluster control plane placement
  • AwsIamRole — provides the IAM role for the EKS cluster service
  • AwsKmsKey — provides the customer-managed key for secrets encryption

Next article

AWS EKS Node Group

AWS EKS Node Group Deploys an AWS EKS managed node group into an existing EKS cluster, provisioning EC2 worker nodes with configurable instance types, auto-scaling, and optional SSH access. What Gets Created When you deploy an AwsEksNodeGroup resource, OpenMCF provisions: EKS Managed Node Group — an awseksnodegroup resource attached to the specified EKS cluster, running EC2 instances in the provided subnets with the configured scaling parameters, instance type, capacity type, and disk size Auto...
Read next article
Presets
2 ready-to-deploy configurationsView presets →