Below you will find examples of creating a small 3 node Kubernetes cluster to try NATS on multiple clouds.
Google Kubernetes Engine
Use gcloud to create a 3 node regional Kubernetes cluster on us-west2.
# Create a 3 node Kubernetes cluster. One node in each of the region's three zones.gcloudcontainerclusterscreatenats-k8s-cluster \--project $YOUR_GOOGLE_CLOUD_PROJECT \--regionus-west2 \--num-nodes1 \--machine-typen1-standard-2
Note that since this is a regional cluster we are specifying --num-nodes 1 which will create a kubelet on 3 different zones. If you are creating a single-zone cluster but want 3 nodes then you have to specify --num-nodes 3.
Amazon Kubernetes Service
The eksctl is a very helpful tool to manage EKS clusters, you can find more docs on how to set it up here.
# Create 3 node Kubernetes clustereksctlcreatecluster--namenats-k8s-cluster \--nodes3 \--node-type=t3.large \--region=eu-west-1# Get the credentials for your clustereksctlutilswrite-kubeconfig--name $YOUR_EKS_NAME --regioneu-west-1
# In case not done already, register to use some services:azloginazproviderregister-nMicrosoft.Networkazproviderregister-nMicrosoft.Storageazproviderregister-nMicrosoft.Computeazproviderregister-nMicrosoft.ContainerService# Create resource group and 3 node clusterazgroupcreate--namenats--locationwestusazakscreate \--resource-groupnats \--namenats \--node-count3 \--node-vm-sizeStandard_DS2_v2 \--load-balancer-skubasic \--enable-node-public-ipazaksget-credentials--resource-groupnats--namenats
Eventually your cluster will be provided ExternalIPs that the NATS cluster can advertise to clients: