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?

已提问 2 年前266 查看次数
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 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则