---
name: "polaris-k8s-best-practices"
description: "Validate Kubernetes workloads against security, efficiency, and reliability standards."
metadata:
  author: "Fairwinds"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "audit kubernetes with polaris"
  - "check pod security polaris"
  - "improve polaris cluster score"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Fairwinds Polaris Kubernetes Best Practices Auditing

Audits Kubernetes clusters and manifest files with Fairwinds Polaris: checking pod security standards (PSS), readiness/liveness probes, container security contexts, and cluster health scores.

## When to Invoke
Invoke this skill whenever you need to:
- audit kubernetes with polaris
- check pod security polaris
- improve polaris cluster score

## Execution SOP & Rules
1. Run polaris audit --audit-path manifests/ to calculate the workload compliance score.
2. Ensure every container has configured liveness and readiness health checks.
3. Disallow hostNetwork, hostPID, and hostIPC across workload specifications.
4. Configure polaris dashboard locally to visualize infrastructure health recommendations.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
