Yolean/kubernetes-kafka

error validating "kafka/kustomization.yaml

spanningwings opened this issue · 5 comments

Hi,

When I did 'kubectl apply -f ./kafka', I got "error: error validating "kafka/kustomization.yaml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false"

Is this file useful?

Thanks,

Facing the same issue. Can anyone help us on the same ? Running on kubectl in GKE

Is this file useful?

Yes! I'm only just learning Kustomize (kubectl apply -k) but it already appears highly useful. I'll add some new PRs to really overuse it :) and then we can assess.

I found no other option than to place kustomization.yaml in each folder. One at the top level would defeat composability (see https://github.com/Yolean/kubernetes-kafka/tree/storagclass-kustomize/variants) and Kustomize won't allow resources from a parent folder.

I'd like it if kubernetes-kafka is still applyable as-is, without error messages. Any ideas towards that are welcome.

@solsson do you have any suggestion on how to fix the error / any workaround for the issue error: error validating "kafka/kustomization.yaml": error validating data: [apiVersion not set, kind not set]; if you choose to ignore these errors, turn validation off with --validate=false"

I think that upgrading to kubectl 1.14+ and applying a dummy kustomization is a decent workaround, but I have no real fix. As I wrote above I hope someone can point us towards an alternative.

I had a flash of insight :)