---
title: "How to create a Kubernetes cluster on the cloud"
slug: "how-to-create-a-kubernetes-cluster-on-the-cloud"
updated: 2025-12-23T15:04:57Z
published: 2025-12-23T15:04:57Z
canonical: "docs.swxtch.io/how-to-create-a-kubernetes-cluster-on-the-cloud"
stale: true
---

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to create a Kubernetes cluster on the cloud

**WHAT TO EXPECT**

**In this article**, users will learn how to create a simple Kubernetes cluster on each cloud provider. This is the first step needed to create a working environment where the agents can be Kubernetes pods.

## Microsoft Azure (AKS)

In Azure, the fastest way to create a cluster is by using Cloud Shell. These lines can be used to create a simple Kubernetes cluster (users should change the <xxx-name>, the node size and count accordingly):

```shell
export NAME="<project-name>"
export AZURE_RESOURCE_GROUP="${NAME}-rgroup"
az group create --name "${AZURE_RESOURCE_GROUP}"  -l centralus
az network vnet create --name <vnet-name> --resource-group "${AZURE_RESOURCE_GROUP}" --address-prefixes 10.128.0.0/12 --subnet-name <subnet-name> --subnet-prefixes 10.128.0.0/16
export SUBNET_ID="$(az network vnet subnet show -g ${AZURE_RESOURCE_GROUP} -n <subnet-name> --vnet-name <vnet-name> --query id --output tsv)"
az aks create --generate-ssh-keys --resource-group "${AZURE_RESOURCE_GROUP}" --network-plugin none --name "${NAME}" --vnet-subnet-id "${SUBNET_ID}" --node-vm-size Standard_Ds2_v2 --node-count 2
az aks get-credentials --resource-group "${AZURE_RESOURCE_GROUP}" --name "${NAME}"
```

This will create a resource group, and, inside, a VNet, and the Kubernetes cluster. All the names will have the NAME as part of the resource name.

## Amazon AWS (EKS)

In AWS, users can create a Kubernetes cluster using Cloud Shell with a couple of commands. As a requirement, the users have to first download the EKSCTL utility. To that extent, use:

```shell
echo "curl -sLO https://github.com/eksctl-io/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz
tar -xzf eksctl_$(uname -s)_amd64.tar.gz -C /tmp
rm eksctl_$(uname -s)_amd64.tar.gz
sudo mv /tmp/eksctl /usr/local/bin" > eksctl_simple.sh
chmod +x eksctl_simple.sh
./eksctl_simple.sh
```

Then, to create the cluster, use the following lines, changing the <xxx-name> accordingly, setting the desiredCapacity to the desired number of nodes, and changing the publicKeyPath to the correct one:

```shell
cat <<EOF >eks-config.yaml
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
  name: <cluster-name>
  region: <region-name>
managedNodeGroups:
- name: <nodegroup-name>
  desiredCapacity: 2
  privateNetworking: true
  ssh:
    allow: true
    publicKeyPath: ~/.ssh/id_rsa.pub
EOF
eksctl create cluster -f ./eks-config.yaml
```

## Google GCP (GKE)

In GCP, the command line used in the Cloud Shell to create a Kubernetes cluster will vary depending on the CNI that will be used.

### Traditional CNI (GKE default)

The command used when using the Traditional CNI is the following (remember to change the <xxx-name> accordingly, and the number of nodes):

```shell
gcloud container clusters create <cluster-name> --zone <zone-name> --num-nodes 2
```

### Cilium CNI

When using the Cilium CNI, the cluster is created using the `tainted` argument, and later the user should install Cilium:

```shell
gcloud container clusters create <cluster-name> --zone <zone-name> --num-nodes 2 --node-taints node.cilium.io/agent-not-ready=true:NoExecute
```

### Oracle OCI (OKE)

Users can create a Kubernetes cluster in OKE using the OCI console.

Click on the menu button (top left):

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-1.png)

Click the Developer Services:

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-2.png)

Click on Kubernetes Clusters (OKE):

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-3.png)

Click on the Create cluster button:

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-4.png)

Leave the Quick create selected and click on Proceed:

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-5.png)

Then:

- Type a name
- Choose a Compartment
- Choose a version
- Select the Public endpoint in the Kubernetes API endpoint
- Select Managed in the Node Type
- Select Private workers in the Kubernetes worker nodes

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-6.png)

Choose the desired shape (for example, VM.Standard.E3.Flex, 4 OCPUs, 16GB RAM, Image: Oracle Linux 7.9 and select tne desired Node count:

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-7.png)

Click on the Advanced options button and in the Add an SSH key choose your method, for example, Paste a public key and paste it in the box below:

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-8.png)

Then click on Next:

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-9.png)

Finally, click on the Create cluster button:

![](https://cdn.document360.io/84c5db44-f675-4f33-a980-5d3fc63073ca/Images/Documentation/OKE-Clusters-10.png)
