File contents Kubernetes Manifests
Complete Deployment Stack
apiVersion: apps/v1
kind: Deployment
metadata:
name: app
labels:
app: app
spec:
replicas: 3
selector:
matchLabels:
app: app
template:
metadata:
labels:
app: app
spec:
containers:
- name: app
image: ghcr.io/org/app:latest
ports:
- containerPort: 3000
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"
livenessProbe:
httpGet:
path: /health
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: app-secrets
key: database-url
---
apiVersion: v1
kind: Service
metadata:
name: app
spec:
selector:
app: app
ports:
- port: 80
targetPort: 3000
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: app
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
spec:
ingressClassName: nginx
tls:
- hosts: [app.example.com]
secretName: app-tls
rules:
- host: app.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: app
port:
number: 80
ConfigMap and Secrets
apiVersion: v1
kind: ConfigMap
metadata:
name: app-config
data:
LOG_LEVEL: "info"
API_TIMEOUT: "30s"
---
apiVersion: v1
kind: Secret
metadata:
name: app-secrets
type: Opaque
stringData:
database-url: "postgres://user:pass@host:5432/db"
Horizontal Pod Autoscaler
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: app-hpa
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: app
minReplicas: 2
maxReplicas: 10
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70
Quick Reference
Resource
Purpose
Deployment
Manages ReplicaSets, rolling updates
Service
Internal load balancing, DNS
Ingress
External HTTP/HTTPS routing
ConfigMap
Non-sensitive configuration
Secret
Sensitive data (base64 encoded)
HPA
Auto-scaling based on metrics
PVC
Persistent storage claims
Common kubectl Commands
kubectl apply -f deployment.yaml
kubectl get pods -l app=app
kubectl describe pod <pod-name>
kubectl logs -f <pod-name>
kubectl exec -it <pod-name> -- /bin/sh
kubectl rollout status deployment/app
kubectl rollout undo deployment/app
1 --- 2 name: 504-kubernetes-7da17b4e 3 description: Kubernetes Manifests 4 --- 5 # Kubernetes Manifests 6 7 ## Complete Deployment Stack 8 9 ```yaml 10 apiVersion: apps/v1 11 kind: Deployment 12 metadata: 13 name: app 14 labels: 15 app: app 16 spec: 17 replicas: 3 18 selector: 19 matchLabels: 20 app: app 21 template: 22 metadata: 23 labels: 24 app: app 25 spec: 26 containers: 27 - name: app 28 image: ghcr.io/org/app:latest 29 ports: 30 - containerPort: 3000 31 resources: 32 requests: 33 memory: "128Mi" 34 cpu: "100m" 35 limits: 36 memory: "256Mi" 37 cpu: "500m" 38 livenessProbe: 39 httpGet: 40 path: /health 41 port: 3000 42 initialDelaySeconds: 10 43 periodSeconds: 10 44 readinessProbe: 45 httpGet: 46 path: /ready 47 port: 3000 48 initialDelaySeconds: 5 49 periodSeconds: 5 50 env: 51 - name: DATABASE_URL 52 valueFrom: 53 secretKeyRef: 54 name: app-secrets 55 key: database-url 56 --- 57 apiVersion: v1 58 kind: Service 59 metadata: 60 name: app 61 spec: 62 selector: 63 app: app 64 ports: 65 - port: 80 66 targetPort: 3000 67 type: ClusterIP 68 --- 69 apiVersion: networking.k8s.io/v1 70 kind: Ingress 71 metadata: 72 name: app 73 annotations: 74 cert-manager.io/cluster-issuer: letsencrypt-prod 75 spec: 76 ingressClassName: nginx 77 tls: 78 - hosts: [app.example.com] 79 secretName: app-tls 80 rules: 81 - host: app.example.com 82 http: 83 paths: 84 - path: / 85 pathType: Prefix 86 backend: 87 service: 88 name: app 89 port: 90 number: 80 91 ``` 92 93 ## ConfigMap and Secrets 94 95 ```yaml 96 apiVersion: v1 97 kind: ConfigMap 98 metadata: 99 name: app-config 100 data: 101 LOG_LEVEL: "info" 102 API_TIMEOUT: "30s" 103 --- 104 apiVersion: v1 105 kind: Secret 106 metadata: 107 name: app-secrets 108 type: Opaque 109 stringData: 110 database-url: "postgres://user:pass@host:5432/db" 111 ``` 112 113 ## Horizontal Pod Autoscaler 114 115 ```yaml 116 apiVersion: autoscaling/v2 117 kind: HorizontalPodAutoscaler 118 metadata: 119 name: app-hpa 120 spec: 121 scaleTargetRef: 122 apiVersion: apps/v1 123 kind: Deployment 124 name: app 125 minReplicas: 2 126 maxReplicas: 10 127 metrics: 128 - type: Resource 129 resource: 130 name: cpu 131 target: 132 type: Utilization 133 averageUtilization: 70 134 ``` 135 136 ## Quick Reference 137 138 | Resource | Purpose | 139 |----------|---------| 140 | Deployment | Manages ReplicaSets, rolling updates | 141 | Service | Internal load balancing, DNS | 142 | Ingress | External HTTP/HTTPS routing | 143 | ConfigMap | Non-sensitive configuration | 144 | Secret | Sensitive data (base64 encoded) | 145 | HPA | Auto-scaling based on metrics | 146 | PVC | Persistent storage claims | 147 148 ## Common kubectl Commands 149 150 ```bash 151 kubectl apply -f deployment.yaml 152 kubectl get pods -l app=app 153 kubectl describe pod <pod-name> 154 kubectl logs -f <pod-name> 155 kubectl exec -it <pod-name> -- /bin/sh 156 kubectl rollout status deployment/app 157 kubectl rollout undo deployment/app 158 ```
tools-only/X-Skills/tree/main/development/web/504-kubernetes_7da17b4e commit 1bb44f7c65
Frequently asked questions How do I install the 504 Kubernetes 7da17b4e skill? Run npx skillmds@latest add tools-only/504-kubernetes-7da17b4e in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the 504 Kubernetes 7da17b4e skill do? Kubernetes Manifests It is listed under DevOps & Infra on SkillMD.
Is 504 Kubernetes 7da17b4e safe to use? This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with 504 Kubernetes 7da17b4e? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is 504 Kubernetes 7da17b4e free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published 504 Kubernetes 7da17b4e? tools-only (@tools-only) published this skill. Their other Agent Skills are listed on their SkillMD profile.