eksctl-io / eksctl

The official CLI for Amazon EKS
https://eksctl.io
Other
4.9k stars 1.41k forks source link

[Help] eksctl CRD's installation #7995

Open raghu-manne opened 2 days ago

raghu-manne commented 2 days ago

What help do you need?

I am trying to setup ALB LoadBalancer Controlller using this , while doing this setup I am facing issue which is already raised here #7987.

Workaround mentioned in #7987 has a config file used with eksctl to create service account, I tried to create the ClusterConfig with both the policies but the eksctl CRD's are missing. How do I install the eksctl CRD's?

eksctl command executed: eksctl create iamserviceaccount --cluster=cluster_name --namespace=kube-system --name=aws-load-balancer-controller --attach-policy-arn=arn:aws:iam:${AWS_ACCOUNT_ID}:policy/AWSLoadBalancerControllerIAMPolicy --override-existing-serviceaccounts --region us-east-1 --approve

ClusterConfig File:

apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: cluster_name
  region: us-east-1
iam:
  withOIDC: true
  serviceAccounts:
  - metadata:
      name: aws-load-balancer-controller
      namespace: kube-system
    attachPolicyARNs:
    - arn:aws:iam:${AWS_ACCOUNT_ID}:policy/AWSLoadBalancerControllerIAMPolicy
    attachPolicy: |
      Version: "2012-10-17"
      Statement:
        - Effect: Allow
           Action:
             - elasticloadbalancing:DescribeListenerAttribute
             - elasticloadbalancing:ModifyListenerAttribute
           Resource: "*"
    wellKnownPolicies:
      awsLoadBalancerController: true

Error while applying the file:

$ k apply -f alb-lbc-irsa-eksctl.yml
error: resource mapping not found for name: "test-2" namespace: "" from "alb-lbc-irsa-eksctl.yml": no matches for kind "ClusterConfig" in version "eksctl.io/v1alpha5"ensure CRDs are installed first

Help needed in installing eksctl CRD's, TIA!

github-actions[bot] commented 2 days ago

Hello raghu-manne :wave: Thank you for opening an issue in eksctl project. The team will review the issue and aim to respond within 1-5 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

jonathanfoster commented 2 days ago

@raghu-manne You need to use eksctl to apply the cluster config, not kubectl. See the getting started docs for more info.

raghu-manne commented 2 days ago

I didn't created my cluster with eksctl. So, now I can't create new serviceaccounts with ClusterConfig or any other CRD using eksctl?

jonathanfoster commented 1 day ago

@raghu-manne Check out the IAM Roles for Service Accounts docs.