CKA mock exam 2 question 14, Calico installation failed

Hey, I tried to apply given manifest for base calico installation and got this error

$ k apply -f tigera-operator.yaml 
...
The CustomResourceDefinition "installations.operator.tigera.io" is invalid: metadata.annotations: Too long: may not be more than 262144 bytes

Are we supposed to fix it somewhere in the cluster to make it possible to apply this? This CRD is needed for the next part

$ k apply -f custom-resources.yaml 
apiserver.operator.tigera.io/default unchanged
error: resource mapping not found for name: "default" namespace: "" from "custom-resources.yaml": no matches for kind "Installation" in version "operator.tigera.io/v1"
ensure CRDs are installed first

Problem here is that the YAML supplied to you has an extremely long metadata annotations item, and it’s choking kubectl apply. The calico people should really fix this, and haven’t :frowning:

But fortunately, there’s a workaround. Just change “kubectl apply -f” to kubectl create -f", and it will successfully process the file.

1 Like

Ah, now I understand! So it’s just this annotation with last applied config