I have certain resources where I only want to manage specific fields inside my code repository, and let the others remain unchanged.

I have the following kustomization.yaml:

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

namespace: ingress-nginx

  app: ingress-nginx-controller

  - path: metrics.yaml
      kind: Service
      name: ingress-nginx-metrics
  - path: config.yaml
      kind: ConfigMap
      name: ingress-nginx-controller

  disableNameSuffixHash: true

When I attempt to apply this with kubectl apply -k, I get error: no objects passed to apply. I'm assuming this is because I didn't define any resources? However I still feel like this should be allowed.

All I'm trying to accomplish is managing specific fields of a resource, without taking complete control over it. I just want to have code that sets/ensures specific fields while allowing the unset fields to remain the same.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.