CKA Certification Course - Certified Kubernetes Administrator

2025 Updates Kustomize Basics

Kustomize ApiVersion Kind

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.

Note

Explicitly specifying apiVersion and kind promotes better maintainability and compatibility across different environments and Kustomize versions.

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

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

Watch Video

Watch video content

Previous
Kustomize Output