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 Antwort
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
SUPPORT-TECHNIKER
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen