Skip to content

AiMLops Project 4.0 Testing and finalization

Yanli Jia edited this page May 2, 2025 · 2 revisions

Troubleshooting Kustomize File Naming Case Sensitivity

Problem Description

We encountered an issue where the Kubernetes/kustomize CLI failed to recognize a Kustomization.yaml file (with a capital "K").

The specific behavior observed was that Kustomization.yaml was correctly recognized on macOS systems, but not on Linux systems. This discrepancy is due to differences in how these operating systems handle file name case sensitivity.

Cause: Operating System Case Sensitivity

The root cause lies in the default file system behavior of macOS and Linux:

  • macOS: By default, its file systems (HFS+ or APFS) are case-insensitive but case-preserving. This means the system treats Kustomization.yaml and kustomization.yaml as the same file, even though it remembers the original capitalization.
  • Linux: Most Linux file systems (like ext4) are case-sensitive. This means Kustomization.yaml and kustomization.yaml are treated as two distinct and separate files.

Impact on kustomize CLI

The kustomize CLI adheres to a convention and expects the configuration file to be named kustomization.yaml (all lowercase) by default.

When running kustomize on a case-sensitive system like Linux, if the file is named Kustomization.yaml (capital "K"), the CLI will not find it automatically, leading to errors like the following:

error: unable to find one of 'kustomization.yaml', 'kustomization.yml' or 'Kustomization' in directory '/home/ubuntu/test1/oss-mlops-platform/deployment/kubeflow/manifests/common/cert-manager/cert-manager/overlay/letsencrypt'
WARNING: Failed to apply letsencrypt overlay with webhooks enabled

Solution

To ensure cross-platform compatibility and adherence to the kustomize convention, the recommended solution is to rename the file to use all lowercase letters.

Rename the file:

mv Kustomization.yaml kustomization.yaml

This ensures the kustomize CLI can find the configuration file reliably on both case-sensitive (Linux) and case-insensitive (macOS) systems.

Clone this wiki locally