question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[aws-eks] eks.Cluster.fromAttributes: Allow adding k8s resources on imported clusters

See original GitHub issue

Currently I have an existing EKS cluster, is that possible to call addResource from another pipeline or someplace?

Use Case

I tried to use fromClusterAttributes, but it only returns a ImportedCluster which does not have any static method.

It will be good to have:

const cluster = new eks.Cluster.fromClusterAttributes(this, 'eks-cluster', {...});
cluster.addResource('ingress', {...});
cluster.addResource('service', {...});

Other

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

This is a 🚀 Feature Request

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:12
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
adrialucena-seatcommented, May 18, 2020

In my case we have multiple repositories and each of them creates different part of infrastructure using CDK. Some repo needs to create an eks fargate profile o apply some manifest through addResource method to a same cluster. Is there any workarround for this since we can’t import the cluster for every repo and use this kind of methods? (creating a cluster for every repo would be over dimensioned). It would be a great feature.

3reactions
adrialucena-seatcommented, Aug 11, 2020

Another problem we have find out related to this issue is that using addResource method from different stacks in the same app (passing the cluster as argument to the stack that calls addResource) the cloudformation resource is actually created on the stack where the EKS Cluster was created instead of the stack where the addResource was called. This wouldn’t be a problem itself if Cloudfromation didn’t have the 200 resource limit per stack. We have reached this limit because all the stacks are almost empty and all k8s resources are created on the stack where the cluster was created. We don’t know how to solve this problem unless every stack could import the cluster and call addResource and create the cloudformation resource separately.

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/aws-eks module - AWS Documentation
This construct library allows you to define Amazon Elastic Container Service for Kubernetes (EKS) clusters. In addition, the library also supports defining ...
Read more >
Import an AWS EKS Cluster - KubeSphere
This tutorial demonstrates how to import an AWS EKS cluster through the direct connection method. If you want to use the agent connection...
Read more >
Create EKS cluster - AWS Workshop Studio
Define an EKS cluster by instantiating the imported package. Please copy and paste the code in the following code block right after the...
Read more >
Connect EKS clusters through cluster certificates ...
Through GitLab, you can create new clusters and add existing clusters hosted on Amazon Elastic Kubernetes Service (EKS).
Read more >
aws_eks_cluster | Resources | hashicorp/aws
resource "aws_iam_role" "example" { name = "eks-cluster-example" ... Only available on Kubernetes version 1.13 and 1.14 clusters created or upgraded on or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found