【发布时间】:2021-05-08 00:10:36
【问题描述】:
我正在尝试使用 all-in-one.yaml 文件安装 Elastic Cloud on Kubernetes (ECK) Kubernetes 操作符,按照教程:https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-install-all-in-one.html 但我收到一个错误:
来自服务器的错误:创建“https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml”时出错:服务器响应状态码 413 但未返回更多信息(发布 customresourcedefinitions.apiextensions.k8s.io)
我对如何继续解决这个问题有点迷茫......
命令:
kubectl apply -f https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml --insecure-skip-tls-verify
完整的日志:
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)
更新 1:
运行命令(使用windows powershell):
curl https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml | kubectl apply --insecure-skip-tls-verify -f-
我明白了:
error: error parsing STDIN: error converting YAML to JSON: yaml: line 7: mapping values are not allowed in this context
更新 2:
当前版本:
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"}
【问题讨论】:
-
你为什么使用
--insecure-skip-tls-verify?你在使用某种代理吗? 413 听起来可能有限制。 -
我正在使用
--insecure-skip-tls-verify,因为证书存在一些问题并且没有标志我会收到安全错误。其他命令有效。我不知道什么是限制,什么超出了限制? -
如果你这样做
curl https://download.elastic.co/downloads/eck/1.3.1/all-in-one.yaml | kubectl apply -f-会发生什么?你能在浏览器中打开这个 yaml 吗?你在哪里运行这个?你在使用一些公司网络吗? -
我可以在浏览器中打开它,从日志中可以看到部分应用了 yaml。这不是公司网络,我是通过互联网运行的。我也尝试通过 rancher kubectl 运行这个命令。
标签: elasticsearch kubernetes kubectl kubernetes-operator