外接 ES 开启了 TLS 和 密码验证,如何修改配置?
benjaminhuoK零S
现在还是可以收集到带验证的xpack, ks UI 上还不能从 xpack 里查
我们看看什么时候可以支持 @wanjunlei
WwanjunleiK零S
计划在3.1添加对xpack的支持
3.0外接ES只需要修改fluent-bit.conf中的配置嘛?是不是意味着ks-install修改了会覆盖这个配置
Ccsz711K零S
zhu733756 可否详细些?ks-installer里面关于es配置只看到了(因为ks3.1自带的es版本太低,所以在其他ns里另搭了一个es)
·es:
elasticsearchDataReplicas: 1
elasticsearchDataVolumeSize: 20Gi
elasticsearchMasterReplicas: 1
elasticsearchMasterVolumeSize: 4Gi
elkPrefix: logstash
externalElasticsearchPort: 9200
externalElasticsearchUrl: elasticsearch-master.ks-logging-system
logMaxAge: 7
- 已编辑
设置的外部url和端口正确吗?
如果还是无法解决,可以执行下面语句检查添加的账户密码信息
kubectl -n kubesphere-logging-system get outputs.logging.kubesphere.io es -oyaml
kubectl -n kubesphere-system get cm kubesphere-config -oyaml
zhu733756 非常感谢您的回复。
1、执行 kubectl -n kubesphere-logging-system get outputs.logging.kubesphere.io es -oyaml
apiVersion: logging.kubesphere.io/v1alpha2
kind: Output
metadata:
......
spec:
es:
host: 10.1.7.51
logstashFormat: true
logstashPrefix: ks-ks-log
port: 30402
timeKey: '@timestamp'
matchRegex: (?:kube|service)\.(.*)
端口和地址都正确,但是缺少账号密码的信息。
fluent-bit-w9bkg,的日志报错则是说,没有提供账号密码。
[2021/07/09 08:49:24] [error] [output:es:es.2] HTTP status=401 URI=/_bulk, response:
{"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials for REST request [/_bulk]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security_exception","reason":"missing authentication credentials for REST request [/_bulk]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}
2、执行 kubectl -n kubesphere-system get cm kubesphere-config -oyaml
这是我的有用输出
kubesphere.yaml: |
authentication:
authenticateRateLimiterMaxTries: 10
authenticateRateLimiterDuration: 10m0s
loginHistoryRetentionPeriod: 168h
maximumClockSkew: 10s
multipleLogin: True
kubectlImage: 192.168.101.30/devops/kubesphere/kubectl:v1.19.0
jwtSecret: "NdrdmdbcerddelxdsdndrR2ddEBzreV1"
network:
ippoolType: none
multicluster:
enable: true
agentImage: 192.168.101.30/devops/kubesphere/tower:v0.2.0
proxyPublishService: tower.kubesphere-system.svc
monitoring:
endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
events:
host: http://10.1.7.51:30402
basicAuth: True
username: "elastic"
password: "elastic"
indexPrefix: ks-ks-events
auditing:
enable: true
host: http://10.1.7.51:30402
basicAuth: True
username: "elastic"
password: "elastic"
indexPrefix: ks-ks-auditing
alerting:
prometheusEndpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090
thanosRulerEndpoint: http://thanos-ruler-operated.kubesphere-monitoring-system.svc:10902
thanosRuleResourceLabels: thanosruler=thanos-ruler,role=thanos-alerting-rules
没有显示 logging 的账号密码信息,我不知道在哪个位置填。
WwanjunleiK零S
output这样改
es:
HTTP_USER:
HTTP_PASSwd:__
WwanjunleiK零S
你的这个config文件不完整啊,你重启下installer试试
NniutendoK零S
求助,更换xpack外置ES出现问题
背景:集群创建时,我先使用了内置ES。后需要改成带xpack的外置ES。
1.我在cc中增加了如下配置
2.打开集群设置的日志收集器发现并没有发生变化,还是内置ES地址
3.随即我删除了这个收集器,打算自己新增,但是发现并没有密码框
4.不输入账号密码的情况下,fluent-bit.conf配置文件中没有密码 ,fluent-bit pod报错未认证
5.随即我修改了output,增加了账号密码
然后:fluent-bit.conf依然没有增加账号密码的配置,并且我按照fluent手册中手动加入HTTP_User & HTTP_Passwd
更新后配置文件自动还原。
请问我该进行什么操作呢?