(aws-eks): Apply folder k8s resources to existing cluster
It would be neat if we could add a folder filled with k8s resources to eks cluster.
kubectl apply -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller//crds?ref=master"
Use Case
I'm trying to add an ALB ingress controller to the EKS cluster. But right now cannot do that through CDK. I need to add custom resource definitions present online. Source: AWS_EKS_INGRESS_GUIDE
kubectl apply -k "github.com/aws/eks-charts/stable/aws-load-balancer-controller//crds?ref=master"
Proposed Solution
I'm not sure how to proceed with this. Adding constructor props to select folder mode to KubernetesManifest class and similarly adding a prop to addManifest() function of @aws-cdk/aws-eks.Cluster class
This is a :rocket: Feature Request
@shrivastavshubham34 Just to make sure I understand, you are looking to apply a remote directory located in a GitHub repo correct? Not a local one that is present on your machine.
Either way is fine.
Hi, do we have an ETA? If not I can switch to EKSCTL for the time being
@shrivastavshubham34 This is not currently planned so I cannot provide an ETA. Would you be interested in submitting a PR?
KubernetesManifests are executed via a CustomResource defined here.
That uses kubectl-handler and more specifically kubectl apply.
It seems it always expects a json manifest_text, which it then writes to a file and uses kubectl -f file to execute.
That means kubectl -k commands are not currently supported so we cannot install CRDs like instructed in some AWS docs e.g.
https://github.com/aws/eks-charts/tree/master/stable/aws-load-balancer-controller
https://github.com/aws/eks-charts/tree/master/stable/appmesh-controller
Surprised its not implemented in kubectl-handler by default, whats the constraint?
I believe it's still possible to be implemented with kubectl-handler.