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]
Name of the EKS cluster to create
Flags
EC2 instance type for nodes
Show plan without applying changes
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]
Name of the GKE cluster to create
Flags
GCP project ID (required)
--gcp-region
string
default:"us-central1"
GCP region for the cluster
--node-type
string
default:"e2-standard-2"
GCE machine type for nodes
Kubernetes version (default: GKE default)
Use preemptible VMs for nodes
Show plan without applying changes
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]
Name of the kubeadm cluster to create
Flags
EC2 instance type for nodes
AWS key pair name for SSH access (auto-creates if not exists)
Path to SSH private key (default: ~/.ssh/<key-pair>)
Show plan without applying changes
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