networkInstall Hook - Calico manifest apply error

I’m looking into using the “networkInstall” hook to setup Calico on my nodes. I have downloaded the following manifest:

curl https://docs.projectcalico.org/v3.8/manifests/calico.yaml -O

From: https://docs.projectcalico.org/v3.8/getting-started/kubernetes/installation/calico

When I run the manifest via a Hook pod, I get the following error message:

configmap/calico-config created
error: error validating "/var/lib/gravity/resources/manifests/calico.yaml": error validating data: [ValidationError(CustomResourceDefinition.status): missing required field "conditions" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus, ValidationError(CustomResourceDefinition.status): missing required field "storedVersions" in io.k8s.apiextensions-apiserver.pkg.apis.apiextensions.v1beta1.CustomResourceDefinitionStatus]; if you choose to ignore these errors, turn validation off with --validate=false

I need to use the flag --validate=false to get this to work. The exact command I’m running within the pod is:

/usr/local/bin/kubectl apply -f /var/lib/gravity/resources/manifests/calico.yaml

If I run this manifest manually from the host (not the Hook POD) I get none of the above errors and I don’t have to use --validate=false.

What gives? Is there some voodoo that the Hook is doing to break this, or am I missing something?

Thanks.

On a very surface level look, this appears to be due to CRD’s in the calico yaml not being up to date with kubernetes requirements introduced in kubernetes 1.11. It looks like a number of projects have run into similar issue, although my 2 second search didn’t uncover the underlying kubernetes change.

I think you’ll need to reach out to the calico folks.

Similar Issues: