Standardizes the deployment and maintenance of Kubernetes distributions across various environments.
Install
mkdir -p .claude/skills/kcli-cluster-deployment && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/4272" && unzip -o skill.zip -d .claude/skills/kcli-cluster-deployment && rm skill.zipInstalls to .claude/skills/kcli-cluster-deployment
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Guides deployment and management of Kubernetes clusters with kcli. Use when deploying OpenShift, k3s, kubeadm, or other Kubernetes distributions.Key capabilities
- →Deploy OpenShift, k3s, kubeadm, and other Kubernetes distributions
- →Scale cluster control planes and worker nodes
- →Manage cluster lifecycle including creation and deletion
- →Retrieve cluster kubeconfig and connection information
- →Configure air-gapped or disconnected deployments
How it works
The skill provides a command-line interface to provision and manage Kubernetes clusters by executing structured kcli commands and applying YAML-based configuration parameters.
Inputs & outputs
When to use kcli-cluster-deployment
- →Deploy a new k3s cluster
- →Manage OpenShift environment lifecycle
- →Provision infrastructure for testing
- →Automate kubeadm cluster setup
About this skill
kcli Cluster Deployment
Supported Cluster Types
| Type | Description | Module |
|---|---|---|
openshift | Red Hat OpenShift (IPI/UPI) | kvirt/cluster/openshift/ |
okd | Community OpenShift | Same as openshift |
hypershift | OpenShift Hosted Control Planes | kvirt/cluster/hypershift/ |
microshift | Lightweight edge OpenShift | kvirt/cluster/microshift/ |
generic | Generic Kubernetes (alias: kubernetes) | kvirt/cluster/kubernetes/ |
kubeadm | Standard Kubernetes via kubeadm | kvirt/cluster/kubeadm/ |
k3s | Lightweight Kubernetes | kvirt/cluster/k3s/ |
rke2 | Rancher Kubernetes Engine 2 | kvirt/cluster/rke2/ |
aks | Azure Kubernetes Service | kvirt/cluster/aks/ |
eks | Amazon Elastic Kubernetes | kvirt/cluster/eks/ |
gke | Google Kubernetes Engine | kvirt/cluster/gke/ |
Basic Cluster Commands
# Create cluster
kcli create kube <type> <clustername>
# Create with parameters
kcli create kube openshift -P ctlplanes=3 -P workers=2 mycluster
# List clusters
kcli list kube
# Get cluster info
kcli info kube mycluster
# Delete cluster
kcli delete kube mycluster
# Scale cluster
kcli scale kube <type> -P workers=5 mycluster
# Get kubeconfig
kcli get kubeconfig mycluster
OpenShift Deployment
Minimal Example
kcli create kube openshift -P pull_secret=~/pull-secret.json mycluster
Key Parameters
# Required
pull_secret: ~/pull-secret.json # Red Hat pull secret
domain: example.com # Base domain
# Topology
ctlplanes: 3 # Control plane nodes
workers: 2 # Worker nodes
version: stable # OpenShift version (stable, 4.14, etc.)
# Resources
ctlplane_memory: 16384 # Control plane memory (MB)
ctlplane_numcpus: 8 # Control plane CPUs
worker_memory: 8192 # Worker memory
worker_numcpus: 4 # Worker CPUs
# Networking
network: default # Libvirt network
api_ip: 192.168.122.253 # API VIP (auto-detected if omitted)
ingress_ip: 192.168.122.252 # Ingress VIP
Disconnected/Air-gapped
disconnected_url: registry.local:5000
disconnected_user: admin
disconnected_password: password
ca: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
kubeadm Deployment
kcli create kube kubeadm -P domain=k8s.local -P ctlplanes=1 -P workers=2 myk8s
Key Parameters
domain: k8s.local # Required domain
version: 1.29 # Kubernetes version
ctlplanes: 1 # Control planes (odd number for HA)
workers: 2 # Worker count
network: default # Network name
api_ip: 192.168.122.250 # API endpoint (for multi-ctlplane)
image: centos9stream # Base OS image
k3s Deployment
kcli create kube k3s -P ctlplanes=1 -P workers=2 myk3s
Key Parameters
ctlplanes: 1
workers: 2
version: latest # k3s version
domain: k3s.local
image: ubuntu2204
RKE2 Deployment
kcli create kube rke2 -P ctlplanes=1 -P workers=2 myrke2
Key Parameters
ctlplanes: 1
workers: 2
version: latest # RKE2 version
domain: rke2.local
image: ubuntu2204
HyperShift (Hosted Control Planes)
kcli create kube hypershift \
-P pull_secret=~/pull-secret.json \
-P nodepool_replicas=2 \
myhypershift
Key Parameters
pull_secret: ~/pull-secret.json
management_cluster: mgmt # Existing cluster name
nodepool_replicas: 2 # Worker node count
release_image: ... # Specific OCP release
MicroShift Deployment
kcli create kube microshift -P pull_secret=~/pull-secret.json mymicroshift
Key Parameters
pull_secret: ~/pull-secret.json
version: latest # MicroShift version
image: rhel9 # RHEL-based image required
Cluster Directory Structure
Clusters store state in ~/.kcli/clusters/<clustername>/:
~/.kcli/clusters/mycluster/
├── kcli_parameters.yml # Stored parameters
├── kubeconfig # Cluster kubeconfig
├── auth/ # Auth credentials (OpenShift)
│ ├── kubeadmin-password
│ └── kubeconfig
└── (other cluster-specific files)
Scaling Operations
# Scale workers
kcli scale kube openshift -P workers=5 mycluster
# Scale control planes (careful!)
kcli scale kube kubeadm -P ctlplanes=3 mycluster
# Add nodes with specific parameters
kcli scale kube openshift -P workers=3 -P worker_memory=16384 mycluster
Troubleshooting
Check Deployment Progress
# OpenShift: watch bootstrap
kcli ssh mycluster-bootstrap
journalctl -f -u bootkube
# kubeadm: check cluster status
export KUBECONFIG=~/.kcli/clusters/mycluster/kubeconfig
kubectl get nodes
kubectl get pods -A
Common Issues
- API IP not reachable: Ensure
api_ipis in the correct subnet - Pull secret invalid: Verify JSON format and Red Hat subscription
- Insufficient resources: Check VM memory/CPU against requirements
- DNS resolution: Ensure domain resolves or use
sslip: true
Debug Mode
kcli -d create kube openshift mycluster # Verbose output
Cloud Provider Notes
For cloud providers (AWS, GCP, Azure), kcli can:
- Auto-create load balancers (
cloud_lb: true) - Configure cloud DNS (
cloud_dns: true) - Set up cloud storage (
cloud_storage: true)
cloud_lb: true
cloud_dns: true
cloud_storage: true
When not to use it
- →Manual infrastructure management without kcli
Prerequisites
Limitations
- →Requires valid pull secret for OpenShift
- →Resource-dependent deployment success
How it compares
It standardizes the deployment process across multiple Kubernetes distributions using a unified toolset rather than manual provider-specific scripts.
Compared to similar skills
kcli-cluster-deployment side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| kcli-cluster-deployment (this skill) | 2 | 4mo | Review | Intermediate |
| deployment-engineer | 4 | 4mo | No flags | Advanced |
| devops | 2 | 6mo | Review | Intermediate |
| deploying-kafka-k8s | 0 | 7mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by karmab
View all by karmab →You might also like
deployment-engineer
sickn33
Expert deployment engineer specializing in modern CI/CD pipelines, GitOps workflows, and advanced deployment automation. Masters GitHub Actions, ArgoCD/Flux, progressive delivery, container security, and platform engineering. Handles zero-downtime deployments, security scanning, and developer experience optimization. Use PROACTIVELY for CI/CD design, GitOps implementation, or deployment automation.
devops
mrgoonie
Deploy to Cloudflare (Workers, R2, D1), Docker, GCP (Cloud Run, GKE), Kubernetes (kubectl, Helm). Use for serverless, containers, CI/CD, GitOps, security audit.
deploying-kafka-k8s
AbdullahMalik17
|
deploy-app
wipash
|
backstage-deployment
Ohorizons
Deploys the upstream open-source Backstage developer portal on Azure AKS or locally via Docker Desktop. USE FOR: deploy Backstage, Backstage on AKS, Backstage local Docker, Backstage Helm chart, Backstage PostgreSQL, Backstage ACR image, Backstage GitHub OAuth, Microsoft Entra ID auth, GitHub Enterp
deployment-pipeline-design
wshobson
Design multi-stage CI/CD pipelines with approval gates, security checks, and deployment orchestration. Use when architecting deployment workflows, setting up continuous delivery, or implementing GitOps practices.