Skip to content

Commit

Permalink
Fix sample shell commands (#5220) (#5224)
Browse files Browse the repository at this point in the history
* Fix sample shell commands

* ci: auto-formatting prettier issues

* Fix more shell errors

* docs: table format for provider values

---------

Co-authored-by: kreeuwijk <[email protected]>
Co-authored-by: Ben Radstone <[email protected]>
Co-authored-by: Ben Radstone <[email protected]>
(cherry picked from commit bf2327d)

Co-authored-by: Kevin Reeuwijk <[email protected]>
  • Loading branch information
1 parent 2a884dc commit 45e042e
Showing 1 changed file with 25 additions and 8 deletions.
33 changes: 25 additions & 8 deletions docs/api-content/api-docs/2-samples.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,30 @@ want to deploy the cluster, such as public cloud or on-prem.

**Endpoint**: `https://api.spectrocloud.com/v1/spectroclusters/{provider}`

Set the provider as an environment variable.
The following table outlines all available provider options.

| **Provider** | **Value** |
| ---------------------------------------------- | ------------- |
| **Azure IaaS** | `azure` |
| **Azure AKS** | `aks` |
| **AWS IaaS** | `aws` |
| **AWS EKS** | `eks` |
| **GCP IaaS** | `gcp` |
| **GCP GKE** | `gke` |
| **TKE** (Tencent) | `tke` |
| **MAAS** (Canonical) | `maas` |
| **VMware vSphere** | `vsphere` |
| **Openstack** | `openstack` |
| **Edge Native** | `edge-native` |
| [**Virtual**](/devx/palette-virtual-clusters/) | `virtual` |

Set the provider as an environment variable. For example, issue the following command to set Azure IaaS as the provider.

```shell
export PROVIDER="Your Provider"
export PROVIDER="azure"
```

<br />
Example payload.

```shell
export PAYLOAD='{
Expand All @@ -93,10 +110,10 @@ export PAYLOAD='{
<TabItem label="curl" value="cluster-create-curl">

```shell
curl --location 'https://api.spectrocloud.com/v1/spectroclusters/$PROVIDER?projectUid=$PROJECT_ID"' \
curl --location "https://api.spectrocloud.com/v1/spectroclusters/$PROVIDER?projectUid=$PROJECT_ID" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header "apiKey: $API_KEY"
--header "apiKey: $API_KEY" \
--data "$PAYLOAD"
```

Expand Down Expand Up @@ -1647,10 +1664,10 @@ export CLUSTER_ID="Your Cluster ID"
<TabItem label="cURL" value="cluster-kubeconfig-curl">

```shell
curl --location 'https://api.spectrocloud.com/v1/spectroclusters/$CLUSTER_ID/assets/kubeconfig' \
curl --location "https://api.spectrocloud.com/v1/spectroclusters/$CLUSTER_ID/assets/kubeconfig" \
--header 'Accept: application/octet-stream' \
--header 'projectUid: $PROJECT_ID' \
--header 'apiKey: $API_KEY'
--header "projectUid: $PROJECT_ID" \
--header "apiKey: $API_KEY"
```

</TabItem>
Expand Down

0 comments on commit 45e042e

Please sign in to comment.