kubernetes-health-check

Verify Kubernetes cluster health, resource availability, and readiness before deploying applications

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "kubernetes-health-check" with this command: npx skills add asadullah48/hackathon-superpowers/asadullah48-hackathon-superpowers-kubernetes-health-check

Kubernetes Health Check

Purpose

Perform comprehensive health checks on Kubernetes clusters to ensure readiness for application deployments. Validates cluster connectivity, resource availability, and essential components.

Prerequisites

  • kubectl installed and configured
  • Access to Kubernetes cluster (Minikube, cloud cluster, etc.)
  • Sufficient permissions to query cluster resources

Instructions

Step 1: Verify Cluster Connectivity

Check if kubectl can connect to the cluster:

# Check cluster info
kubectl cluster-info

# Verify current context
kubectl config current-context

# List all nodes
kubectl get nodes

Expected Results:

  • Cluster-info shows running control plane
  • At least one node in Ready state
  • No connection errors

Step 2: Check Node Resources

Verify sufficient resources are available:

# Get detailed node information
kubectl describe nodes

# Check resource usage (requires metrics-server)
kubectl top nodes

Minimum Requirements:

  • CPU: >2 cores available
  • Memory: >4GB available
  • Disk: >20GB available
  • Status: All nodes Ready

Step 3: Verify System Components

Ensure essential Kubernetes components are running:

# Check system pods
kubectl get pods -n kube-system

# Check critical components
kubectl get pods -n kube-system | grep -E 'coredns|etcd|kube-apiserver|kube-controller|kube-scheduler'

All pods should be:

  • Status: Running
  • Restarts: <3 (some restarts normal during startup)
  • Ready: All containers ready (e.g., 1/1, 2/2)

Step 4: Validate Storage

Verify storage classes are available:

# List storage classes
kubectl get storageclass

# Check for default storage class
kubectl get storageclass -o json | jq -r '.items[] | select(.metadata.annotations."storageclass.kubernetes.io/is-default-class"=="true") | .metadata.name'

Requirements:

  • At least one storage class exists
  • One marked as (default)

Step 5: Test Networking

Validate cluster networking:

# Check kube-proxy
kubectl get pods -n kube-system | grep kube-proxy

# Verify DNS resolution
kubectl run -it --rm debug --image=busybox --restart=Never -- nslookup kubernetes.default

# Check CNI plugin
kubectl get pods -n kube-system | grep -E 'calico|flannel|weave|cilium'

Networking is healthy when:

  • kube-proxy pods running
  • DNS lookups succeed
  • CNI plugin pods running

Validation

Pre-deployment checks passed when:

  • kubectl connects successfully
  • All nodes are Ready
  • System pods running (coredns, etcd, kube-apiserver)
  • Default storage class exists
  • DNS resolution works
  • Resources meet requirements (2 CPU, 4GB RAM)

Troubleshooting

Problem: Cannot connect to cluster

kubectl config get-contexts
kubectl config use-context <correct-context>

# For Minikube
minikube status
minikube start

Problem: Nodes NotReady

kubectl describe node <node-name>

# Restart Minikube with more resources
minikube stop
minikube start --cpus=4 --memory=8192

Best Practices

  1. Always Check First: Run health checks before any deployment
  2. Save Reports: Keep health reports for troubleshooting
  3. Automate: Add to CI/CD pipelines
  4. Monitor Trends: Track resource usage over time
  5. Document Baseline: Know what "healthy" looks like

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

caps-format-validator

No summary provided by upstream source.

Repository SourceNeeds Review
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated
General

asr

Transcribe audio files to text using local speech recognition. Triggers on: "转录", "transcribe", "语音转文字", "ASR", "识别音频", "把这段音频转成文字".

Archived SourceRecently Updated