如何在kubernetes中获取Kibana(ECK)APM管理员的密码?

半兽人 发表于: 2020-12-04   最后更新时间: 2020-12-04 00:13:35   1,594 游览

我按照这个指南 https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-deploy-eck.html ,然后应用这个清单。

apiVersion: elasticsearch.k8s.elastic.co/v1
kind: Elasticsearch
metadata:
  name: elasticsearch
spec:
  version: 7.5.1
  nodeSets:
  - name: default
    count: 3
    config:
      node.master: true
      node.data: true
      node.ingest: true
      node.store.allow_mmap: false
---
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
  name: kibana
spec:
  version: 7.5.1
  count: 1
  elasticsearchRef:
    name: elasticsearch
---
apiVersion: apm.k8s.elastic.co/v1
kind: ApmServer
metadata:
  name: apm-server
spec:
  version: 7.5.1
  count: 1
  elasticsearchRef:
    name: "elasticsearch"
  config:
    apm-server:
      rum.enabled: true
      ilm.enabled: true
      rum.event_rate.limit: 300
      rum.event_rate.lru_size: 1000
      rum.allow_origins: ['']
      rum.library_pattern: "node_modules|bower_components|~"
      rum.exclude_from_grouping: "^/webpack"
      rum.source_mapping.enabled: true
      rum.source_mapping.cache.expiration: 5m
      rum.source_mapping.index_pattern: "apm--sourcemap*"
  http:
    service:
      spec:
        type: LoadBalancer
    tls:
      selfSignedCertificate:
        disabled: true

然后用port-forward kubectl port-forward pod/kibana-kb-5bb5bf69c9-5m5r5 5601,我试图登录到kibana,但我找不到kibana的密码,看看APM是正常工作......。那么,我如何获得密码来访问它? 它的密码是什么?

发表于 2020-12-04
¥1.0
kubectl get secret elasticsearch-es-elastic-user -o=jsonpath='{.data.elastic}' | base64 --decode; echo

可以使用以上命令来获取。

你的答案

查看kubernetes相关的其他问题或提一个您自己的问题