创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。

操作系统信息
虚拟机 Ubuntu22.04,8C/16G

Kubernetes版本信息
kubectl version 命令执行结果贴在下方

Client Version: v1.28.8

Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3

Server Version: v1.28.8

容器运行时
Client Version: v1.28.8

Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3

Server Version: v1.28.8

root@ksp-master-10:~# docker version

Client:

Version: 24.0.9

API version: 1.43

Go version: go1.20.13

Git commit: 2936816

Built: Thu Feb 1 00:47:46 2024

OS/Arch: linux/amd64

Context: default

Server: Docker Engine - Community

Engine:

Version: 24.0.9

API version: 1.43 (minimum version 1.12)

Go version: go1.20.13

Git commit: fca702d

Built: Thu Feb 1 00:49:16 2024

OS/Arch: linux/amd64

Experimental: false

containerd:

Version: v1.7.13

GitCommit: 7c3aca7a610df76212171d200ca3811ff6096eb8

runc:

Version: 1.1.12

GitCommit: v1.1.12-0-g51d5e946

docker-init:

Version: 0.19.0

GitCommit: de40ad0

KubeSphere版本信息
v3.4.1

问题是什么

容器日志查询功能报错:

NullFox

我是新手,配置文件我能找到,但需要检查什么内容,麻烦指导下

NullFox

使用的是opensearch,但配置中没有opensearch信息, 只有收集的信息

kind: ConfigMap

apiVersion: v1

metadata:

name: kubesphere-config

namespace: kubesphere-system

annotations:

kubectl.kubernetes.io/last-applied-configuration: >

