[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CVDTRJMVP09AWC6PVR9SMH":3,"skill-same:01M7CVDTRJMVP09AWC6PVR9SMH":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":26,"commitSha":27,"skillDirectory":28,"forksCount":14,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7CVDTRJMVP09AWC6PVR9SMH","kubernetes-patterns",null,"Kubernetes workload patterns, resource management, RBAC, probes, autoscaling, ConfigMap\u002FSecret handling, and kubectl debugging for production-grade deployments.","Henrique1601\u002FSkiilsToIAs","Henrique1601","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F92006691?v=4","01M7CRXVT0GVXVK80JT1GR687S","Henrique Bezerra Dos Santos","01M7CRXVTN5Y8TMWJ1MDSKCQ1T",0,"MIT","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fdevops-cloud\u002Fkubernetes-patterns\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: kubernetes-patterns\ndescription: Kubernetes workload patterns, resource management, RBAC, probes, autoscaling, ConfigMap\u002FSecret handling, and kubectl debugging for production-grade deployments.\nmetadata:\n  origin: ECC\n---\n\n# Kubernetes Patterns\n\nProduction-grade Kubernetes patterns for deploying, managing, and debugging workloads reliably.\n\n## When to Activate\n\n- Writing Kubernetes manifests (Deployments, Services, Ingress, Jobs)\n- Configuring resource requests\u002Flimits, liveness\u002Freadiness probes\n- Setting up RBAC, namespaces, or ServiceAccounts\n- Managing configuration and secrets in K8s\n- Debugging CrashLoopBackOff, OOMKilled, pending pods, or image pull errors\n- Configuring HPA (Horizontal Pod Autoscaler) or PodDisruptionBudgets\n- Reviewing K8s YAML for security or correctness\n\n## When to Use\n\n> Same as **When to Activate** above. This alias satisfies repo skill-format conventions. Use this skill any time you are writing, reviewing, or debugging Kubernetes YAML and workloads.\n\n## How It Works\n\nThis skill provides **copy-pasteable, production-grade YAML patterns** and **kubectl debugging commands** organized by task:\n\n1. **Deployment template** — A fully configured production `Deployment` with security context, rolling update strategy, all three probe types, resource limits, and environment injection from ConfigMap\u002FSecret.\n2. **Probes** — Decision table for startup vs liveness vs readiness, with correct `failureThreshold × periodSeconds` math.\n3. **Services & Ingress** — ClusterIP, LoadBalancer, and TLS Ingress patterns with cert-manager annotations.\n4. **ConfigMaps & Secrets** — `envFrom`, file-mount, and external secrets guidance.\n5. **Resource management** — Requests vs limits rules of thumb by workload type (web API, JVM, worker, sidecar).\n6. **RBAC** — Least-privilege ServiceAccount → Role → RoleBinding chain.\n7. **HPA & PDB** — Autoscaling and node-drain safety configurations.\n8. **Jobs & CronJobs** — One-off and scheduled workload patterns with correct `restartPolicy`.\n9. **kubectl cheatsheet** — Logs, exec, rollback, port-forward, dry-run, and common error diagnosis commands.\n10. **Anti-patterns & checklist** — What NOT to do, and a security\u002Freliability\u002Fobservability checklist.\n\n## Examples\n\nSee the sections below for complete, runnable examples. Quick references:\n\n| Task | Jump to |\n|------|---------|\n| Full production Deployment YAML | [Core Workload Patterns](#core-workload-patterns) |\n| Probe configuration | [Probes](#probes--liveness-readiness-startup) |\n| RBAC least-privilege setup | [RBAC](#rbac--roles-and-serviceaccounts) |\n| Debug a CrashLoopBackOff | [kubectl Debugging Cheatsheet](#kubectl-debugging-cheatsheet) |\n| Autoscaling | [HPA](#horizontal-pod-autoscaler-hpa) |\n\n---\n\n## Core Workload Patterns\n\n### Deployment — Production Template\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: my-app\n  namespace: my-namespace\n  labels:\n    app: my-app\n    version: \"1.0.0\"\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: my-app\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1          # Allow 1 extra pod during update\n      maxUnavailable: 0    # Never reduce below desired count\n  template:\n    metadata:\n      labels:\n        app: my-app\n        version: \"1.0.0\"\n    spec:\n      # Security context at pod level\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 1001\n        fsGroup: 1001\n\n      # Graceful shutdown\n      terminationGracePeriodSeconds: 30\n\n      containers:\n        - name: my-app\n          image: ghcr.io\u002Forg\u002Fmy-app:1.0.0   # Never use :latest\n          imagePullPolicy: IfNotPresent\n\n          ports:\n            - containerPort: 8080\n              protocol: TCP\n\n          # Resource requests AND limits are both required\n          resources:\n            requests:\n              cpu: \"100m\"\n              memory: \"128Mi\"\n            limits:\n              cpu: \"500m\"\n              memory: \"256Mi\"\n\n          # Container security context\n          securityContext:\n            allowPrivilegeEscalation: false\n            readOnlyRootFilesystem: true\n            capabilities:\n              drop:\n                - ALL\n\n          # Probes (see Probes section below)\n          startupProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            failureThreshold: 30\n            periodSeconds: 5\n          livenessProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            initialDelaySeconds: 0\n            periodSeconds: 30\n            failureThreshold: 3\n          readinessProbe:\n            httpGet:\n              path: \u002Fready\n              port: 8080\n            initialDelaySeconds: 5\n            periodSeconds: 10\n            failureThreshold: 2\n\n          # Environment from ConfigMap and Secret\n          envFrom:\n            - configMapRef:\n                name: my-app-config\n          env:\n            - name: DB_PASSWORD\n              valueFrom:\n                secretKeyRef:\n                  name: my-app-secrets\n                  key: db-password\n\n          # Writable tmp directory when readOnlyRootFilesystem: true\n          volumeMounts:\n            - name: tmp\n              mountPath: \u002Ftmp\n\n      volumes:\n        - name: tmp\n          emptyDir: {}\n```\n\n---\n\n## Probes — Liveness, Readiness, Startup\n\nUnderstanding when to use each probe is critical:\n\n| Probe | Failure Action | Use For |\n|-------|---------------|---------|\n| `startupProbe` | Kills container if slow to start | Slow-starting apps (JVM, Python) |\n| `livenessProbe` | Restarts container | Deadlock \u002F hung process detection |\n| `readinessProbe` | Removes from Service endpoints | Temporary unavailability (DB reconnect) |\n\n```yaml\n# Correct pattern: startupProbe covers slow startup,\n# then liveness\u002Freadiness take over\nstartupProbe:\n  httpGet:\n    path: \u002Fhealth\n    port: 8080\n  failureThreshold: 30  # 30 * 5s = 150s max startup time\n  periodSeconds: 5\n\nlivenessProbe:\n  httpGet:\n    path: \u002Fhealth\n    port: 8080\n  periodSeconds: 30\n  failureThreshold: 3   # 3 * 30s = 90s before restart\n\nreadinessProbe:\n  httpGet:\n    path: \u002Fready         # Separate endpoint: checks DB, cache, etc.\n    port: 8080\n  periodSeconds: 10\n  failureThreshold: 2\n```\n\n```yaml\n# WRONG: initialDelaySeconds without startupProbe\n# If the app takes 60s to start, set a startupProbe instead\nlivenessProbe:\n  httpGet:\n    path: \u002Fhealth\n    port: 8080\n  initialDelaySeconds: 60   # BAD: Arbitrary wait, race condition\n```\n\n---\n\n## Services and Ingress\n\n### Service Types\n\n```yaml\n# ClusterIP (default) — internal-only\napiVersion: v1\nkind: Service\nmetadata:\n  name: my-app\n  namespace: my-namespace\nspec:\n  selector:\n    app: my-app\n  ports:\n    - port: 80\n      targetPort: 8080\n      protocol: TCP\n  type: ClusterIP\n```\n\n```yaml\n# LoadBalancer — external traffic (cloud providers)\nspec:\n  type: LoadBalancer\n  ports:\n    - port: 443\n      targetPort: 8080\n```\n\n### Ingress with TLS\n\n```yaml\napiVersion: networking.k8s.io\u002Fv1\nkind: Ingress\nmetadata:\n  name: my-app\n  namespace: my-namespace\n  annotations:\n    nginx.ingress.kubernetes.io\u002Fssl-redirect: \"true\"\n    cert-manager.io\u002Fcluster-issuer: \"letsencrypt-prod\"\nspec:\n  ingressClassName: nginx\n  tls:\n    - hosts:\n        - myapp.example.com\n      secretName: my-app-tls\n  rules:\n    - host: myapp.example.com\n      http:\n        paths:\n          - path: \u002F\n            pathType: Prefix\n            backend:\n              service:\n                name: my-app\n                port:\n                  number: 80\n```\n\n---\n\n## ConfigMaps and Secrets\n\n### ConfigMap — Non-sensitive configuration\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: my-app-config\n  namespace: my-namespace\ndata:\n  LOG_LEVEL: \"info\"\n  APP_ENV: \"production\"\n  MAX_CONNECTIONS: \"100\"\n  # Mount as a file for complex config\n  app.yaml: |\n    server:\n      port: 8080\n      timeout: 30s\n```\n\n```yaml\n# Mount ConfigMap as a file\nvolumes:\n  - name: config\n    configMap:\n      name: my-app-config\n      items:\n        - key: app.yaml\n          path: app.yaml\nvolumeMounts:\n  - name: config\n    mountPath: \u002Fetc\u002Fapp\n    readOnly: true\n```\n\n### Secrets — Sensitive data\n\n```bash\n# Create secret from literal (CLI, then store in Vault\u002FSOPS)\nkubectl create secret generic my-app-secrets \\\n  --from-literal=db-password='s3cr3t' \\\n  --namespace=my-namespace \\\n  --dry-run=client -o yaml | kubectl apply -f -\n```\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: my-app-secrets\n  namespace: my-namespace\ntype: Opaque\n# Values are base64-encoded (NOT encrypted — use Sealed Secrets or ESO for real encryption)\ndata:\n  db-password: czNjcjN0  # base64 of 's3cr3t'\n```\n\n> **Important:** Raw Kubernetes Secrets are only base64-encoded, not encrypted at rest unless your cluster has encryption configured. Use [Sealed Secrets](https:\u002F\u002Fgithub.com\u002Fbitnami-labs\u002Fsealed-secrets) or [External Secrets Operator](https:\u002F\u002Fexternal-secrets.io) for production.\n\n---\n\n## Resource Requests and Limits\n\n```yaml\nresources:\n  requests:       # Scheduler uses this to place the pod\n    cpu: \"100m\"   # 100 millicores = 0.1 CPU\n    memory: \"128Mi\"\n  limits:         # Container is killed\u002Fthrottled above this\n    cpu: \"500m\"\n    memory: \"256Mi\"\n```\n\n**Rules of thumb:**\n\n| Workload Type | CPU Request | Memory Request | Notes |\n|---------------|-------------|----------------|-------|\n| Web API | 100–250m | 128–256Mi | Set limits 2-4x requests |\n| Worker\u002Fconsumer | 250–500m | 256–512Mi | Memory limit = request for predictability |\n| JVM app | 500m–1 | 512Mi–2Gi | Allow headroom above `-Xmx` for JVM overhead |\n| Sidecar | 10–50m | 32–64Mi | Keep minimal |\n\n```yaml\n# WRONG: No requests or limits — unpredictable scheduling, OOM evictions\ncontainers:\n  - name: app\n    image: myapp:latest\n    # Missing resources: {} — this is dangerous in production\n\n# WRONG: Limits without requests — requests default to limits, over-reserves capacity\nresources:\n  limits:\n    cpu: \"2\"\n    memory: \"1Gi\"\n  # requests missing — will default to limits values\n```\n\n---\n\n## RBAC — Roles and ServiceAccounts\n\n### Principle of Least Privilege\n\n**Two patterns depending on whether the app calls the Kubernetes API:**\n\n#### Pattern A — App does NOT need the Kubernetes API (most apps)\n\nDisable token automounting on the ServiceAccount. The Role\u002FRoleBinding are not needed.\n\n```yaml\n# ServiceAccount with token disabled — safest default\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: my-app-sa\n  namespace: my-namespace\nautomountServiceAccountToken: false   # No K8s API token injected into pods\n```\n\n```yaml\n# Reference in Deployment — no token, no API access\nspec:\n  template:\n    spec:\n      serviceAccountName: my-app-sa\n      automountServiceAccountToken: false   # Belt-and-suspenders: also set at pod level\n```\n\n#### Pattern B — App DOES need the Kubernetes API (operators, controllers, config watchers)\n\nEnable the token and grant only the permissions actually required.\n\n```yaml\n# 1. ServiceAccount — enable token for this SA\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: my-app-sa\n  namespace: my-namespace\nautomountServiceAccountToken: true    # Token required: app calls K8s API\n```\n\n```yaml\n# 2. Role — grant only what the app needs (namespace-scoped)\napiVersion: rbac.authorization.k8s.io\u002Fv1\nkind: Role\nmetadata:\n  name: my-app-role\n  namespace: my-namespace\nrules:\n  - apiGroups: [\"\"]\n    resources: [\"configmaps\"]\n    verbs: [\"get\", \"list\", \"watch\"]    # Read-only, specific resource\n  - apiGroups: [\"\"]\n    resources: [\"secrets\"]\n    resourceNames: [\"my-app-secrets\"]  # Restrict to specific secret by name\n    verbs: [\"get\"]\n```\n\n```yaml\n# 3. Bind Role to ServiceAccount\napiVersion: rbac.authorization.k8s.io\u002Fv1\nkind: RoleBinding\nmetadata:\n  name: my-app-rolebinding\n  namespace: my-namespace\nsubjects:\n  - kind: ServiceAccount\n    name: my-app-sa\n    namespace: my-namespace\nroleRef:\n  kind: Role\n  apiGroup: rbac.authorization.k8s.io\n  name: my-app-role\n```\n\n```yaml\n# 4. Reference SA in Deployment\nspec:\n  template:\n    spec:\n      serviceAccountName: my-app-sa\n      # automountServiceAccountToken defaults to true from SA — token is injected\n```\n\n---\n\n## Horizontal Pod Autoscaler (HPA)\n\n```yaml\napiVersion: autoscaling\u002Fv2\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: my-app-hpa\n  namespace: my-namespace\nspec:\n  scaleTargetRef:\n    apiVersion: apps\u002Fv1\n    kind: Deployment\n    name: my-app\n  minReplicas: 2      # Always at least 2 for HA\n  maxReplicas: 10\n  metrics:\n    - type: Resource\n      resource:\n        name: cpu\n        target:\n          type: Utilization\n          averageUtilization: 70    # Scale up when avg CPU > 70%\n    - type: Resource\n      resource:\n        name: memory\n        target:\n          type: Utilization\n          averageUtilization: 80\n```\n\n> HPA requires `resources.requests` to be set on all containers — it calculates utilization as `current \u002F request`.\n\n---\n\n## PodDisruptionBudget (PDB)\n\nPrevent too many pods going down during node drains or rolling updates:\n\n```yaml\napiVersion: policy\u002Fv1\nkind: PodDisruptionBudget\nmetadata:\n  name: my-app-pdb\n  namespace: my-namespace\nspec:\n  minAvailable: 2           # OR use maxUnavailable: 1\n  selector:\n    matchLabels:\n      app: my-app\n```\n\n---\n\n## Namespaces and Multi-Tenancy\n\n```bash\n# Create namespace with resource quotas\nkubectl create namespace my-namespace\n\n# Apply ResourceQuota to limit namespace consumption\nkubectl apply -f - \u003C\u003CEOF\napiVersion: v1\nkind: ResourceQuota\nmetadata:\n  name: my-namespace-quota\n  namespace: my-namespace\nspec:\n  hard:\n    requests.cpu: \"4\"\n    requests.memory: 4Gi\n    limits.cpu: \"8\"\n    limits.memory: 8Gi\n    pods: \"20\"\nEOF\n```\n\n---\n\n## Jobs and CronJobs\n\n```yaml\n# One-off Job (DB migration, data processing)\napiVersion: batch\u002Fv1\nkind: Job\nmetadata:\n  name: db-migrate\n  namespace: my-namespace\nspec:\n  backoffLimit: 3          # Retry up to 3 times on failure\n  ttlSecondsAfterFinished: 3600   # Auto-delete after 1h\n  template:\n    spec:\n      restartPolicy: OnFailure    # Never for Jobs (not Always)\n      containers:\n        - name: migrate\n          image: ghcr.io\u002Forg\u002Fmy-app:1.0.0\n          command: [\"python\", \"manage.py\", \"migrate\"]\n          resources:\n            requests:\n              cpu: \"100m\"\n              memory: \"256Mi\"\n```\n\n```yaml\n# CronJob\napiVersion: batch\u002Fv1\nkind: CronJob\nmetadata:\n  name: cleanup-job\n  namespace: my-namespace\nspec:\n  schedule: \"0 2 * * *\"         # 2am daily\n  concurrencyPolicy: Forbid      # Don't run if previous still running\n  successfulJobsHistoryLimit: 3\n  failedJobsHistoryLimit: 1\n  jobTemplate:\n    spec:\n      template:\n        spec:\n          restartPolicy: OnFailure\n          containers:\n            - name: cleanup\n              image: ghcr.io\u002Forg\u002Fcleanup:1.0.0\n              resources:\n                requests:\n                  cpu: \"50m\"\n                  memory: \"64Mi\"\n```\n\n---\n\n## kubectl Debugging Cheatsheet\n\n```bash\n# --- Pod status and logs ---\nkubectl get pods -n my-namespace\nkubectl get pods -n my-namespace -o wide          # Show node assignment\nkubectl describe pod \u003Cpod-name> -n my-namespace   # Events and state details\nkubectl logs \u003Cpod-name> -n my-namespace           # Current logs\nkubectl logs \u003Cpod-name> -n my-namespace --previous  # Logs from crashed container\nkubectl logs \u003Cpod-name> -n my-namespace -c \u003Ccontainer>  # Multi-container pod\n\n# --- Execute into a running container ---\nkubectl exec -it \u003Cpod-name> -n my-namespace -- sh\nkubectl exec -it \u003Cpod-name> -n my-namespace -- bash\n\n# --- Check resource usage ---\nkubectl top pods -n my-namespace\nkubectl top nodes\n\n# --- Deployment operations ---\nkubectl rollout status deployment\u002Fmy-app -n my-namespace\nkubectl rollout history deployment\u002Fmy-app -n my-namespace\nkubectl rollout undo deployment\u002Fmy-app -n my-namespace      # Rollback\nkubectl rollout undo deployment\u002Fmy-app --to-revision=2 -n my-namespace\n\n# --- Scale manually ---\nkubectl scale deployment my-app --replicas=5 -n my-namespace\n\n# --- Inspect events (cluster-wide issues) ---\nkubectl get events -n my-namespace --sort-by='.lastTimestamp'\n\n# --- Port-forward for local debugging ---\nkubectl port-forward pod\u002F\u003Cpod-name> 8080:8080 -n my-namespace\nkubectl port-forward svc\u002Fmy-app 8080:80 -n my-namespace\n\n# --- Dry-run to validate YAML ---\nkubectl apply -f deployment.yaml --dry-run=client\nkubectl apply -f deployment.yaml --dry-run=server   # Validates against live cluster\n```\n\n### Diagnosing Common Errors\n\n```bash\n# CrashLoopBackOff: container keeps crashing\nkubectl logs \u003Cpod-name> --previous -n my-namespace  # Check crash logs\nkubectl describe pod \u003Cpod-name> -n my-namespace     # Check exit code & OOMKilled\n\n# ImagePullBackOff: can't pull image\nkubectl describe pod \u003Cpod-name> -n my-namespace     # Check Events section\n# Causes: wrong image tag, missing imagePullSecret, private registry\n\n# Pending pod: not scheduled\nkubectl describe pod \u003Cpod-name> -n my-namespace\n# Causes: insufficient resources, no matching node selector, taint\u002Ftoleration mismatch\n\n# OOMKilled: out of memory\n# Increase memory limits, check for memory leaks\nkubectl describe pod \u003Cpod-name> -n my-namespace | grep -A5 \"Last State\"\n```\n\n---\n\n## Anti-Patterns\n\n```yaml\n# BAD: Using :latest tag — non-deterministic deployments\nimage: myapp:latest\n\n# GOOD: Pin to a specific immutable tag (SHA or semver)\nimage: ghcr.io\u002Forg\u002Fmyapp:1.4.2\n# or\nimage: ghcr.io\u002Forg\u002Fmyapp@sha256:abc123...\n\n# ---\n\n# BAD: Running as root\nsecurityContext: {}    # Defaults to root\n\n# GOOD: Non-root with explicit UID\nsecurityContext:\n  runAsNonRoot: true\n  runAsUser: 1001\n\n# ---\n\n# BAD: No resource limits — one pod can starve the entire node\ncontainers:\n  - name: app\n    image: myapp:1.0.0\n    # No resources defined\n\n# GOOD: Always set requests and limits\nresources:\n  requests:\n    cpu: \"100m\"\n    memory: \"128Mi\"\n  limits:\n    cpu: \"500m\"\n    memory: \"256Mi\"\n\n# ---\n\n# BAD: Storing plaintext secrets in ConfigMaps\napiVersion: v1\nkind: ConfigMap\ndata:\n  DB_PASSWORD: \"mysecretpassword\"   # NEVER — use Secret or external secrets manager\n\n# ---\n\n# BAD: ClusterAdmin for application service accounts\napiVersion: rbac.authorization.k8s.io\u002Fv1\nkind: ClusterRoleBinding\nroleRef:\n  kind: ClusterRole\n  name: cluster-admin    # Grants god-mode to your app\n\n# ---\n\n# BAD: minAvailable: 0 in PDB — defeats the purpose\nspec:\n  minAvailable: 0\n\n# ---\n\n# BAD: restartPolicy: Always in a Job (causes infinite restart loop)\nspec:\n  restartPolicy: Always   # Use OnFailure or Never for Jobs\n```\n\n---\n\n## Best Practices Checklist\n\n### Security\n- [ ] Container runs as non-root (`runAsNonRoot: true`, `runAsUser` set)\n- [ ] `readOnlyRootFilesystem: true` with `emptyDir` for writable paths\n- [ ] `allowPrivilegeEscalation: false`\n- [ ] All capabilities dropped (`capabilities.drop: [ALL]`)\n- [ ] Dedicated ServiceAccount per app, not `default`\n- [ ] `automountServiceAccountToken: false` unless needed\n- [ ] RBAC follows least privilege (use `Role`, not `ClusterRole` unless needed)\n- [ ] Secrets managed via Sealed Secrets or External Secrets Operator\n\n### Reliability\n- [ ] All 3 probe types configured (startup + liveness + readiness)\n- [ ] Resource requests AND limits set on every container\n- [ ] `minReplicas: 2+` for any production workload\n- [ ] PodDisruptionBudget defined for stateful or critical services\n- [ ] `RollingUpdate` strategy with `maxUnavailable: 0`\n- [ ] HPA configured for variable-load services\n\n### Observability\n- [ ] App exposes `\u002Fhealth` (liveness) and `\u002Fready` (readiness) endpoints\n- [ ] Structured JSON logging (no PII in logs)\n- [ ] Resource labels: `app`, `version`, `environment`\n\n---\n\n## Related Skills\n\n- `docker-patterns` — Multi-stage Dockerfiles and image security\n- `deployment-patterns` — CI\u002FCD pipelines, rollback strategy, health check endpoints\n- `security-review` — Broader security hardening context\n- `git-workflow` — GitOps integration with K8s (ArgoCD \u002F Flux patterns)\n","# Kubernetes Patterns\n\nProduction-grade Kubernetes patterns for deploying, managing, and debugging workloads reliably.\n\n## When to Activate\n\n- Writing Kubernetes manifests (Deployments, Services, Ingress, Jobs)\n- Configuring resource requests\u002Flimits, liveness\u002Freadiness probes\n- Setting up RBAC, namespaces, or ServiceAccounts\n- Managing configuration and secrets in K8s\n- Debugging CrashLoopBackOff, OOMKilled, pending pods, or image pull errors\n- Configuring HPA (Horizontal Pod Autoscaler) or PodDisruptionBudgets\n- Reviewing K8s YAML for security or correctness\n\n## When to Use\n\n> Same as **When to Activate** above. This alias satisfies repo skill-format conventions. Use this skill any time you are writing, reviewing, or debugging Kubernetes YAML and workloads.\n\n## How It Works\n\nThis skill provides **copy-pasteable, production-grade YAML patterns** and **kubectl debugging commands** organized by task:\n\n1. **Deployment template** — A fully configured production `Deployment` with security context, rolling update strategy, all three probe types, resource limits, and environment injection from ConfigMap\u002FSecret.\n2. **Probes** — Decision table for startup vs liveness vs readiness, with correct `failureThreshold × periodSeconds` math.\n3. **Services & Ingress** — ClusterIP, LoadBalancer, and TLS Ingress patterns with cert-manager annotations.\n4. **ConfigMaps & Secrets** — `envFrom`, file-mount, and external secrets guidance.\n5. **Resource management** — Requests vs limits rules of thumb by workload type (web API, JVM, worker, sidecar).\n6. **RBAC** — Least-privilege ServiceAccount → Role → RoleBinding chain.\n7. **HPA & PDB** — Autoscaling and node-drain safety configurations.\n8. **Jobs & CronJobs** — One-off and scheduled workload patterns with correct `restartPolicy`.\n9. **kubectl cheatsheet** — Logs, exec, rollback, port-forward, dry-run, and common error diagnosis commands.\n10. **Anti-patterns & checklist** — What NOT to do, and a security\u002Freliability\u002Fobservability checklist.\n\n## Examples\n\nSee the sections below for complete, runnable examples. Quick references:\n\n| Task | Jump to |\n|------|---------|\n| Full production Deployment YAML | [Core Workload Patterns](#core-workload-patterns) |\n| Probe configuration | [Probes](#probes--liveness-readiness-startup) |\n| RBAC least-privilege setup | [RBAC](#rbac--roles-and-serviceaccounts) |\n| Debug a CrashLoopBackOff | [kubectl Debugging Cheatsheet](#kubectl-debugging-cheatsheet) |\n| Autoscaling | [HPA](#horizontal-pod-autoscaler-hpa) |\n\n---\n\n## Core Workload Patterns\n\n### Deployment — Production Template\n\n```yaml\napiVersion: apps\u002Fv1\nkind: Deployment\nmetadata:\n  name: my-app\n  namespace: my-namespace\n  labels:\n    app: my-app\n    version: \"1.0.0\"\nspec:\n  replicas: 3\n  selector:\n    matchLabels:\n      app: my-app\n  strategy:\n    type: RollingUpdate\n    rollingUpdate:\n      maxSurge: 1          # Allow 1 extra pod during update\n      maxUnavailable: 0    # Never reduce below desired count\n  template:\n    metadata:\n      labels:\n        app: my-app\n        version: \"1.0.0\"\n    spec:\n      # Security context at pod level\n      securityContext:\n        runAsNonRoot: true\n        runAsUser: 1001\n        fsGroup: 1001\n\n      # Graceful shutdown\n      terminationGracePeriodSeconds: 30\n\n      containers:\n        - name: my-app\n          image: ghcr.io\u002Forg\u002Fmy-app:1.0.0   # Never use :latest\n          imagePullPolicy: IfNotPresent\n\n          ports:\n            - containerPort: 8080\n              protocol: TCP\n\n          # Resource requests AND limits are both required\n          resources:\n            requests:\n              cpu: \"100m\"\n              memory: \"128Mi\"\n            limits:\n              cpu: \"500m\"\n              memory: \"256Mi\"\n\n          # Container security context\n          securityContext:\n            allowPrivilegeEscalation: false\n            readOnlyRootFilesystem: true\n            capabilities:\n              drop:\n                - ALL\n\n          # Probes (see Probes section below)\n          startupProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            failureThreshold: 30\n            periodSeconds: 5\n          livenessProbe:\n            httpGet:\n              path: \u002Fhealth\n              port: 8080\n            initialDelaySeconds: 0\n            periodSeconds: 30\n            failureThreshold: 3\n          readinessProbe:\n            httpGet:\n              path: \u002Fready\n              port: 8080\n            initialDelaySeconds: 5\n            periodSeconds: 10\n            failureThreshold: 2\n\n          # Environment from ConfigMap and Secret\n          envFrom:\n            - configMapRef:\n                name: my-app-config\n          env:\n            - name: DB_PASSWORD\n              valueFrom:\n                secretKeyRef:\n                  name: my-app-secrets\n                  key: db-password\n\n          # Writable tmp directory when readOnlyRootFilesystem: true\n          volumeMounts:\n            - name: tmp\n              mountPath: \u002Ftmp\n\n      volumes:\n        - name: tmp\n          emptyDir: {}\n```\n\n---\n\n## Probes — Liveness, Readiness, Startup\n\nUnderstanding when to use each probe is critical:\n\n| Probe | Failure Action | Use For |\n|-------|---------------|---------|\n| `startupProbe` | Kills container if slow to start | Slow-starting apps (JVM, Python) |\n| `livenessProbe` | Restarts container | Deadlock \u002F hung process detection |\n| `readinessProbe` | Removes from Service endpoints | Temporary unavailability (DB reconnect) |\n\n```yaml\n# Correct pattern: startupProbe covers slow startup,\n# then liveness\u002Freadiness take over\nstartupProbe:\n  httpGet:\n    path: \u002Fhealth\n    port: 8080\n  failureThreshold: 30  # 30 * 5s = 150s max startup time\n  periodSeconds: 5\n\nlivenessProbe:\n  httpGet:\n    path: \u002Fhealth\n    port: 8080\n  periodSeconds: 30\n  failureThreshold: 3   # 3 * 30s = 90s before restart\n\nreadinessProbe:\n  httpGet:\n    path: \u002Fready         # Separate endpoint: checks DB, cache, etc.\n    port: 8080\n  periodSeconds: 10\n  failureThreshold: 2\n```\n\n```yaml\n# WRONG: initialDelaySeconds without startupProbe\n# If the app takes 60s to start, set a startupProbe instead\nlivenessProbe:\n  httpGet:\n    path: \u002Fhealth\n    port: 8080\n  initialDelaySeconds: 60   # BAD: Arbitrary wait, race condition\n```\n\n---\n\n## Services and Ingress\n\n### Service Types\n\n```yaml\n# ClusterIP (default) — internal-only\napiVersion: v1\nkind: Service\nmetadata:\n  name: my-app\n  namespace: my-namespace\nspec:\n  selector:\n    app: my-app\n  ports:\n    - port: 80\n      targetPort: 8080\n      protocol: TCP\n  type: ClusterIP\n```\n\n```yaml\n# LoadBalancer — external traffic (cloud providers)\nspec:\n  type: LoadBalancer\n  ports:\n    - port: 443\n      targetPort: 8080\n```\n\n### Ingress with TLS\n\n```yaml\napiVersion: networking.k8s.io\u002Fv1\nkind: Ingress\nmetadata:\n  name: my-app\n  namespace: my-namespace\n  annotations:\n    nginx.ingress.kubernetes.io\u002Fssl-redirect: \"true\"\n    cert-manager.io\u002Fcluster-issuer: \"letsencrypt-prod\"\nspec:\n  ingressClassName: nginx\n  tls:\n    - hosts:\n        - myapp.example.com\n      secretName: my-app-tls\n  rules:\n    - host: myapp.example.com\n      http:\n        paths:\n          - path: \u002F\n            pathType: Prefix\n            backend:\n              service:\n                name: my-app\n                port:\n                  number: 80\n```\n\n---\n\n## ConfigMaps and Secrets\n\n### ConfigMap — Non-sensitive configuration\n\n```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n  name: my-app-config\n  namespace: my-namespace\ndata:\n  LOG_LEVEL: \"info\"\n  APP_ENV: \"production\"\n  MAX_CONNECTIONS: \"100\"\n  # Mount as a file for complex config\n  app.yaml: |\n    server:\n      port: 8080\n      timeout: 30s\n```\n\n```yaml\n# Mount ConfigMap as a file\nvolumes:\n  - name: config\n    configMap:\n      name: my-app-config\n      items:\n        - key: app.yaml\n          path: app.yaml\nvolumeMounts:\n  - name: config\n    mountPath: \u002Fetc\u002Fapp\n    readOnly: true\n```\n\n### Secrets — Sensitive data\n\n```bash\n# Create secret from literal (CLI, then store in Vault\u002FSOPS)\nkubectl create secret generic my-app-secrets \\\n  --from-literal=db-password='s3cr3t' \\\n  --namespace=my-namespace \\\n  --dry-run=client -o yaml | kubectl apply -f -\n```\n\n```yaml\napiVersion: v1\nkind: Secret\nmetadata:\n  name: my-app-secrets\n  namespace: my-namespace\ntype: Opaque\n# Values are base64-encoded (NOT encrypted — use Sealed Secrets or ESO for real encryption)\ndata:\n  db-password: czNjcjN0  # base64 of 's3cr3t'\n```\n\n> **Important:** Raw Kubernetes Secrets are only base64-encoded, not encrypted at rest unless your cluster has encryption configured. Use [Sealed Secrets](https:\u002F\u002Fgithub.com\u002Fbitnami-labs\u002Fsealed-secrets) or [External Secrets Operator](https:\u002F\u002Fexternal-secrets.io) for production.\n\n---\n\n## Resource Requests and Limits\n\n```yaml\nresources:\n  requests:       # Scheduler uses this to place the pod\n    cpu: \"100m\"   # 100 millicores = 0.1 CPU\n    memory: \"128Mi\"\n  limits:         # Container is killed\u002Fthrottled above this\n    cpu: \"500m\"\n    memory: \"256Mi\"\n```\n\n**Rules of thumb:**\n\n| Workload Type | CPU Request | Memory Request | Notes |\n|---------------|-------------|----------------|-------|\n| Web API | 100–250m | 128–256Mi | Set limits 2-4x requests |\n| Worker\u002Fconsumer | 250–500m | 256–512Mi | Memory limit = request for predictability |\n| JVM app | 500m–1 | 512Mi–2Gi | Allow headroom above `-Xmx` for JVM overhead |\n| Sidecar | 10–50m | 32–64Mi | Keep minimal |\n\n```yaml\n# WRONG: No requests or limits — unpredictable scheduling, OOM evictions\ncontainers:\n  - name: app\n    image: myapp:latest\n    # Missing resources: {} — this is dangerous in production\n\n# WRONG: Limits without requests — requests default to limits, over-reserves capacity\nresources:\n  limits:\n    cpu: \"2\"\n    memory: \"1Gi\"\n  # requests missing — will default to limits values\n```\n\n---\n\n## RBAC — Roles and ServiceAccounts\n\n### Principle of Least Privilege\n\n**Two patterns depending on whether the app calls the Kubernetes API:**\n\n#### Pattern A — App does NOT need the Kubernetes API (most apps)\n\nDisable token automounting on the ServiceAccount. The Role\u002FRoleBinding are not needed.\n\n```yaml\n# ServiceAccount with token disabled — safest default\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: my-app-sa\n  namespace: my-namespace\nautomountServiceAccountToken: false   # No K8s API token injected into pods\n```\n\n```yaml\n# Reference in Deployment — no token, no API access\nspec:\n  template:\n    spec:\n      serviceAccountName: my-app-sa\n      automountServiceAccountToken: false   # Belt-and-suspenders: also set at pod level\n```\n\n#### Pattern B — App DOES need the Kubernetes API (operators, controllers, config watchers)\n\nEnable the token and grant only the permissions actually required.\n\n```yaml\n# 1. ServiceAccount — enable token for this SA\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n  name: my-app-sa\n  namespace: my-namespace\nautomountServiceAccountToken: true    # Token required: app calls K8s API\n```\n\n```yaml\n# 2. Role — grant only what the app needs (namespace-scoped)\napiVersion: rbac.authorization.k8s.io\u002Fv1\nkind: Role\nmetadata:\n  name: my-app-role\n  namespace: my-namespace\nrules:\n  - apiGroups: [\"\"]\n    resources: [\"configmaps\"]\n    verbs: [\"get\", \"list\", \"watch\"]    # Read-only, specific resource\n  - apiGroups: [\"\"]\n    resources: [\"secrets\"]\n    resourceNames: [\"my-app-secrets\"]  # Restrict to specific secret by name\n    verbs: [\"get\"]\n```\n\n```yaml\n# 3. Bind Role to ServiceAccount\napiVersion: rbac.authorization.k8s.io\u002Fv1\nkind: RoleBinding\nmetadata:\n  name: my-app-rolebinding\n  namespace: my-namespace\nsubjects:\n  - kind: ServiceAccount\n    name: my-app-sa\n    namespace: my-namespace\nroleRef:\n  kind: Role\n  apiGroup: rbac.authorization.k8s.io\n  name: my-app-role\n```\n\n```yaml\n# 4. Reference SA in Deployment\nspec:\n  template:\n    spec:\n      serviceAccountName: my-app-sa\n      # automountServiceAccountToken defaults to true from SA — token is injected\n```\n\n---\n\n## Horizontal Pod Autoscaler (HPA)\n\n```yaml\napiVersion: autoscaling\u002Fv2\nkind: HorizontalPodAutoscaler\nmetadata:\n  name: my-app-hpa\n  namespace: my-namespace\nspec:\n  scaleTargetRef:\n    apiVersion: apps\u002Fv1\n    kind: Deployment\n    name: my-app\n  minReplicas: 2      # Always at least 2 for HA\n  maxReplicas: 10\n  metrics:\n    - type: Resource\n      resource:\n        name: cpu\n        target:\n          type: Utilization\n          averageUtilization: 70    # Scale up when avg CPU > 70%\n    - type: Resource\n      resource:\n        name: memory\n        target:\n          type: Utilization\n          averageUtilization: 80\n```\n\n> HPA requires `resources.requests` to be set on all containers — it calculates utilization as `current \u002F request`.\n\n---\n\n## PodDisruptionBudget (PDB)\n\nPrevent too many pods going down during node drains or rolling updates:\n\n```yaml\napiVersion: policy\u002Fv1\nkind: PodDisruptionBudget\nmetadata:\n  name: my-app-pdb\n  namespace: my-namespace\nspec:\n  minAvailable: 2           # OR use maxUnavailable: 1\n  selector:\n    matchLabels:\n      app: my-app\n```\n\n---\n\n## Namespaces and Multi-Tenancy\n\n```bash\n# Create namespace with resource quotas\nkubectl create namespace my-namespace\n\n# Apply ResourceQuota to limit namespace consumption\nkubectl apply -f - \u003C\u003CEOF\napiVersion: v1\nkind: ResourceQuota\nmetadata:\n  name: my-namespace-quota\n  namespace: my-namespace\nspec:\n  hard:\n    requests.cpu: \"4\"\n    requests.memory: 4Gi\n    limits.cpu: \"8\"\n    limits.memory: 8Gi\n    pods: \"20\"\nEOF\n```\n\n---\n\n## Jobs and CronJobs\n\n```yaml\n# One-off Job (DB migration, data processing)\napiVersion: batch\u002Fv1\nkind: Job\nmetadata:\n  name: db-migrate\n  namespace: my-namespace\nspec:\n  backoffLimit: 3          # Retry up to 3 times on failure\n  ttlSecondsAfterFinished: 3600   # Auto-delete after 1h\n  template:\n    spec:\n      restartPolicy: OnFailure    # Never for Jobs (not Always)\n      containers:\n        - name: migrate\n          image: ghcr.io\u002Forg\u002Fmy-app:1.0.0\n          command: [\"python\", \"manage.py\", \"migrate\"]\n          resources:\n            requests:\n              cpu: \"100m\"\n              memory: \"256Mi\"\n```\n\n```yaml\n# CronJob\napiVersion: batch\u002Fv1\nkind: CronJob\nmetadata:\n  name: cleanup-job\n  namespace: my-namespace\nspec:\n  schedule: \"0 2 * * *\"         # 2am daily\n  concurrencyPolicy: Forbid      # Don't run if previous still running\n  successfulJobsHistoryLimit: 3\n  failedJobsHistoryLimit: 1\n  jobTemplate:\n    spec:\n      template:\n        spec:\n          restartPolicy: OnFailure\n          containers:\n            - name: cleanup\n              image: ghcr.io\u002Forg\u002Fcleanup:1.0.0\n              resources:\n                requests:\n                  cpu: \"50m\"\n                  memory: \"64Mi\"\n```\n\n---\n\n## kubectl Debugging Cheatsheet\n\n```bash\n# --- Pod status and logs ---\nkubectl get pods -n my-namespace\nkubectl get pods -n my-namespace -o wide          # Show node assignment\nkubectl describe pod \u003Cpod-name> -n my-namespace   # Events and state details\nkubectl logs \u003Cpod-name> -n my-namespace           # Current logs\nkubectl logs \u003Cpod-name> -n my-namespace --previous  # Logs from crashed container\nkubectl logs \u003Cpod-name> -n my-namespace -c \u003Ccontainer>  # Multi-container pod\n\n# --- Execute into a running container ---\nkubectl exec -it \u003Cpod-name> -n my-namespace -- sh\nkubectl exec -it \u003Cpod-name> -n my-namespace -- bash\n\n# --- Check resource usage ---\nkubectl top pods -n my-namespace\nkubectl top nodes\n\n# --- Deployment operations ---\nkubectl rollout status deployment\u002Fmy-app -n my-namespace\nkubectl rollout history deployment\u002Fmy-app -n my-namespace\nkubectl rollout undo deployment\u002Fmy-app -n my-namespace      # Rollback\nkubectl rollout undo deployment\u002Fmy-app --to-revision=2 -n my-namespace\n\n# --- Scale manually ---\nkubectl scale deployment my-app --replicas=5 -n my-namespace\n\n# --- Inspect events (cluster-wide issues) ---\nkubectl get events -n my-namespace --sort-by='.lastTimestamp'\n\n# --- Port-forward for local debugging ---\nkubectl port-forward pod\u002F\u003Cpod-name> 8080:8080 -n my-namespace\nkubectl port-forward svc\u002Fmy-app 8080:80 -n my-namespace\n\n# --- Dry-run to validate YAML ---\nkubectl apply -f deployment.yaml --dry-run=client\nkubectl apply -f deployment.yaml --dry-run=server   # Validates against live cluster\n```\n\n### Diagnosing Common Errors\n\n```bash\n# CrashLoopBackOff: container keeps crashing\nkubectl logs \u003Cpod-name> --previous -n my-namespace  # Check crash logs\nkubectl describe pod \u003Cpod-name> -n my-namespace     # Check exit code & OOMKilled\n\n# ImagePullBackOff: can't pull image\nkubectl describe pod \u003Cpod-name> -n my-namespace     # Check Events section\n# Causes: wrong image tag, missing imagePullSecret, private registry\n\n# Pending pod: not scheduled\nkubectl describe pod \u003Cpod-name> -n my-namespace\n# Causes: insufficient resources, no matching node selector, taint\u002Ftoleration mismatch\n\n# OOMKilled: out of memory\n# Increase memory limits, check for memory leaks\nkubectl describe pod \u003Cpod-name> -n my-namespace | grep -A5 \"Last State\"\n```\n\n---\n\n## Anti-Patterns\n\n```yaml\n# BAD: Using :latest tag — non-deterministic deployments\nimage: myapp:latest\n\n# GOOD: Pin to a specific immutable tag (SHA or semver)\nimage: ghcr.io\u002Forg\u002Fmyapp:1.4.2\n# or\nimage: ghcr.io\u002Forg\u002Fmyapp@sha256:abc123...\n\n# ---\n\n# BAD: Running as root\nsecurityContext: {}    # Defaults to root\n\n# GOOD: Non-root with explicit UID\nsecurityContext:\n  runAsNonRoot: true\n  runAsUser: 1001\n\n# ---\n\n# BAD: No resource limits — one pod can starve the entire node\ncontainers:\n  - name: app\n    image: myapp:1.0.0\n    # No resources defined\n\n# GOOD: Always set requests and limits\nresources:\n  requests:\n    cpu: \"100m\"\n    memory: \"128Mi\"\n  limits:\n    cpu: \"500m\"\n    memory: \"256Mi\"\n\n# ---\n\n# BAD: Storing plaintext secrets in ConfigMaps\napiVersion: v1\nkind: ConfigMap\ndata:\n  DB_PASSWORD: \"mysecretpassword\"   # NEVER — use Secret or external secrets manager\n\n# ---\n\n# BAD: ClusterAdmin for application service accounts\napiVersion: rbac.authorization.k8s.io\u002Fv1\nkind: ClusterRoleBinding\nroleRef:\n  kind: ClusterRole\n  name: cluster-admin    # Grants god-mode to your app\n\n# ---\n\n# BAD: minAvailable: 0 in PDB — defeats the purpose\nspec:\n  minAvailable: 0\n\n# ---\n\n# BAD: restartPolicy: Always in a Job (causes infinite restart loop)\nspec:\n  restartPolicy: Always   # Use OnFailure or Never for Jobs\n```\n\n---\n\n## Best Practices Checklist\n\n### Security\n- [ ] Container runs as non-root (`runAsNonRoot: true`, `runAsUser` set)\n- [ ] `readOnlyRootFilesystem: true` with `emptyDir` for writable paths\n- [ ] `allowPrivilegeEscalation: false`\n- [ ] All capabilities dropped (`capabilities.drop: [ALL]`)\n- [ ] Dedicated ServiceAccount per app, not `default`\n- [ ] `automountServiceAccountToken: false` unless needed\n- [ ] RBAC follows least privilege (use `Role`, not `ClusterRole` unless needed)\n- [ ] Secrets managed via Sealed Secrets or External Secrets Operator\n\n### Reliability\n- [ ] All 3 probe types configured (startup + liveness + readiness)\n- [ ] Resource requests AND limits set on every container\n- [ ] `minReplicas: 2+` for any production workload\n- [ ] PodDisruptionBudget defined for stateful or critical services\n- [ ] `RollingUpdate` strategy with `maxUnavailable: 0`\n- [ ] HPA configured for variable-load services\n\n### Observability\n- [ ] App exposes `\u002Fhealth` (liveness) and `\u002Fready` (readiness) endpoints\n- [ ] Structured JSON logging (no PII in logs)\n- [ ] Resource labels: `app`, `version`, `environment`\n\n---\n\n## Related Skills\n\n- `docker-patterns` — Multi-stage Dockerfiles and image security\n- `deployment-patterns` — CI\u002FCD pipelines, rollback strategy, health check endpoints\n- `security-review` — Broader security hardening context\n- `git-workflow` — GitOps integration with K8s (ArgoCD \u002F Flux patterns)\n",{"name":5,"metadata":24,"description":7},{"origin":25},"ECC","main","a73152352c0612252131e5cf84e91312a6cf17dc","devops-cloud\u002Fkubernetes-patterns","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs","https:\u002F\u002Fgithub.com\u002FHenrique1601","https:\u002F\u002Fbezerraportifolio.netlify.app\u002F","Full Stack Developer | React, Next.js, TypeScript, Node.js & IA | Construindo produtos digitais e soluções SaaS","2026-11-15 02:56:04",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add Henrique1601\u002FSkiilsToIAs --skill kubernetes-patterns",{"tool":40,"command":41},"bunx","bunx skills add Henrique1601\u002FSkiilsToIAs --skill kubernetes-patterns",{"tool":43,"command":44},"pnpm","pnpm dlx skills add Henrique1601\u002FSkiilsToIAs --skill kubernetes-patterns","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fdevops-cloud\u002Fkubernetes-patterns\u002FSKILL.md",true,[],[49,56,63,71,78,85],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7E2ANBW9V6AVX5JXNCEAWF8","rag-architect-agent","Agente Arquiteto de RAG, Embeddings & Busca Vetorial. Especialista em design e implementação de pipelines de Retrieval-Augmented Generation de alta fidelidade: chunking semântico, modelagem pgvector no PostgreSQL (Neon\u002FSupabase), busca híbrida (cosseno + BM25), reranking, validação via TypeSafe AI e filosofia Ponytail (anti-overengineering).","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fcustom-agents\u002Frag-architect-agent\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7E29KKF8R02ZRGYE2MJM67G","rag-architecture-patterns","Padrões arquiteturais e implementação de pipelines RAG (Retrieval-Augmented Generation) de alta fidelidade para qualquer projeto ou sistema. Cobre chunking semântico, embeddings, busca híbrida (pgvector + BM25), reranking, validação via TypeSafe AI e filosofia Ponytail (anti-overengineering).","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Fai-agents\u002Frag-architecture-patterns\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":67,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7CWRA8E3BJ7CPY8N8EG28J1","skill-repair","Use this to fix and re-install agent skills that have failed installation.\nThis skill provides the necessary context and permissions to surgically update\nthe `manifest.json` after a fix has been applied.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fskill-repair\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7CWR66FZP8FA47WVZ4Z2EXC","security-scan","Scan your Claude Code configuration (.claude\u002F directory) for security vulnerabilities, misconfigurations, and injection risks using AgentShield. Checks CLAUDE.md, settings.json, MCP servers, hooks, and agent definitions.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-scan\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7CWR0QPY58QPTR1P759TFNG","security-review","Use this skill when adding authentication, handling user input, working with secrets, creating API endpoints, or implementing payment\u002Fsensitive features. Provides comprehensive security checklist and patterns.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-review\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7CWQXCE40XWT4FZ3VWZFGDP","security-bounty-hunter","Hunt for exploitable, bounty-worthy security issues in repositories. Focuses on remotely reachable vulnerabilities that qualify for real reports instead of noisy local-only findings.","https:\u002F\u002Fgithub.com\u002FHenrique1601\u002FSkiilsToIAs\u002Fblob\u002Fmain\u002Futilities\u002Fsecurity-bounty-hunter\u002FSKILL.md",[],[]]