1

我正在使用 eck,每次安装时,eck 操作员都会设置一个新密码。可以将密码固定为恒定值吗?有人试过这个吗?

4

1 回答 1

2

您的秘密名称应类似于:{clusterName}-es-elastic-user

kubectl create secret generic my-cluster-es-elastic-user --from-literal=elastic=foobar

秘密/my-cluster-es-elastic-user 创建

$ cat <<'EOFTEST' | kubectl apply -f -
apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: my-cluster
spec:
  version: 7.1.0
  nodes:
  - nodeCount: 1
EOFTEST

elasticsearch.elasticsearch.k8s.elastic.co/my-cluster 已配置

another terminal:
$ kubectl port-forward service/my-cluster-es 9200:9200
$ curl -k -u elastic:foobar https://localhost:9200
{
  "name" : "testing-es-5ps8sl8sfn",
  "cluster_name" : "my-cluster",
  ...
  "tagline" : "You Know, for Search"
}

更多信息,您可以访问官方仓库:https ://github.com/elastic/cloud-on-k8s/issues/967#issuecomment-497636249

于 2020-04-23T04:40:53.670 回答