{"apiVersion":"v1","data":{"kubesphere.yaml":"authentication:\n

authenticateRateLimiterMaxTries: 10\n authenticateRateLimiterDuration:

10m0s\n loginHistoryRetentionPeriod: 168h\n maximumClockSkew: 10s\n

multipleLogin: True\n kubectlImage:

images.jxkj.com/kubesphere/kubectl:v1.22.0\n jwtSecret:

\"XC38fVIGAXVUkbFzjyz5sdmB10U0gQ5P\"\n oauthOptions:\n clients:\n -

name: kubesphere\n secret: kubesphere\n redirectURIs:\n -

'*'\nldap:\n host: openldap.kubesphere-system.svc:389\n managerDN:

cn=admin,dc=kubesphere,dc=io\n managerPassword: admin\n userSearchBase:

ou=Users,dc=kubesphere,dc=io\n groupSearchBase:

ou=Groups,dc=kubesphere,dc=io\ns3:\n endpoint:

http://minio.kubesphere-system.svc:9000\n region: us-east-1\n

disableSSL: True\n forcePathStyle: True\n accessKeyID:

openpitrixminioaccesskey\n secretAccessKey: openpitrixminiosecretkey\n

bucket: s2i-binaries\nnetwork:\n enableNetworkPolicy: true\n ippoolType:

none\ndevops:\n host:

http://devops-jenkins.kubesphere-devops-system.svc/\n username: admin\n

password:

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQGt1YmVzcGhlcmUuaW8iLCJ1c2VybmFtZSI6ImFkbWluIiwidG9rZW5fdHlwZSI6InN0YXRpY190b2tlbiJ9.UopBPdCbsbHYpsiiAbsM5yi6FLAgw0uEZMheo4Y9Abg\n

maxConnections: 100\n endpoint:

http://devops-apiserver.kubesphere-devops-system:9090\nservicemesh:\n

istioPilotHost: http://istiod.istio-system.svc:8080/version\n

jaegerQueryHost: http://jaeger-query.istio-system.svc:16686\n

servicemeshPrometheusHost:

http://prometheus-k8s.kubesphere-monitoring-system.svc:9090\n

kialiQueryHost: http://kiali.istio-system:20001\nopenpitrix:\n s3:\n

endpoint: http://minio.kubesphere-system.svc:9000\n region:

us-east-1\n disableSSL: True\n forcePathStyle: True\n

accessKeyID: openpitrixminioaccesskey\n secretAccessKey:

openpitrixminiosecretkey\n bucket: app-store\nmulticluster:\n

clusterRole: none\nmonitoring:\n endpoint:

http://prometheus-operated.kubesphere-monitoring-system.svc:9090\n

enableGPUMonitoring: false\ngpu:\n kinds:\n - resourceName:

nvidia.com/gpu\n resourceType: GPU\n default: True\nnotification:\n

endpoint:

http://notification-manager-svc.kubesphere-monitoring-system.svc:19093\nlogging:\n

host:

https://opensearch-cluster-data.kubesphere-logging-system.svc:9200\n

basicAuth: True\n username: \"es\"\n password: \"Es@1234!\"\n

indexPrefix: ks-whizard-logging\nevents:\n host:

https://opensearch-cluster-data.kubesphere-logging-system.svc:9200\n

basicAuth: True\n username: \"es\"\n password: \"Es@1234!\"\n

indexPrefix: ks-whizard-events\nauditing:\n enable: true\n webhookURL:

https://kube-auditing-webhook-svc.kubesphere-logging-system.svc:6443/audit/webhook/event\n

host:

https://opensearch-cluster-data.kubesphere-logging-system.svc:9200\n

basicAuth: True\n username: \"es\"\n password: \"Es@1234!\"\n

indexPrefix: ks-whizard-auditing\nalerting:\n prometheusEndpoint:

http://prometheus-operated.kubesphere-monitoring-system.svc:9090\n

thanosRulerEndpoint:

http://thanos-ruler-operated.kubesphere-monitoring-system.svc:10902\n

thanosRuleResourceLabels:

thanos-ruler=kubesphere,role=alert-rules\n\nedgeruntime:\n endpoint:

http://edgeservice.kubeedge.svc/api/\n\nterminal:\n image:

images.jxkj.com/library/alpine:3.14\n timeout: 600\ngateway:\n

watchesPath: /var/helm-charts/watches.yaml\n repository:

images.jxkj.com/kubesphere/nginx-ingress-controller\n tag: v1.3.1\n

namespace:

kubesphere-controls-system\n"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"kubesphere-config","namespace":"kubesphere-system"}}

data:

kubesphere.yaml: |

authentication:

authenticateRateLimiterMaxTries: 10

authenticateRateLimiterDuration: 10m0s

loginHistoryRetentionPeriod: 168h

maximumClockSkew: 10s

multipleLogin: True

kubectlImage: images.jxkj.com/kubesphere/kubectl:v1.22.0

jwtSecret: "XC38fVIGAXVUkbFzjyz5sdmB10U0gQ5P"

oauthOptions:

clients:

- name: kubesphere

secret: kubesphere

redirectURIs:

- '*'

ldap:

host: openldap.kubesphere-system.svc:389

managerDN: cn=admin,dc=kubesphere,dc=io

managerPassword: admin

userSearchBase: ou=Users,dc=kubesphere,dc=io

groupSearchBase: ou=Groups,dc=kubesphere,dc=io

s3:

endpoint: http://minio.kubesphere-system.svc:9000

region: us-east-1

disableSSL: True

forcePathStyle: True

accessKeyID: openpitrixminioaccesskey

secretAccessKey: openpitrixminiosecretkey

bucket: s2i-binaries

network:

enableNetworkPolicy: true

ippoolType: none

devops:

host: http://devops-jenkins.kubesphere-devops-system.svc/

username: admin

password: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQGt1YmVzcGhlcmUuaW8iLCJ1c2VybmFtZSI6ImFkbWluIiwidG9rZW5fdHlwZSI6InN0YXRpY190b2tlbiJ9.UopBPdCbsbHYpsiiAbsM5yi6FLAgw0uEZMheo4Y9Abg

maxConnections: 100

endpoint: http://devops-apiserver.kubesphere-devops-system:9090

servicemesh:

istioPilotHost: http://istiod.istio-system.svc:8080/version

jaegerQueryHost: http://jaeger-query.istio-system.svc:16686

servicemeshPrometheusHost: http://prometheus-k8s.kubesphere-monitoring-system.svc:9090

kialiQueryHost: http://kiali.istio-system:20001

openpitrix:

s3:

endpoint: http://minio.kubesphere-system.svc:9000

region: us-east-1

disableSSL: True

forcePathStyle: True

accessKeyID: openpitrixminioaccesskey

secretAccessKey: openpitrixminiosecretkey

bucket: app-store

multicluster:

clusterRole: none

monitoring:

endpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090

enableGPUMonitoring: false

gpu:

kinds:

- resourceName: nvidia.com/gpu

resourceType: GPU

default: True

notification:

endpoint: http://notification-manager-svc.kubesphere-monitoring-system.svc:19093

logging:

host: https://opensearch-cluster-data.kubesphere-logging-system.svc:9200

basicAuth: True

username: "es"

password: "Es@1234!"

indexPrefix: ks-whizard-logging

events:

host: https://opensearch-cluster-data.kubesphere-logging-system.svc:9200

basicAuth: True

username: "es"

password: "Es@1234!"

indexPrefix: ks-whizard-events

auditing:

enable: true

webhookURL: https://kube-auditing-webhook-svc.kubesphere-logging-system.svc:6443/audit/webhook/event

host: https://opensearch-cluster-data.kubesphere-logging-system.svc:9200

basicAuth: True

username: "es"

password: "Es@1234!"

indexPrefix: ks-whizard-auditing

alerting:

prometheusEndpoint: http://prometheus-operated.kubesphere-monitoring-system.svc:9090

thanosRulerEndpoint: http://thanos-ruler-operated.kubesphere-monitoring-system.svc:10902

thanosRuleResourceLabels: thanos-ruler=kubesphere,role=alert-rules

edgeruntime:

endpoint: http://edgeservice.kubeedge.svc/api/

terminal:

image: images.jxkj.com/library/alpine:3.14

timeout: 600

gateway:

watchesPath: /var/helm-charts/watches.yaml

repository: images.jxkj.com/kubesphere/nginx-ingress-controller

tag: v1.3.1

namespace: kubesphere-controls-system

你将version指定为7试试,而且你这basicAuth应该是true不是True吧

    NullFox

    这个是默认生成的, 我改一下试试,多谢
    方便加个微信吗? hangz80

    看下opensearch的日志,这应该是opensearch出问题了

      NullFox

      我找到问题所在了, config-sample.yaml文件中, opensearch的账户密码只能是admin/admin 不能修改

      你检查fluentbit写入的opensearch配置了吗?你刚才弄的是查询的配置,看看logging的cr中资源output类型有没有问题

        fluentbit有写入opensearch的配置,如果不正确写不进去,那肯定查不到数据

          NullFox

          使用修改配置方式没有搞定,我重新部署集群搞定了,多谢