eks-workload-best-practice-assessment
Original:🇺🇸 English
Translated
Use when assessing or reviewing Kubernetes workloads running on Amazon EKS for best practice compliance, including pod configuration, security posture, observability, networking, storage, image security, and CI/CD practices. Requires kubectl and awscli access to the target cluster. Triggers on "assess my EKS workloads", "check k8s best practices", "assess container workloads", "evaluate pod security", "workload compliance check", "EKS workload assessment", "检查 K8s 工作负载", "评估容器最佳实践", "审计 EKS 应用", "检查 Pod 配置", "容器安全评估", "工作负载合规检查".
4installs
Sourcepanlm/skills
Added on
NPX Install
npx skill4agent add panlm/skills eks-workload-best-practice-assessmentTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →EKS Workload Best Practice Assessment
Assess Kubernetes workloads on Amazon EKS against best practices from K8s official documentation
and the EKS Best Practices Guide. Covers 8 dimensions: workload configuration, security,
observability, networking, storage, EKS platform integration, CI/CD, and image security.
Prerequisites
This skill requires:
- aws knowledge mcp server tools:
- — search AWS documentation
aws___search_documentation - — read full documentation pages
aws___read_documentation - — get related documentation
aws___recommend
- context7 MCP tools:
- — resolve K8s library ID
context7_resolve-library-id - — query K8s documentation
context7_query-docs
- AWS CLI () — configured with read access to the target EKS cluster and ECR
aws - kubectl — configured to access the target EKS cluster
- jq — for parsing JSON output from AWS CLI and kubectl commands
Scope Boundary
This skill focuses on workload-level checks — items that require or in-cluster
inspection. It complements which covers the infrastructure layer
(control plane, node groups, addons, etc.).
kubectlaws-best-practice-research| This Skill (Workload Layer) | aws-best-practice-research (Infra Layer) |
|---|---|
| Pod resource requests/limits | Control plane configuration |
| Probes (liveness/readiness/startup) | Node group sizing and AZ distribution |
| PDB, topology constraints | Addon versions |
| Pod security context, PSA | Secrets envelope encryption |
| Network Policies | Cluster networking (VPC, subnets) |
| Service Accounts, RBAC | Authentication mode, Access Entries |
| Container image scanning | GuardDuty EKS protection |
| HPA/VPA/Karpenter workload config | Karpenter/CA infrastructure config |
Workflow
Step 1: Confirm Assessment Scope
Determine from user input:
- Cluster name and AWS Region
- Assessment scope:
- Full cluster — assess all namespaces (excluding ,
kube-system,kube-publicby default)kube-node-lease - Specific namespaces — user-specified list
- Specific workloads — user-specified Deployments/StatefulSets
- Full cluster — assess all namespaces (excluding
- Include infrastructure layer? — whether to also invoke for the EKS infrastructure layer and merge results (default: yes)
aws-best-practice-research
If the user provides only a cluster name, default to full cluster assessment.
Step 2: Environment Detection & Version Awareness
Run the following commands to detect the environment:
bash
# Cluster info via AWS CLI
aws eks describe-cluster --name {CLUSTER} --region {REGION}
# K8s version
kubectl version --output=json
# Node distribution
kubectl get nodes -o wide --no-headersRecord:
- K8s server version (e.g., 1.30) — used for version-aware filtering
- EKS platform version (e.g., eks.15)
- Node count and AZ distribution
- Node instance types
Version-aware filtering rules (apply in Step 3):
- K8s >= 1.25: Check Pod Security Admission (PSA), skip PodSecurityPolicy (PSP)
- K8s < 1.25: Check PSP, note PSA as upgrade recommendation
- K8s >= 1.20: Check Startup Probes
- K8s >= 1.19: Check Topology Spread Constraints
- K8s >= 1.29 + VPC CNI >= 1.21.1: Check Admin Network Policies
- EKS with Pod Identity available: Prefer Pod Identity over IRSA
Step 3: Dynamic Best Practice Research
Research the latest best practices using context7 and aws-knowledge-mcp-server.
Run all queries sequentially (one at a time) to avoid rate limiting.
For each of the 8 assessment dimensions, execute the search queries defined in
. The general flow per dimension is:
references/search-queries.md- Query context7 () for K8s official best practices
/websites/kubernetes_io - Query aws-knowledge-mcp-server for EKS-specific best practices
- Read key documentation pages from search results (max 2-3 pages per dimension)
- Extract check items with specific thresholds and conditions
After all research is complete, merge results with the baseline framework in
to ensure no critical dimension is missed.
references/check-dimensions.mdApply version-aware filtering from Step 2 to remove inapplicable items and add
version-specific recommendations.
Rate limit protection: If any MCP request returns "Too many requests", wait 5 seconds
and retry once. If it fails again, skip and continue. Sequential execution is mandatory.
Step 4: Infrastructure Layer Assessment (Optional)
If infrastructure layer assessment is included (default: yes):
- Invoke the skill for the EKS cluster
aws-best-practice-research - Store the infrastructure-layer checklist and assessment results
- These will be merged into the final report in Step 7
If the user opts out, skip this step.
Step 5: Workload Data Collection
Collect workload configurations using . Independent commands can run in parallel
(they are not subject to MCP rate limits).
kubectlSee for the complete command list. Key data to collect:
references/kubectl-assessment-commands.mdbash
# Core workloads
kubectl get deployments,statefulsets,daemonsets,jobs,cronjobs --all-namespaces -o json
# Pod specifications (within workloads above)
# Already included in the -o json output
# Disruption and scaling
kubectl get pdb,hpa --all-namespaces -o json
# Networking
kubectl get networkpolicies,services,ingresses --all-namespaces -o json
# Security
kubectl get serviceaccounts --all-namespaces -o json
kubectl get clusterrolebindings,rolebindings -o json
# Storage
kubectl get pvc,storageclass -o json
# Namespace labels (for PSA)
kubectl get namespaces -o json
# Events (recent issues)
kubectl get events --all-namespaces --sort-by='.lastTimestamp' -o jsonFor ECR image scanning (if images are from ECR):
bash
# For each unique ECR image found in workloads
aws ecr describe-image-scan-findings --repository-name {REPO} --image-id imageTag={TAG}
aws ecr describe-repositories --repository-names {REPO}
aws ecr get-lifecycle-policy --repository-name {REPO}Filter collected data to the assessment scope (namespaces/workloads from Step 1).
Step 6: Per-Dimension Assessment
For each check item from the research phase (Step 3), evaluate every in-scope workload:
| Status | Meaning |
|---|---|
| PASS | The workload configuration meets or exceeds the recommendation |
| FAIL | The workload configuration does not meet the recommendation |
| WARN | Cannot be fully verified, or partially meets the recommendation |
| N/A | The check does not apply (e.g., storage checks for stateless workloads) |
For each finding, record:
- Check item ID and name
- Status (PASS/FAIL/WARN/N/A)
- Actual value observed (not just "not configured")
- The specific workload(s) affected
- Version relevance notes (if any)
Step 7: Generate Report and Save to Local File
Generate a single comprehensive report using the template in
and write it directly to a local markdown file.
references/output-template.mdIMPORTANT — File Writing Rules:
- Use the Write/file tool (not bash heredoc/echo/cat) to create the report file
- If the report is too large for a single write, split into sections: write the file with the first half, then use an append/edit operation to add the remaining sections
- Do NOT output the full report content to the terminal
Use the following file naming convention:
bash
TIMESTAMP=$(date +%Y-%m-%d-%H-%M-%S)
CLUSTER_SLUG=$(echo "{CLUSTER_NAME}" | tr '[:upper:]' '[:lower:]' | tr ' :/' '-')Assessment Report — see
references/output-template.md- Full cluster overview
- Compliance scorecard with rating scale, top 3 priorities, and quick stats
- Dimension-by-dimension assessment tables
- Per-workload detail section
- Critical issues and prioritized remediation
- Data sources and reference links
- Save to:
${TIMESTAMP}-${CLUSTER_SLUG}-assessment-report.md
If infrastructure layer results exist from Step 4, merge them into the report.
After saving, print a brief summary to the terminal listing only:
- The file path of the generated report
- Overall compliance score
- Number of PASS / FAIL / WARN findings
Step 8: Remediation Guidance & Next Steps
After saving the reports, offer:
- "I can help fix specific FAIL items — which ones would you like to address?"
- "I can re-run the assessment after remediation to verify improvements."
For Critical Issues (FAIL + High priority), provide:
- Specific remediation commands or manifest changes
- Whether the fix requires workload restart or is in-place
- Impact assessment of the change
Important Guidelines
- Be comprehensive: The value of this skill is thoroughness. Better to include a check and mark it N/A than to miss it.
- Always cite sources: Every check item must reference its source (EKS Best Practices Guide, K8s official docs, etc.).
- Sequential MCP queries: All context7 and aws-knowledge-mcp requests must be sequential. kubectl commands can be parallel.
- Rate limit protection: Wait 5s and retry once on "Too many requests". Skip on second failure.
- Version awareness: Always filter checks by detected K8s/EKS version. Never recommend features unavailable in the cluster's version.
- Actual values in findings: Always report what was observed, not just "not configured".
Good: "— container has no memory request" Bad: "Memory request missing"
resources.requests.memory: not set - Per-workload granularity: Report findings at the individual Deployment/StatefulSet level, not just cluster-wide summaries.
- Exclude system namespaces by default: Skip ,
kube-system,kube-publicunless the user explicitly includes them.kube-node-lease - Respect language: Output in the same language as the user's conversation.
- Infrastructure vs workload boundary: Never duplicate checks from . This skill handles ONLY what requires kubectl/in-cluster access.
aws-best-practice-research