AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Kubernetes Patterns

skill-jonathan0823-opencode-config-kubernetes-patterns · by Jonathan0823

Kubernetes deployment patterns, resource management, networking, security, and production best practices. Use when deploying containerized applications to Kubernetes, managing clusters, configuring ingress, or implementing scaling strategies.

No reviews yet
0 installs
16 views
0.0% view→install

Install

$ agentstack add skill-jonathan0823-opencode-config-kubernetes-patterns

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-jonathan0823-opencode-config-kubernetes-patterns)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Kubernetes Patterns? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Kubernetes Patterns Skill

Overview

This skill provides comprehensive Kubernetes deployment patterns for production workloads including resource management, networking configuration, security hardening, auto-scaling, and multi-environment setups.

Quick Start

Basic Deployment

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: myregistry/myapp:latest
          ports:
            - containerPort: 8080
          resources:
            requests:
              memory: "256Mi"
              cpu: "250m"
            limits:
              memory: "512Mi"
              cpu: "500m"

Service Exposure

apiVersion: v1
kind: Service
metadata:
  name: myapp
spec:
  selector:
    app: myapp
  ports:
    - port: 80
      targetPort: 8080
  type: ClusterIP

Ingress Configuration

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: myapp
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  ingressClassName: nginx
  tls:
    - hosts:
        - myapp.example.com
      secretName: myapp-tls
  rules:
    - host: myapp.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: myapp
                port:
                  number: 80

Core Concepts

1. Resource Management

  • Requests: Guaranteed resources for scheduling
  • Limits: Maximum resources allowed
  • Quality of Service: Guaranteed, Burstable, BestEffort

2. Pod Lifecycle

  • Pending: Scheduling/initialization
  • Running: All containers running
  • Succeeded: Completed successfully
  • Failed: Terminated with error
  • Unknown: State cannot be determined

3. Service Types

  • ClusterIP: Internal cluster access only
  • NodePort: Exposes port on each node
  • LoadBalancer: Cloud provider load balancer
  • ExternalName: Maps to external DNS

Production Patterns

Health Checks

livenessProbe:
  httpGet:
    path: /health
    port: 8080
  initialDelaySeconds: 30
  periodSeconds: 10
  timeoutSeconds: 5
  failureThreshold: 3

readinessProbe:
  httpGet:
    path: /ready
    port: 8080
  initialDelaySeconds: 5
  periodSeconds: 5

Graceful Shutdown

lifecycle:
  preStop:
    exec:
      command: ["/bin/sh", "-c", "sleep 15"]

t terminationGracePeriodSeconds: 60

Security Context

securityContext:
  runAsNonRoot: true
  runAsUser: 1000
  runAsGroup: 1000
  fsGroup: 1000
  readOnlyRootFilesystem: true
  allowPrivilegeEscalation: false
  seccompProfile:
    type: RuntimeDefault
  capabilities:
    drop:
      - ALL
    add:
      - NET_BIND_SERVICE

Scaling Strategies

Horizontal Pod Autoscaler

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
  name: myapp
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: myapp
  minReplicas: 3
  maxReplicas: 20
  metrics:
    - type: Resource
      resource:
        name: cpu
        target:
          type: Utilization
          averageUtilization: 70
    - type: Resource
      resource:
        name: memory
        target:
          type: Utilization
          averageUtilization: 80
  behavior:
    scaleUp:
      stabilizationWindowSeconds: 60
      policies:
        - type: Percent
          value: 100
          periodSeconds: 15
    scaleDown:
      stabilizationWindowSeconds: 300
      policies:
        - type: Percent
          value: 10
          periodSeconds: 60

Vertical Pod Autoscaler

apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: myapp
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: myapp
  updatePolicy:
    updateMode: "Auto"
  resourcePolicy:
    containerPolicies:
      - containerName: myapp
        minAllowed:
          cpu: 50m
          memory: 100Mi
        maxAllowed:
          cpu: 1000m
          memory: 1Gi
        controlledResources: ["cpu", "memory"]

Detailed References

See comprehensive guides in references/:

  • [Deployment Patterns](references/deployment-patterns.md) - Deployments, StatefulSets, DaemonSets, Jobs
  • [Networking](references/networking.md) - Services, Ingress, Network Policies, Service Mesh
  • [Security](references/security.md) - RBAC, Pod Security, Network Policies, Secrets
  • [Storage](references/storage.md) - Volumes, Persistent Volumes, ConfigMaps, StatefulSets

When to Use This Skill

Use this skill when:

  • Deploying containerized applications to Kubernetes
  • Configuring auto-scaling and resource management
  • Setting up ingress and load balancing
  • Implementing security policies and RBAC
  • Managing secrets and configurations
  • Troubleshooting pod issues
  • Planning cluster capacity
  • Migrating from Docker Compose to Kubernetes

Related Skills

  • @docker-patterns - Containerization basics
  • @ci-cd-pipelines - CI/CD with Kubernetes
  • @security-best-practices - Container and cluster security
  • @observability-monitoring - Monitoring Kubernetes workloads
  • @microservices-patterns - Service mesh and distributed systems

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.