Skip to main content
Create a new Kubernetes cluster on Amazon EKS, Google Kubernetes Engine (GKE), or using kubeadm on EC2 instances.

Subcommands

eks

Create an Amazon EKS cluster.
clanker k8s create eks [cluster-name] [flags]
cluster-name
string
required
Name of the EKS cluster to create
Flags
--nodes
integer
default:"1"
Number of worker nodes
--node-type
string
default:"t3.small"
EC2 instance type for nodes
--version
string
default:"1.29"
Kubernetes version
--plan
boolean
Show plan without applying changes
--apply
boolean
Apply the plan without confirmation prompt
Examples
# Create an EKS cluster with 2 nodes
clanker k8s create eks my-cluster --nodes 2 --node-type t3.small
# Show plan only without creating
clanker k8s create eks my-cluster --plan
[k8s] creating EKS cluster 'my-cluster'...

=== Cluster Created Successfully ===

Name:       my-cluster
Status:     ACTIVE
Endpoint:   https://ABC123.gr7.us-east-1.eks.amazonaws.com
Version:    1.29

Connection:
  Kubeconfig: ~/.kube/config
  
Commands:
  kubectl get nodes
  kubectl get pods -A

gke

Create a Google Kubernetes Engine (GKE) cluster.
clanker k8s create gke [cluster-name] [flags]
cluster-name
string
required
Name of the GKE cluster to create
Flags
--gcp-project
string
required
GCP project ID (required)
--gcp-region
string
default:"us-central1"
GCP region for the cluster
--nodes
integer
default:"1"
Number of worker nodes
--node-type
string
default:"e2-standard-2"
GCE machine type for nodes
--version
string
Kubernetes version (default: GKE default)
--preemptible
boolean
Use preemptible VMs for nodes
--plan
boolean
Show plan without applying changes
--apply
boolean
Apply the plan without confirmation prompt
Examples
# Create a GKE cluster with 2 nodes
clanker k8s create gke my-cluster --gcp-project my-project --nodes 2 --node-type e2-standard-2
# Show plan for GKE cluster creation
clanker k8s create gke my-cluster --gcp-project my-project --gcp-region us-central1 --plan

kubeadm

Create a kubeadm-based Kubernetes cluster on EC2 instances.
clanker k8s create kubeadm [cluster-name] [flags]
cluster-name
string
required
Name of the kubeadm cluster to create
Flags
--workers
integer
default:"1"
Number of worker nodes
--node-type
string
default:"t3.small"
EC2 instance type for nodes
--key-pair
string
AWS key pair name for SSH access (auto-creates if not exists)
--ssh-key
string
Path to SSH private key (default: ~/.ssh/<key-pair>)
--version
string
default:"1.29"
Kubernetes version
--plan
boolean
Show plan without applying changes
--apply
boolean
Apply the plan without confirmation prompt
Examples
# Create a kubeadm cluster with 1 worker
clanker k8s create kubeadm my-cluster --workers 1 --key-pair my-key
# Show plan only
clanker k8s create kubeadm my-cluster --plan
[k8s] checking SSH key configuration...
[k8s] creating kubeadm cluster 'my-cluster'...

=== Cluster Created Successfully ===

Name:       my-cluster
Status:     ACTIVE
Endpoint:   10.0.1.100:6443
Version:    1.29

Control Plane:
  ip-10-0-1-100: 10.0.1.100 (Public: 54.123.45.67)

Workers:
  ip-10-0-1-101: 10.0.1.101 (Public: 54.123.45.68)

Connection:
  Kubeconfig: /home/user/.kube/my-cluster-config
  
Commands:
  kubectl get nodes
  kubectl get pods -A
  export KUBECONFIG=/home/user/.kube/my-cluster-config

Build docs developers (and LLMs) love