With Cloud Code, you can create a Kubernetes cluster with GKE, minikube, AWS, and Azure. Additionally, you can work with a local cluster, if you're using Docker Desktop.
Creating a Kubernetes cluster with GKE
Using the GKE Explorer, you can quickly create a Standard cluster:
- In the header of the Google Kubernetes Engine Explorer panel, click
on the plus icon
(visible only on mouseover) to launch the Create Cluster wizard.
- Then, select your project ID (or use the default one), zone/region, and preferred configuration (cluster name, number of nodes and machine type).
- Click Create Cluster.
Tip: Alternatively, you can also create a Kubernetes cluster using the Command
Palette ( >
Command Palette). Launch the Command Palette and use the command
Cloud Code: Create GKE cluster to open the Create Cluster wizard.
Creating a Kubernetes cluster with minikube
You can use the minikube status bar (located in the status bar, adjacent to the Cloud Code status bar) to start, stop, pause, and view the status of a minikube cluster.
To start a cluster, click on the minikube status bar and choose 'Start'.
To pause or stop a running cluster, click on the minikube status bar and choose your preferred action.
Creating an AWS cluster stack
If you'd like to create an AWS cluster stack, you can do so using the AWS EKS Cluster Explorer. Click on the three dotted 'More actions...' icon and select 'Create new AWS EKS Cluster Stack' to launch the Create Cluster wizard.
Note, you need to have the AWS CLI already installed and configured (by running 'aws configure') in order to create a cluster stack.
Once set up, select your configuration preferences (cluster name, machine type, region, machine count, and SSH key path) and click 'Create Cluster'; cluster stack creation takes about twenty minutes.
Tip: Similar to creating a GKE cluster, you can also create an AWS EKS cluster stack
using the Command Palette ( >
Command Palette). Launch the Command Palette and use the command
Cloud Code: Create AWS EKS Cluster Stack to open the Create Cluster wizard.
Creating an Azure cluster
If you'd like to create an AKS cluster, you can do so using the Azure Kubernetes Explorer. Click on the three dotted 'More actions...' icon and select 'Create Azure Kubernetes cluster' to launch the Create Cluster wizard.
Note, you need to have the Azure CLI
already installed and on your PATH
. You must also be logged
in (by running az login
) in order to create an Azure cluster.
Once set up, select your configuration preferences (resource group, location, cluster name, machine count, and machine type) and click 'Create Cluster'.
Tip: You can also create an Azure Kubernetes cluster
using the Command Palette ( >
Command Palette). Launch the Command Palette and use the command
Cloud Code: Create Azure Kubernetes cluster to open the Create Cluster wizard.
Working with Autopilot GKE clusters
If you have an existing Autopilot GKE cluster, you can set it as your active cluster and work with it using Cloud Code. Autopilot GKE clusters are accessible through your Kubernetes Explorer.
To make a new Autopilot GKE cluster, follow the creating a new Autopilot cluster guide.
Working with local clusters
In addition to minikube, you also have the option of working with Cloud Code if you're using Docker Desktop (for Mac or Windows).
The only additional setup required to get Cloud Code working with a
local cluster is ensuring your default configuration (for example,
~/.kube/config
) contains your local cluster. This cluster must be set as the
current context.
For example, if you were using a local cluster, docker-for-desktop
, with
Docker Desktop, set your preferred cluster with the following command:
kubectl config use-context docker-for-desktop