[aws-eks] reference a value returned through "kubectl get"
See original GitHub issueProvide a capability to reference values returned through kubectl get
, then the value could be used by other parts of application later.
Example:
const hostname = new KubernetesGet(this, 'HostName', {
kind: 'ingress',
query: '$.items[0].status.loadBalancer.ingress.[0].hostname',
wait: true // retry until the value becomes available
});
// then you can just reference the value like this:
hostname.valueAsString
Use Case
When orchestrating an application, the EKS cluster and resources created by k8s resource/helm chart are parts of the entire application.
For example, we deploy a helm chart with internal NLB/ALB ingress controller of a service. And the service exposed by EKS just is part of entire application(other services are be provided by ECS or EC2 auto scaling group).
We need the resource arn created by NLB/ALB ingress controller for entire application orchestration.
Proposed Solution
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:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
describe-cluster — AWS CLI 1.27.37 Command Reference
Returns descriptive information about an Amazon EKS cluster. The API server endpoint and certificate authority data returned by this operation are required ...
Read more >Creating or updating a kubeconfig file for an Amazon EKS ...
In this topic, you create a kubeconfig file for your cluster (or update an existing one). The kubectl command-line tool uses configuration information...
Read more >Resolve the Kubernetes object access error in Amazon EKS
I receive the following error in Amazon Elastic Kubernetes ... The output returns the Amazon Resource Name (ARN) of the IAM user or...
Read more >EKS: Get-EKSCluster Cmdlet | AWS Tools for PowerShell
Returns descriptive information about an Amazon EKS cluster. The API server endpoint and certificate authority data returned by this operation are required ...
Read more >aws-cdk/aws-eks module - AWS Documentation
In addition, the library also supports defining Kubernetes resource manifests within EKS clusters. Table Of Contents. Quick Start; API Reference; Architectural ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay, I think I understand the use case. Basically what you are looking for is a way to reference values returned from a
kubectl get
in your CDK app.I think the main problem with this, in k8s, is that most of the apply operations are asynchronous. This means that you would need to “wait” for the resource to stabilize before we can issue the query, but I guess this query operation can also have some sort of retry support.
So perhaps something like this:
It’s exactly what this feature requests. It could be a feature to verify the status of resources deployed via CDK.