title: kubectl apply -k throws Error: rawResources failed to read Resources: Load from path ../../base failed: '../../base' must be a file
body: <p>Can you please help me figure out why kubectl apply fails?
  When I try to run <code>kubectl apply -k k8s/overlays/dev</code> it fails with error message &quot;error: rawResources failed to read Resources: Load from path ../../base failed: '../../base' must be a file&quot;
  But if I run <code>kustomize build k8s/overlays/dev</code> it works fine.</p>
  <p>folder structure</p>
  <pre><code>|____k8s
  | |____overlays
  | | |____dev
  | | | |____kustomization.yaml
  | |____base
  | | |____deployment.yaml
  | | |____kustomization.yaml
  </code></pre>
  <p>k8s/base/deployment.yaml</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
  kind: Deployment
  metadata:
    name: my-app
  spec:
    replicas: 1
    template:
      spec:
        containers:
          - name: my-app
            image: my-app:v1
            ports:
              - containerPort: 8080
                protocol: TCP
  </code></pre>
  <p>k8s/base/kustomization.yaml</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: kustomize.config.k8s.io/v1beta1
  kind: Kustomization
  
  resources:
  - deployment.yaml
  
  commonLabels:
    app: my-app
  </code></pre>
  <p>k8s/overlays/dev/kustomization.yaml</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: kustomize.config.k8s.io/v1beta1
  kind: Kustomization
  
  resources:
  - ../../base
  
  </code></pre>