Describe the bug
I'm getting the following error when I try to apply the helloworld example from examples/helloWorld:
$ kubectl apply -k $DEMO_HOME/base
error: json: unknown field "metadata"
Files that can reproduce the issue
Thes files from https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/examples/helloWorld/{configMap,deployment,kustomization,service}.yaml
Expected output
exit 0 with successful application
Actual output
error: json: unknown field "metadata"
Kustomize version
I'm using kubectl -k ... from Docker desktop on Windows with:
$ k version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.12", GitCommit:"7cd5e9086de8ae25d6a1514d0c87bac67ca4a481", GitTreeState:"clean", BuildDate:"2020-11-12T09:18:55Z", GoVersion:"go1.13.15", Compiler:"gc", Platform:"linux/amd64"}
Platform
Linux (Windows WSL)
Resolution
Change kustomization.yaml from:
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
metadata:
name: arbitrary
# Example configuration for the webserver
# at https://github.com/monopole/hello
commonLabels:
app: hello
resources:
- deployment.yaml
- service.yaml
- configMap.yaml
to
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
# Example configuration for the webserver
# at https://github.com/monopole/hello
commonLabels:
app: hello
resources:
- deployment.yaml
- service.yaml
- configMap.yaml
I'm posting the issue so that someone may update the kustomization.yaml if it's not an issue related to my own env (I'm not experimented enough with k8s/kustomize to say if that's the case).
Describe the bug
I'm getting the following error when I try to apply the helloworld example from
examples/helloWorld:Files that can reproduce the issue
Thes files from
https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/examples/helloWorld/{configMap,deployment,kustomization,service}.yamlExpected output
exit 0 with successful application
Actual output
Kustomize version
I'm using
kubectl -k ...from Docker desktop on Windows with:Platform
Linux (Windows WSL)
Resolution
Change
kustomization.yamlfrom:to
I'm posting the issue so that someone may update the
kustomization.yamlif it's not an issue related to my own env (I'm not experimented enough with k8s/kustomize to say if that's the case).