> ## 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 ApiVersion and Kind in Kustomize for managing Kubernetes resources effectively.

When managing Kubernetes resources with Kustomize, your configuration is defined in a kustomization.yaml file. While the ApiVersion and Kind properties are technically optional—since Kustomize assigns default values—they are essential for maintaining stability, especially when updates might introduce breaking changes.

Below is an example of a properly configured kustomization.yaml file:

```yaml theme={null}
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Kubernetes resources to be managed by Kustomize
resources:
  - nginx-depl.yaml
  - nginx-service.yaml
# Customizations to be applied
commonLabels:
  company: KodeKloud
```

<Callout icon="lightbulb" color="#1CB2FE">
  Hardcoding the ApiVersion and Kind values is a best practice that helps ensure compatibility and prevents unexpected behavior as new versions of Kustomize are released.
</Callout>

For additional insights on using Kustomize with Kubernetes, visit the [Kubernetes Documentation](https://kubernetes.io/docs/).

<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>
