k8s-deployment — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited k8s-deployment (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Any task involving Kubernetes deployments: writing or modifying manifests, Helm charts, configuring autoscaling, probes, network policies, ingress, resource management, or deployment strategies for containerized workloads.
kubectl get nodes -o wide # Cluster capacity
kubectl top nodes # Current resource usage
kubectl get namespaces # Available namespaces
kubectl get resourcequotas -A # Existing quotas#### Deployment Strategies
apiVersion: apps/v1
kind: Deployment
metadata:
name: my-service
spec:
replicas: 3
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 1 # Max extra pods during update
maxUnavailable: 0 # Zero downtime: never kill before new is ready
selector:
matchLabels:
app: my-service
template:
metadata:
labels:
app: my-service
spec:
containers:
- name: my-service
image: registry.example.com/my-service:v1.2.3
# ... rest of spec strategy:
type: RecreateDeploy new version as separate deployment, switch service selector when healthy.
Route percentage of traffic to new version, promote or rollback based on metrics.
#### Helm Chart Structure
my-chart/
Chart.yaml # Chart metadata (name, version, appVersion)
values.yaml # Default configuration values
values-staging.yaml # Environment-specific overrides
values-prod.yaml
templates/
_helpers.tpl # Template helpers and labels
deployment.yaml
service.yaml
hpa.yaml
ingress.yaml
configmap.yaml
secret.yaml # Reference to external secrets, not raw values
pdb.yaml
networkpolicy.yaml
serviceaccount.yaml
tests/
test-connection.yaml apiVersion: v2
name: my-service
version: 1.0.0 # Chart version (bump on chart changes)
appVersion: "1.2.3" # Application version (matches container tag) replicaCount: 3
image:
repository: registry.example.com/my-service
tag: "" # Overridden per environment
pullPolicy: IfNotPresent
resources:
requests:
cpu: 100m
memory: 128Mi
limits:
cpu: 500m
memory: 512Mi#### HPA (Horizontal Pod Autoscaler)
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
name: my-service
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: my-service
minReplicas: 3 # Never go below 3 for production
maxReplicas: 20 # Cap to prevent runaway scaling
metrics:
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: 70 # Scale up at 70% CPU
- type: Resource
resource:
name: memory
target:
type: Utilization
averageUtilization: 80
behavior:
scaleDown:
stabilizationWindowSeconds: 300 # Wait 5min before scaling down
policies:
- type: Percent
value: 25
periodSeconds: 60 # Max 25% reduction per minute
scaleUp:
stabilizationWindowSeconds: 30
policies:
- type: Percent
value: 100
periodSeconds: 30 # Can double pods in 30s - type: Pods
pods:
metric:
name: http_requests_per_second
target:
type: AverageValue
averageValue: "1000"#### Pod Disruption Budget (PDB)
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
name: my-service-pdb
spec:
minAvailable: 2 # Always keep at least 2 pods running
# OR: maxUnavailable: 1 # At most 1 pod can be down
selector:
matchLabels:
app: my-servicenode drains can take down all pods simultaneously.
minAvailable = replicas - 1 or use maxUnavailable: 1.#### Probes (Health Checks)
containers:
- name: my-service
livenessProbe: # Is the process alive? Restart if failing.
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 15
periodSeconds: 10
failureThreshold: 3 # 3 failures = restart
timeoutSeconds: 3
readinessProbe: # Is it ready for traffic? Remove from LB if failing.
httpGet:
path: /readyz
port: 8080
initialDelaySeconds: 5
periodSeconds: 5
failureThreshold: 2
timeoutSeconds: 3
startupProbe: # For slow starters. Disables liveness/readiness until passing.
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 0
periodSeconds: 5
failureThreshold: 30 # 30 * 5s = 150s max startup time
timeoutSeconds: 3#### Resource Requests and Limits
resources:
requests: # Scheduling guarantee (must be available)
cpu: 100m # 0.1 CPU cores
memory: 256Mi # 256 MiB RAM
limits: # Hard ceiling (OOMKilled if exceeded for memory)
cpu: 1000m # 1 CPU core (throttled, not killed)
memory: 512Mi # OOMKilled if exceededThis is acceptable if the cluster has sufficient headroom and resource quotas protect namespaces.
#### Network Policies
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
namespace: my-namespace
spec:
podSelector: {} # Applies to all pods in namespace
policyTypes:
- Ingress
- Egress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: allow-my-service-ingress
namespace: my-namespace
spec:
podSelector:
matchLabels:
app: my-service
policyTypes:
- Ingress
ingress:
- from:
- namespaceSelector:
matchLabels:
name: ingress-nginx
ports:
- protocol: TCP
port: 8080#### Ingress Configuration
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-service-ingress
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
nginx.ingress.kubernetes.io/rate-limit: "100"
nginx.ingress.kubernetes.io/rate-limit-window: "1m"
spec:
ingressClassName: nginx
tls:
- hosts:
- api.example.com
secretName: api-tls-cert
rules:
- host: api.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-service
port:
number: 80 helm template my-chart ./chart -f values-prod.yaml | kubectl apply --dry-run=client -f -
kubectl diff -f manifest.yaml # Show what would change kubectl rollout status deployment/my-service --timeout=300s
kubectl get pods -l app=my-service -o wide
kubectl top pods -l app=my-service kubectl exec -it <pod> -- curl -s localhost:8080/healthz
kubectl exec -it <pod> -- curl -s localhost:8080/readyz # From a test pod, confirm blocked traffic is actually blocked
kubectl run test --rm -it --image=busybox -- wget -qO- --timeout=3 http://my-service:8080 kubectl drain <node> --ignore-daemonsets --dry-run=clientlatest tag in production (non-reproducible deployments).Before marking a task done when this skill was active:
kubectl apply --dry-run=client.latest).kubectl rollout status.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.