> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Kustomize ApiVersion Kind

> This article discusses the importance of explicitly declaring apiVersion and kind in Kustomization files for clarity and compatibility.

When working with a Kustomization file (kustomization.yaml), it's best practice to explicitly declare the `apiVersion` and `kind` properties. Although Kustomize provides default values if they are omitted, hardcoding these fields enhances clarity and safeguards against potential issues that may arise from future changes to default settings.

<Callout icon="lightbulb" color="#1CB2FE">
  Explicitly specifying `apiVersion` and `kind` promotes better maintainability and compatibility across different environments and Kustomize versions.
</Callout>

The example below demonstrates a kustomization.yaml file with the `apiVersion` and `kind` properties clearly defined:

```yaml theme={null}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

# Kubernetes resources managed by Kustomize
resources:
  - nginx-depl.yaml
  - nginx-service.yaml

# Customizations to be applied
commonLabels:
  company: KodeKloud
```

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/cka-certification-course-certified-kubernetes-administrator/module/031e84b8-bcbc-4f39-94d6-66d93b05bddc/lesson/0a9df343-8d0f-4db4-a85e-15945d53ef14" />
</CardGroup>
