Unable to create EKS Cluster using ansible uri

0

I need to create a eks cluster using ansible but ansible community.aws.aws_eks_cluster dosen't have kubernetesNetworkConfig parameter where we can specify serviceIpv4Cidr while creating cluster. So i used the below to create but it failed with Unable to determine service/operation name to be authorized AccessDeniedException,

  • name: Call aws API to create EKS cluster uri: url: "https://eks.us-east-1.amazonaws.com/clusters" method: PUT validate_certs: yes status_code: - 200 body: "{{ hc_body | to_json | string }}" return_content: yes headers: Authorization: Bearer "{{a}}" X-Amz-Security-Token: "{{ security_token1 }}" Content-Type: "application/json" Accept: "application/json" vars: aws_access_key: "{{ aws_access_key1 }}" aws_secret_key: "{{ aws_secret_key1 }}" a: "{{ ( aws_access_key1 + ':' + aws_secret_key1 ) | b64decode }}" hc_body: clientRequestToken: "{{ security_token1 }}" kubernetesNetworkConfig: ipFamily: ipv4 serviceIpv4Cidr: "x.x.x.x/24" name: my_cluster resourcesVpcConfig: endpointPrivateAccess: true securityGroupIds: "{{group_id}}" subnetIds: "{{subnets_list}}" roleArn: "{{ arn_val2 }}"

is there any way to pass kubernetesNetworkConfig after/during cluster creation (rest api) or resolve the above issue?

1개 답변
0

Hello,

I see that you've created another question for the same issue. I have provided an explanation about how to pass authentication while making AWS API requests. Please refer https://repost.aws/questions/QUIsKecmSURSC5m-Dzg3vDvg#ANKSE-L-sGQzWlgrfp598vPA

Thank you!

profile pictureAWS
지원 엔지니어
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