Skip to main content

KA-S002: Missing apiVersion Field

Error Schema

Why This Matters

Every Kubernetes resource must specify an apiVersion field that identifies the API group and version.

How to Fix

Add the apiVersion field for the resource type.

Before (incorrect)

kind: Deployment
metadata:
  name: my-app

After (correct)

apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-app

Rule Details

Rule Code
KA-S002
Severity
Error
Category
Schema

Related Rules