kubernetes

$npx mdskill add partme-ai/full-stack-skills/kubernetes

Guides Kubernetes deployments, configurations, and troubleshooting for pods, services, and cluster management.

  • Helps users deploy applications, write manifests, and resolve cluster issues.
  • Integrates with kubectl, minikube, kind, and k3d for cluster operations.
  • Recommends actions based on user queries about Kubernetes workflows and resources.
  • Presents results through YAML examples, command guidance, and debugging steps.

SKILL.md

.github/skills/kubernetesView on GitHub ↗
---
name: kubernetes
description: "Provides comprehensive guidance for Kubernetes including pods, services, deployments, ingress, ConfigMaps, and cluster management. Use when the user asks about Kubernetes, needs to deploy applications, configure resources, or troubleshoot cluster issues."
license: Complete terms in LICENSE.txt
---

## When to use this skill

Use this skill whenever the user wants to:
- Write Deployment, Service, ConfigMap, Secret, or Ingress manifests
- Deploy, scale, or troubleshoot pods and clusters with kubectl
- Design resource limits, health probes, rolling updates, and operational workflows
- Set up local development clusters with minikube, kind, or k3d

## How to use this skill

### Workflow

1. **Write manifests** — define workloads and services in YAML
2. **Apply to cluster** — use `kubectl apply -f` to deploy
3. **Verify status** — check rollout, pod health, and service endpoints
4. **Debug issues** — inspect logs, describe resources, exec into pods

### Quick Start Example

```yaml
# deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp
spec:
  replicas: 3
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
        - name: myapp
          image: myapp:1.0.0
          ports:
            - containerPort: 8080
          resources:
            requests:
              cpu: 100m
              memory: 128Mi
            limits:
              cpu: 500m
              memory: 256Mi
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8080
            initialDelaySeconds: 10
          readinessProbe:
            httpGet:
              path: /ready
              port: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: myapp
spec:
  selector:
    app: myapp
  ports:
    - port: 80
      targetPort: 8080
  type: ClusterIP
```

```bash
# Apply manifests
kubectl apply -f deployment.yaml

# Check rollout status
kubectl rollout status deployment/myapp

# View pod logs
kubectl logs -l app=myapp --tail=50

# Exec into a pod for debugging
kubectl exec -it deployment/myapp -- /bin/sh
```

### Essential kubectl Commands

| Command | Purpose |
|---------|---------|
| `kubectl apply -f <file>` | Create or update resources |
| `kubectl get pods -w` | Watch pod status |
| `kubectl describe pod <name>` | Inspect pod details and events |
| `kubectl logs <pod> -f` | Stream container logs |
| `kubectl rollout undo deployment/<name>` | Roll back a deployment |
| `kubectl scale deployment/<name> --replicas=5` | Scale replicas |

## Best Practices

- Always set `requests` and `limits` for CPU and memory
- Configure `livenessProbe` and `readinessProbe` for every container
- Use Secrets for sensitive data and ConfigMaps for configuration
- Define rolling update strategy with `maxSurge` and `maxUnavailable`
- Collect logs and metrics centrally; use RBAC and NetworkPolicies in production

## Troubleshooting

- **CrashLoopBackOff**: Run `kubectl logs <pod> --previous` to see crash output; check resource limits and probe configuration
- **ImagePullBackOff**: Verify image name/tag exists and imagePullSecrets are configured
- **Pending pods**: Run `kubectl describe pod <name>` — look for insufficient resources or unschedulable nodes
- **Service not reachable**: Verify selector labels match pod labels; check endpoints with `kubectl get endpoints <svc>`

## Keywords

kubernetes, k8s, kubectl, deployment, pod, service, ingress, configmap, secret, container orchestration

More from partme-ai/full-stack-skills

SkillDescription
adobe-xd"Guides creation of UI/UX designs, interactive prototypes, reusable components, and design specs in Adobe XD. Use when the user asks about Adobe XD artboards, prototype links, repeat grids, component states, design tokens export, or developer handoff."
angular"Provides comprehensive guidance for Angular framework including components, modules, services, dependency injection, routing, forms, and TypeScript integration. Use when the user asks about Angular, needs to create Angular applications, implement Angular components, or work with Angular features."
ansible"Provides comprehensive guidance for Ansible automation including playbooks, roles, inventory, and module usage. Use when the user asks about Ansible, needs to automate IT tasks, create Ansible playbooks, or manage infrastructure with Ansible."
ant-design-mini"Builds mini-program UIs with Ant Design Mini components for Alipay and WeChat mini-programs. Covers Button, Form, List, Modal, Tabs, NavBar, and 60+ components with theme customization and CSS variable theming. Use when the user needs to create mini-program interfaces with Ant Design Mini, configure themes, or implement mini-program-specific UI patterns."
ant-design-mobile"Builds React mobile UIs with Ant Design Mobile (antd-mobile) components including Button, Form, List, Modal, Picker, Tabs, PullToRefresh, InfiniteScroll, and 50+ mobile-optimized components. Use when the user needs to create mobile-first React interfaces, implement mobile navigation, forms, or data display with Ant Design Mobile."
ant-design-react"Builds enterprise React UIs with Ant Design (antd) including 60+ components (Button, Form, Table, Select, Modal, Message), design tokens, TypeScript support, and ConfigProvider theming. Use when the user needs to create React applications with Ant Design, build forms with validation, display data tables, or customize the Ant Design theme."
ant-design-vueProvides comprehensive guidance for Ant Design Vue (AntDV) component library for Vue 3. Covers installation, usage, API reference, templates, and all component categories. Use when building enterprise-class UI with Vue 3 and Ant Design.
api-doc-generator"Generate API documentation by scanning Controller classes, extracting endpoint URLs, HTTP methods, parameters, and response structures, then producing standardized docs from templates. Use when the user explicitly mentions generating API documentation, creating API docs, scanning interfaces, or documenting REST APIs. Do not trigger for generic documentation requests without explicit API mention."
appium"Provides comprehensive guidance for Appium mobile testing including mobile app automation, element location, gestures, and cross-platform testing. Use when the user asks about Appium, needs to test mobile applications, automate mobile apps, or write Appium test scripts."
ascii-ansi-colorizer"Add an ANSI color layer to existing ASCII/plain-text output (gradient/rainbow/highlights) with alignment-safe rules and a required no-color fallback. Use when the user wants to colorize terminal output, add rainbow effects to CLI text, or style ASCII art with ANSI colors."