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?

preguntada hace 2 años285 visualizaciones
1 Respuesta
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
INGENIERO DE SOPORTE
respondido hace 2 años

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas