Create a components/ directory with a kustomization.yaml containing apiVersion: kustomize.config.k8s.io/v1alpha1; kind: Component
Inside the component, define resources (ConfigMap) and patches (e.g., a strategic merge patch that adds a sidecar container to Deployment specs)
Reference the component from each overlay's kustomization.yaml using the components: field: components: [../../components/sidecar]
In the component's patch, use a strategic merge patch targeting kind: Deployment with the sidecar under spec.template.spec.containers as an additional list entry
Build and verify a specific overlay: kustomize build overlays/staging | kubectl diff -f - to confirm the sidecar appears without altering other overlay-specific settings
Version the component separately from overlays so multiple teams can pin to a specific component tag via a remote URL in the components: field if needed
Known gotchas
Kustomize Components use apiVersion: kustomize.config.k8s.io/v1alpha1 (not v1beta1 used by older Kustomize installations); building with an older kustomize binary that does not support v1alpha1 Component will fail
A Component is applied after the base resources are loaded by the overlay; patches inside a Component cannot reference resources that exist only in other Components loaded in a different order
Strategic merge patches inside a Component use Kubernetes merge keys (e.g., container name) for list merging; if the base Deployment does not yet have a containers list, the patch may fail — ensure the base has at least one container defined
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp