• frezesK零S

    SuperGodK

    你看下是不是在 kubesphere-system 空间下有服务没有就绪呢?

      我这边一天一夜了,还是安装中

      • frezesK零S

        saowu

        你看下集群节点是不是没有ntp, 导致节点时间不同步,进而导致扩展状态无法有效更新?
        后端服务已经正常部署了,安装其实已经完成了,可能安装状态没更新。
        当前这个版本扩展组件安装时间校验比较严谨,如ks-apiserver/ks-controller-manager 的时间与 helm-install-whizard-telemery-xxx 的时间不能差, 而这个时间跟节点时间有关。

        先处理节点时间,保证集群时间一致。然后,可以将扩展组件卸载重新安装(kubectl delete installplan whizard-telemetry) 或 编辑cr触发更新(kubectl edit installplan whizard-telemetry, 移除 status.state: Installiing, 触发更新)

          frezes 好我试试,我其实重新安装了ks-core,还是遇到这个问题

          frezes

          安装whizard-telemetry和devops都卡住,尝试过了您的建议,但是没效果

          • 已编辑

          我尝试同步一下时钟试试

          frezes 已解决,看来时间确实要求严格

          frezes

          再求助大佬一个问题,启用日志系统后,只能看到host集群日志,看不到成员集群日志呢

          日志插件需要配置opensearch的地址,默认的是svc的地址,改成nodeport的地址,你opensearch在host集群的话,member写不过去的

            NullFox

            我看着opensearch在每个集群都部署了,竟然都写到host集群吗

            要是每个集群都部署opensearch,可以写入到对应opensearch,但要修改平台服务的配置,不然查询不到,平台服务只在host上安装,需要配置查询的opensearch地址,具体的看平台服务文档吧

              • 已编辑

              NullFox

              以下配置不好使

                  logging:
                    enable: true
                    servers:
                      - elasticsearch:
                          endpoints:
                            - https://opensearch-cluster-data.kubesphere-logging-system:9200
                          version: opensearchv2
                          indexPrefix: "{{ .cluster }}-{{ .kubernetes.namespace_name }}-logs"
                          timestring: "%Y.%m.%d"
                          basicAuth: true
                          username: admin
                          password: admin
                      - elasticsearch:
                          cluster:
                          - wh-member
                          endpoints:
                            - https://192.168.111.34:30920
                          version: opensearchv2
                          indexPrefix: "{{ .cluster }}-{{ .kubernetes.namespace_name }}-logs"
                          timestring: "%Y.%m.%d"
                          basicAuth: true
                          username: admin
                          password: admin

              参考文档

              https://kubesphere.io/zh/docs/v4.1/11-use-extensions/05-observability-platform/02-logging/01-config/

              https://kubesphere.io/zh/docs/v4.1/11-use-extensions/05-observability-platform/01-platform-services/01-intro/

              检查一下logging插件里面的配置和这里的配置对应上没有,logging的配置是写入配置,平台服务的配置是查询配置

                • 已编辑

                NullFox

                平台配置

                global:
                  ## Global image registry to use if it needs to be overriden for some specific use cases (e.g local registries, custom images, ...)
                  ##
                  imageRegistry: ""
                
                  ## Reference to one or more secrets to be used when pulling images
                  ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
                  ##
                  imagePullSecrets: []
                  # - name: "image-pull-secret"
                  # or
                  # - "image-pull-secret"
                  nodeSelector: {}
                
                whizard-telemetry:
                  config:
                    monitoring:
                      enabled: true
                      kind: 0
                      endpoint: http://prometheus-k8s.kubesphere-monitoring-system.svc:9090
                    notification:
                      endpoint: http://notification-manager-svc.kubesphere-monitoring-system.svc:19093
                    events:
                      enable: true
                      servers:
                        - elasticsearch:
                            endpoints:
                              - https://opensearch-cluster-data.kubesphere-logging-system:9200
                            version: opensearchv2
                            indexPrefix: "{{ .cluster }}-events"
                            timestring: "%Y.%m.%d"
                            basicAuth: true
                            username: admin
                            password: admin
                        - elasticsearch:
                            cluster:
                            - wh-member
                            endpoints:
                              - https://192.168.217.35:30920
                            version: opensearchv2
                            indexPrefix: "{{ .cluster }}-events"
                            timestring: "%Y.%m.%d"
                            basicAuth: true
                            username: admin
                            password: admin
                        - elasticsearch:
                            cluster:
                            - bj-member
                            endpoints:
                              - https://10.21.3.7:30920
                            version: opensearchv2
                            indexPrefix: "{{ .cluster }}-events"
                            timestring: "%Y.%m.%d"
                            basicAuth: true
                            username: admin
                            password: admin
                    logging:
                      enable: true
                      servers:
                        - elasticsearch:
                            endpoints:
                              - https://opensearch-cluster-data.kubesphere-logging-system:9200
                            version: opensearchv2
                            indexPrefix: "{{ .cluster }}-{{ .kubernetes.namespace_name }}-logs"
                            timestring: "%Y.%m.%d"
                            basicAuth: true
                            username: admin
                            password: admin
                        - elasticsearch:
                            cluster:
                            - wh-member
                            endpoints:
                              - https://192.168.217.35:31555
                            version: opensearchv2
                            indexPrefix: "{{ .cluster }}-{{ .kubernetes.namespace_name }}-logs"
                            timestring: "%Y.%m.%d"
                            basicAuth: true
                            username: admin
                            password: admin
                        - elasticsearch:
                            cluster:
                            - bj-member
                            endpoints:
                              - https://10.21.3.7:30920
                            version: opensearchv2
                            indexPrefix: "{{ .cluster }}-{{ .kubernetes.namespace_name }}-logs"
                            timestring: "%Y.%m.%d"
                            basicAuth: true
                            username: admin
                            password: admin

                logging配

                global:
                  imageRegistry: ""
                  nodeSelector: {}
                  imagePullSecrets: []
                  clusterInfo: {}
                logsidecar-injector:
                  enabled: true
                  sidecar:
                    sidecarType: vector
                  resources:
                    limits:
                      cpu: 100m
                      memory: 100Mi
                    requests:
                      cpu: 10m
                      memory: 10Mi
                  configReloader:
                    resources:
                      limits:
                        cpu: 100m
                        memory: 100Mi
                      requests:
                        cpu: 10m
                        memory: 10Mi
                  affinity: {}
                  tolerations: []
                  nodeSelector: {}
                
                vector-logging:
                  calico:
                    enabled: true
                    logPath:
                    - "/var/log/calico/cni/cni*.log"
                
                  filter:
                    extraLabelSelector: "app.kubernetes.io/name!=kube-events-exporter"
                    extraNamespaceLabelSelector: ""
                    # When includeNamespaces and excludeNamespaces are set at the same time, only excludeNamespaces will take effect.
                    includeNamespaces: []
                    excludeNamespaces: []
                
                  sinks:
                    loki:
                      # Create loki sink or not
                      enabled: false
                        # Configurations for the loki sink, more info for https://vector.dev/docs/reference/configuration/sinks/loki/
                      # Usually users needn't change the following loki sink config, and the default sinks in secret "kubesphere-logging-system/vector-sinks" created by the WhizardTelemetry Data Pipeline extension will be used.
                      metadata:
                #        endpoint: http://<loki-gateway-ip>:<loki-gateway-port>
                #        path: /loki/api/v1/push
                #        encoding:
                #          codec: json
                        tenant_id: whizard-logs-ks
                #        out_of_order_action: accept
                #        remove_timestamp: false
                #        batch:
                #          max_bytes: 10000000
                #          timeout_secs: 5
                #        buffer:
                #          max_events: 10000
                #        request:
                #          retry_attempts: 10
                      labels:
                        - cluster="{{ .cluster }}"
                        - node="{{ .kubernetes.node_name }}"
                        - workspace="{{ .kubernetes.workspace }}"
                        - namespace="{{ .kubernetes.namespace_name }}"
                        - pod="{{ .kubernetes.pod_name }}"
                        - container="{{ .kubernetes.container_name }}"
                    opensearch:
                      # Create opensearch sink or not
                      enabled: true
                      # The index to store the logs, will be {{ prefix }}-{{ timestring }}
                      index:
                        # The prefix of index, supports template syntax.
                        prefix: "{{ .cluster }}-{{ .kubernetes.namespace_name }}-logs"
                        # Timestring is parsed from strftime patterns, like %Y.%m.%d. Used to distribute logs into different indexes according to time.
                        timestring: "%Y.%m.%d"
                      # Configurations for the opensearch sink, more info for https://vector.dev/docs/reference/configuration/sinks/elasticsearch/
                      # Usually users needn't change the following OpenSearch sink config, and the default sinks in secret "kubesphere-logging-system/vector-sinks" created by the WhizardTelemetry Data Pipeline extension will be used.
                  #    metadata:
                  #      api_version: v8
                  #      auth:
                  #        strategy: basic
                  #        user: admin
                  #        password: admin
                  #      batch:
                  #        timeout_secs: 5
                  #      buffer:
                  #        max_events: 10000
                  #      endpoints:
                  #        - https://opensearch-cluster-data.kubesphere-logging-system:9200
                  #      tls:
                  #        verify_certificate: false

                opensearch-dashboards显示成员集群的opensearch已经有数据了

                但是host集群无法看到