koperator: Unable to apply the CRDs on k8s v1.20.12 (error 413)

Describe the bug I have a k8s cluster (v1.20.12). Trying to install the CRDs (v0.20.0) gives me error 413.

Steps to reproduce the issue: kubectl apply -f https://github.com/banzaicloud/koperator/releases/download/v0.20.0/kafka-operator.crds.yaml

Expected behavior All CRD’s should be applied without errors.

Screenshots

$ kubectl apply -f https://github.com/banzaicloud/koperator/releases/download/v0.20.0/kafka-operator.crds.yaml
customresourcedefinition.apiextensions.k8s.io/kafkausers.kafka.banzaicloud.io configured
customresourcedefinition.apiextensions.k8s.io/kafkatopics.kafka.banzaicloud.io configured
Error from server: error when creating "https://github.com/banzaicloud/koperator/releases/download/v0.20.0/kafka-operator.crds.yaml": the server responded with the status code 413 but did not return more information (post customresourcedefinitions.apiextensions.k8s.io)

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 19 (12 by maintainers)

Most upvoted comments

Yes, though a complete solution would be to use server-sideapplied everyvere where the CRD is deployed (docs, Helm charts)

@stoader Thanks for the suggestion! I will then close this issue and open a new issue to track the server-side apply for the CRDs as an enhancement to keep things cleaner

@stoader thanks for the info and based on the given info, I guess we can close this issue?

I just checked by deleteing the .status key space.

$ curl -sJL https://github.com/banzaicloud/koperator/releases/download/v0.20.0/kafka-operator.crds.yaml | yq e 'del(.status)' - | kubectl apply --server-side -f -
customresourcedefinition.apiextensions.k8s.io/kafkaclusters.kafka.banzaicloud.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/kafkausers.kafka.banzaicloud.io serverside-applied
customresourcedefinition.apiextensions.k8s.io/kafkatopics.kafka.banzaicloud.io serverside-applied

No errors or warnings.

@stoader Ok, so this means that install and upgrade is not going to be idempotent. Install = kubectl create, upgrade = kubectl replace.

Well I can confirm that running create/replace works and apply does not. Nothing that can be done from your side to fix this in the future?