3

I am trying to install the Elastic Cloud on Kubernetes (ECK) Kubernetes operator with the all-in-one.yaml file, as per the tutorial: https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-install-all-in-one.html But I am getting an error:

Error from server: error when creating "https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml": the server responded with the status code 413 but did not return more information (post customresourcedefinitions.apiextensions.k8s.io)

I am a bit lost as to how to proceed solving this issue...

Command:

kubectl apply -f https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml  --insecure-skip-tls-verify 

complete log:

namespace/elastic-system unchanged
serviceaccount/elastic-operator unchanged
secret/elastic-webhook-server-cert unchanged
configmap/elastic-operator unchanged
customresourcedefinition.apiextensions.k8s.io/apmservers.apm.k8s.elastic.co configured
customresourcedefinition.apiextensions.k8s.io/beats.beat.k8s.elastic.co configured
customresourcedefinition.apiextensions.k8s.io/enterprisesearches.enterprisesearch.k8s.elastic.co configured
customresourcedefinition.apiextensions.k8s.io/kibanas.kibana.k8s.elastic.co configured
clusterrole.rbac.authorization.k8s.io/elastic-operator unchanged
clusterrole.rbac.authorization.k8s.io/elastic-operator-view unchanged
clusterrole.rbac.authorization.k8s.io/elastic-operator-edit unchanged
clusterrolebinding.rbac.authorization.k8s.io/elastic-operator unchanged
service/elastic-webhook-server unchanged
statefulset.apps/elastic-operator configured
validatingwebhookconfiguration.admissionregistration.k8s.io/elastic-webhook.k8s.elastic.co configured
Error from server: error when creating "https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml": the server responded with the status code 413 but did not return more information (post customresourcedefinitions.apiextensions.k8s.io)

UPDATE 1:

Running the command (with windows powershell):

curl https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml | kubectl apply  --insecure-skip-tls-verify -f-

I get:

error: error parsing STDIN: error converting YAML to JSON: yaml: line 7: mapping values are not allowed in this context

UPDATE 2:

current versions:

Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.6", GitCommit:"dff82dc0de47299ab66c83c626e08b245ab19037", GitTreeState:"clean", BuildDate:"2020-07-15T16:51:04Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
Lev
  • 583
  • 3
  • 15
  • Why are you using `--insecure-skip-tls-verify `? Are you using some sort of proxy? 413 sounds like there might be a limit there. – acid_fuji Feb 04 '21 at 08:41
  • I'm using `--insecure-skip-tls-verify` because there is some issue with certificates and without the flag I get a security error. Other commands work. I can't figure out what's is the limit and what goes over the limit? – Lev Feb 04 '21 at 10:33
  • What is happening if you do `curl https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml | kubectl apply -f-` ? Are you able to open this yaml in your browser? Where are you running this? Are you using some corporate network? – acid_fuji Feb 04 '21 at 10:41
  • I am able to open this in browser, the yaml is partially applied as you can see from the log. It's not a corporate network, I'm running this over the internet. I also tried to run this command through rancher kubectl. – Lev Feb 04 '21 at 10:52
  • I edited the question with the the result of the command. Running the command without the `--insecure-skip-tls-verify` flag I get the error `Unable to connect to the server: x509: certificate signed by unknown authority` – Lev Feb 04 '21 at 11:00
  • What's your kubectl version? – acid_fuji Feb 04 '21 at 11:51
  • Version 1.19.3, added it to the question as well – Lev Feb 04 '21 at 13:09
  • 1
    Check if this helps. https://stackoverflow.com/questions/49918313/413-error-with-kubernetes-and-nginx-ingress-controller and https://www.digitalocean.com/community/questions/413-request-entity-too-large-nginx – Juan Carlos Alafita Feb 06 '21 at 01:16
  • @JuanCarlosAlafita thank you! Setting proxy-body-size in the system nginx-configuration config map did the trick! – Lev Feb 07 '21 at 19:46

1 Answers1

1

I managed to fix the issue by setting the proxy-body-size config map value in the system nginx config map to 8m.

proxy-body-size=8m
Namespace=ingress-nginx
Config Map=nginx-configuration

thank you @juan-carlos-alafita for providing the relevant links!

413 error with Kubernetes and Nginx ingress controller

https://www.digitalocean.com/community/questions/413-request-entity-too-large-nginx

Lev
  • 583
  • 3
  • 15