k8s command provides comprehensive Kubernetes cluster management and natural language querying capabilities for EKS, GKE, and kubeadm clusters.
Usage
Subcommands
Create commands
Management commands
Deployment commands
Resource commands
Logs commands
Stats commands
Ask command
Create EKS flags
Number of worker nodes
EC2 instance type for nodes
Kubernetes version
Show plan without applying
Apply the plan (default prompts for confirmation)
Create GKE flags
GCP project ID
GCP region for the cluster
Number of worker nodes
GCE machine type for nodes
Kubernetes version (default: GKE default)
Use preemptible VMs for nodes
Show plan without applying
Apply the plan
Create kubeadm flags
Number of worker nodes
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>)Kubernetes version
Show plan without applying
Apply the plan
Deploy flags
Deployment name (default: image name)
Container port to expose
Number of replicas
Kubernetes namespace
Show plan without applying
Apply the plan
Resources flags
Cluster name (optional, uses current context if not specified)
Output format (
json or yaml)Logs flags
Container name
Follow log output
Get logs from previous terminated container
Number of lines from end of logs
Show logs since duration (e.g.,
1h, 30m)Include timestamps in output
Get logs from all containers in pod
Namespace
Stats flags
Sort by
cpu or memoryOutput format (
table, json, or yaml)Namespace for pod metrics
Get metrics from all namespaces
Show container-level metrics for pod
Ask flags
Kubernetes cluster name (EKS or GKE cluster name)
AWS profile for EKS clusters
Path to kubeconfig file (default:
~/.kube/config)kubectl context to use (overrides
--cluster)Default namespace for queries (default: all namespaces)
AI profile to use for LLM queries
Enable debug output
Use GKE cluster instead of EKS
GCP project ID for GKE clusters
GCP region for GKE clusters
Examples
Create and manage EKS cluster
Monitor cluster health
See also
- Ask command - Natural language queries
- Configuration - Configure cloud credentials