kubernetes
# Kubernetes Quick Reference
What this skill does
# Kubernetes Quick Reference
**Version**: 1.0.0 | **Target Size**: <100KB | **Purpose**: Fast reference for Kubernetes manifest development and deployment
---
## Overview
Kubernetes is a container orchestration platform for automating deployment, scaling, and management of containerized applications. This quick reference provides essential patterns for creating production-ready Kubernetes manifests with security hardening and best practices.
**When to Load This Skill**:
- Detected: `*.yaml` with `apiVersion: v1|apps/v1`, `kind: Deployment|Service|Pod`, `kustomization.yaml`
- Manual: `--tools=kubernetes` flag
- Use Case: Container orchestration and production deployments
**Progressive Disclosure**:
- **This file (SKILL.md)**: Quick reference for immediate use
- **REFERENCE.md**: Comprehensive guide with advanced patterns and 20+ production examples
---
## Table of Contents
1. [Core Resources Quick Reference](#core-resources-quick-reference)
2. [Security Hardening Checklist](#security-hardening-checklist)
3. [Resource Requests and Limits Guidelines](#resource-requests-and-limits-guidelines)
4. [Networking Basics](#networking-basics)
5. [Storage Overview](#storage-overview)
6. [RBAC Basics](#rbac-basics)
7. [Common kubectl Commands](#common-kubectl-commands)
8. [Health Checks and Probes](#health-checks-and-probes)
9. [Configuration Management](#configuration-management)
10. [Troubleshooting Quick Guide](#troubleshooting-quick-guide)
---
## Core Resources Quick Reference
### Pod
Basic unit of deployment - one or more containers running together:
```yaml
apiVersion: v1
kind: Pod
metadata:
name: webapp
labels:
app: webapp
spec:
containers:
- name: app
image: nginx:1.21
ports:
- containerPort: 80
```
**Key Concepts**:
- Smallest deployable unit in Kubernetes
- Containers in same pod share network and storage
- Typically managed by higher-level controllers (Deployment, StatefulSet)
- Use for debugging, not production deployments
---
### Deployment
Declarative pod management with rolling updates and rollbacks:
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp
labels:
app: webapp
spec:
replicas: 3
selector:
matchLabels:
app: webapp
template:
metadata:
labels:
app: webapp
spec:
containers:
- name: app
image: nginx:1.21
ports:
- containerPort: 80
```
**Key Features**:
- Manages ReplicaSets for pod scaling
- Rolling updates with zero downtime
- Rollback to previous versions
- Self-healing (restarts failed pods)
---
### Service
Network abstraction providing stable endpoint for pods:
**ClusterIP** (internal only):
```yaml
apiVersion: v1
kind: Service
metadata:
name: webapp
spec:
type: ClusterIP # Default
selector:
app: webapp
ports:
- port: 80 # Service port
targetPort: 80 # Container port
```
**NodePort** (external access via node port):
```yaml
apiVersion: v1
kind: Service
metadata:
name: webapp
spec:
type: NodePort
selector:
app: webapp
ports:
- port: 80
targetPort: 80
nodePort: 30080 # External port (30000-32767)
```
**LoadBalancer** (cloud load balancer):
```yaml
apiVersion: v1
kind: Service
metadata:
name: webapp
spec:
type: LoadBalancer
selector:
app: webapp
ports:
- port: 80
targetPort: 80
```
**Service Types**:
- **ClusterIP**: Internal access only (default)
- **NodePort**: External access via node IP:port
- **LoadBalancer**: Cloud provider load balancer
- **ExternalName**: DNS CNAME record
---
### ConfigMap
Non-sensitive configuration data:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: webapp-config
data:
app.conf: |
[server]
port = 8080
timeout = 30
database.host: postgres.default.svc.cluster.local
cache.ttl: "3600"
```
**Usage in Pod**:
```yaml
spec:
containers:
- name: app
envFrom:
- configMapRef:
name: webapp-config
# Or individual keys
env:
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: webapp-config
key: database.host
# Or mount as volume
volumeMounts:
- name: config
mountPath: /etc/config
volumes:
- name: config
configMap:
name: webapp-config
```
---
### Secret
Sensitive data storage (base64 encoded):
```yaml
apiVersion: v1
kind: Secret
metadata:
name: webapp-secrets
type: Opaque
data:
# Base64 encoded values
db-password: cGFzc3dvcmQxMjM=
api-key: YWJjZGVmZ2hpamts
stringData:
# Plain text (auto-encoded)
admin-password: changeme
```
**Usage in Pod**:
```yaml
spec:
containers:
- name: app
env:
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: webapp-secrets
key: db-password
# Or mount as volume
volumeMounts:
- name: secrets
mountPath: /etc/secrets
readOnly: true
volumes:
- name: secrets
secret:
secretName: webapp-secrets
```
**Secret Types**:
- `Opaque`: Generic secret (default)
- `kubernetes.io/dockerconfigjson`: Docker registry credentials
- `kubernetes.io/tls`: TLS certificate and key
- `kubernetes.io/service-account-token`: Service account token
---
### Ingress
HTTP/HTTPS routing to services:
```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: webapp
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: nginx
tls:
- hosts:
- www.example.com
secretName: webapp-tls
rules:
- host: www.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: webapp
port:
number: 80
```
**Path Types**:
- `Prefix`: Matches path prefix (`/app` matches `/app`, `/app/page`)
- `Exact`: Exact path match only
- `ImplementationSpecific`: Ingress controller-specific
---
## Security Hardening Checklist
### Essential Security Settings
**From infrastructure-developer best practices** (production-validated):
```yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp
namespace: production
spec:
replicas: 3
selector:
matchLabels:
app: webapp
template:
metadata:
labels:
app: webapp
spec:
# Pod-level security context
securityContext:
runAsNonRoot: true # ✅ Prevent root execution
runAsUser: 1000 # ✅ Specific non-root user
fsGroup: 2000 # ✅ File system group
seccompProfile:
type: RuntimeDefault # ✅ Seccomp profile
containers:
- name: app
image: myapp:1.2.3 # ✅ Pinned version (not :latest)
# Container-level security context
securityContext:
allowPrivilegeEscalation: false # ✅ No privilege escalation
readOnlyRootFilesystem: true # ✅ Immutable filesystem
capabilities:
drop:
- ALL # ✅ Drop all capabilities
# Resource limits (prevent DoS)
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
# Health checks
livenessProbe:
httpGet:
path: /health
port: 8080
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
```
### Security Context Fields
**Pod-level**:
```yaml
securityContext:
runAsNonRoot: true # Enforce non-root user
runAsUser: 1000 # UID to run as
runAsGroup: 3000 # GID to run as
fsGroup: 2000 # Volume ownership group
fsGroupChangePolicy: "OnRootMismatch"
seccompProfile:
type: RuntimeDefault # Seccomp profile
supplementalGroups: [4000]
```
**Container-level**:
```yaml
seRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.