# Create EKS, AKS and GKE by using API

**URL:** <https://forums.suse.com/t/create-eks-aks-and-gke-by-using-api/36987>\
**Category:** SUSE Rancher Prime\
**Created:** [February 15, 2022, 9:08am UTC](https://forums.suse.com/t/create-eks-aks-and-gke-by-using-api/36987 "2022-02-15T09:08:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![maradwan](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/maradwan/32/8620_2.png) [@maradwan](https://forums.suse.com/u/maradwan)\
**Post date:** [February 15, 2022, 9:08am UTC](https://forums.suse.com/t/create-eks-aks-and-gke-by-using-api/36987/1 "2022-02-15T09:08:33Z")

</div>

I want to create EKS, GKE, AKS by using API, like this for RKE

```auto
curl -k -s 'https://XXXX.com/v3/cluster' -H 'content-type: application/json' -H "Authorization: Bearer $TOKEN" --data-binary '{"type":"cluster","nodes":[],"rancherKubernetesEngineConfig":{"ignoreDockerVersion":true},"name":"yournewcluster"}' --insecure

```

I used Terraform and works fine but I would like to use API like RKE

---

<div class="post-metadata">

**Author:** ![maradwan](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/maradwan/32/8620_2.png) [@maradwan](https://forums.suse.com/u/maradwan)\
**Post date:** [February 17, 2022, 11:44am UTC](https://forums.suse.com/t/create-eks-aks-and-gke-by-using-api/36987/3 "2022-02-17T11:44:45Z")

</div>

The Solution:

````auto
curl -k -s 'https://XXXX.com/v3/cluster' -H 'content-type: application/json' -H "Authorization: Bearer $TOKEN" --data-binary '{"dockerRootDir":"/var/lib/docker","enableClusterAlerting":false,"enableClusterMonitoring":false,"enableNetworkPolicy":false,"windowsPreferedCluster":false,"type":"cluster","name":"alpha","eksConfig":{"imported":false,"amazonCredentialSecret":"cattle-global-data:cc-rc65p","displayName":"alpha","kmsKey":"","kubernetesVersion":"1.21","loggingTypes":[],"nodeGroups":[{"desiredSize":2,"diskSize":20,"ec2SshKey":"","gpu":false,"imageId":"","instanceType":"t3.medium","labels":{},"maxSize":2,"minSize":2,"nodegroupName":"alpha","requestSpotInstances":false,"resourceTags":{},"spotInstanceTypes":[],"subnets":[],"tags":{},"type":"nodeGroup","userData":"","launchTemplate":null,"version":"1.21"}],"privateAccess":false,"publicAccess":true,"publicAccessSources":[],"region":"eu-central-1","secretsEncryption":false,"securityGroups":[],"serviceRole":"","subnets":[],"tags":{},"type":"eksclusterconfigspec"},"labels":{}}'```
````
