< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />
Last updated:

    Kube AI Hub Log Dashboard

    As an open-source, application-centric container platform, Kube AI Hub v3.4 uses OpenSearch instead of ElasticSearch as the backend storage for logs, events, and auditing. By default, you can use the built-in query tool in the lower-right corner of the Kube AI Hub console to retrieve logs and query events and auditing records.

    If you want an experience similar to Kibana, such as log chart drawing, you can enable OpenSearch Dashboard.

    Enable Log Dashboard Before Kube AI Hub Installation

    Install on Linux

    When installing Kube AI Hub with multiple nodes on Linux, you should create a configuration file that lists all Kube AI Hub components.

    1. When you Install Kube AI Hub on Linux, create a file config-sample.yaml and edit it by executing the following command:

      vi config-sample.yaml
      
    2. Before enabling the OpenSearch Dashboard, you need to enable components logging, opensearch, and events or auditing. In this example, enable events as follows:

      opensearch:
        basicAuth:
          enabled: true
          password: admin
          username: admin
        dashboard:
          enabled: true       # Change "false" to "true".
        enabled: true         # Change "false" to "true".
        externalOpensearchHost: ""
        externalOpensearchPort: ""
        logMaxAge: 7
        opensearchPrefix: whizard 
      
      logging:
        enabled: true   # Change "false" to "true".
        logsidecar:
          enabled: true
          replicas: 2
      
        events:
          enabled: true  # Change "false" to "true".
          ruler:
            enabled: true
            replicas: 2
      
    3. Execute the following command to create the cluster using this configuration file:

      ./kk create cluster -f config-sample.yaml
      

    Install on Kubernetes

    When you Install Kube AI Hub on Kubernetes, you need to enable the relevant components in the cluster-configuration.yaml file.

    1. Download the cluster-configuration.yaml file and edit it using the following command:

      vi cluster-configuration.yaml
      
    2. Before enabling the OpenSearch Dashboard, you need to enable components logging, opensearch, and events or auditing. In this example, enable events as follows:

      opensearch:
        basicAuth:
          enabled: true
          password: admin
          username: admin
        dashboard:
          enabled: true       # Change "false" to "true".
        enabled: true         # Change "false" to "true".
        externalOpensearchHost: ""
        externalOpensearchPort: ""
        logMaxAge: 7
        opensearchPrefix: whizard 
      
      logging:
        enabled: true   # Change "false" to "true".
        logsidecar:
          enabled: true
          replicas: 2
      
        events:
          enabled: true  # Change "false" to "true".
          ruler:
            enabled: true
            replicas: 2
      
    3. Execute the following command to start installation:

      kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.4.1/kubesphere-installer.yaml
      
      kubectl apply -f cluster-configuration.yaml
      

    Enable Log Dashboard After Kube AI Hub Installation

    1. Log in to the console as the admin user, click Platform in the upper-left corner, and select Cluster Management.

    2. Click CRDs, enter clusterconfiguration in the search bar, and click the search result to view its detail page.

      Info

      Custom Resource Definitions (CRDs) allow users to create a new resource type without adding an additional API server. Users can use these custom resources just like other native Kubernetes objects.
    3. Under Custom Resources, click the edit icon on the right side of ks-installer and select Edit YAML.

    4. In the YAML file, edit as follows and click OK in the lower-right corner to save the configuration.

      opensearch:
        basicAuth:
          enabled: true
          password: admin
          username: admin
        dashboard:
          enabled: true       # Change "false" to "true".
        enabled: true         # Change "false" to "true".
        externalOpensearchHost: ""
        externalOpensearchPort: ""
        logMaxAge: 7
        opensearchPrefix: whizard 
      
      logging:
        enabled: true   # Change "false" to "true".
        logsidecar:
          enabled: true
          replicas: 2
      
        events:
          enabled: true  # Change "false" to "true".
          ruler:
            enabled: true
            replicas: 2
      
    5. Check the installation process in kubectl by executing the following command:

      kubectl logs -n kubesphere-system $(kubectl get pod -n kubesphere-system -l 'app in (ks-install, ks-installer)' -o jsonpath='{.items[0].metadata.name}') -f
      

      Note

      You can find the kubectl tool by clicking the terminal icon in the lower-right corner of the console.

    Verify Component Installation

    After logging in to the console, navigate to Platform Management → Cluster Management → Service Components. You should see the opensearch-dashboards service listed and running.

    Expose port 5601 of the OpenSearch Dashboard service via NodePort or Ingress to make it accessible from your network.