Skip to content

Kubesphere Events installation fail #2283

@mohamed-rafraf

Description

@mohamed-rafraf

What is the issue

Kubesphere Events Plugin is failed in the installation when you don't enable opensearch or elasticsearch

How to reproduce the issue:

This is the cluster configuration file:

apiVersion: installer.kubesphere.io/v1alpha1
kind: ClusterConfiguration
metadata:
  name: ks-installer
  namespace: kubesphere-system
  labels:
    version: v3.4.1
spec:
  persistence:
    storageClass: ""        # If there is no default StorageClass in your cluster, you need to specify an existing StorageClass here.
  authentication:
    jwtSecret: ""         
  local_registry: ""      
  etcd:
    monitoring: false       # Enable or disable etcd monitoring dashboard installation. You have to create a Secret for etcd before you enable it.
    endpointIps: localhost  # etcd cluster EndpointIps. It can be a bunch of IPs here.
    port: 2379              # etcd port.
    tlsEnable: true
  common:
[...]
    es:   # Storage backend for logging, events and auditing.
      enabled: false
      logMaxAge: 7             # Log retention time in built-in Elasticsearch. It is 7 days by default.
      elkPrefix: logstash      # The string making up index names. The index name will be formatted as ks-<elk_prefix>-log.
      basicAuth:
        enabled: false
        username: ""
        password: ""
    opensearch:
      enabled: false
      logMaxAge: 7             # Log retention time in built-in Opensearch. It is 7 days by default.
      basicAuth:
        enabled: true
        username: "admin"
        password: "admin"
[...]
  events:                  # Provide a graphical web console for Kubernetes Events exporting, filtering and alerting in multi-tenant Kubernetes clusters.
    enabled: true         # Enable or disable the KubeSphere Events System.
    ruler:
      enabled: true
      replicas: 2
[...]

The Logs from ks-installer:

Collecting installation results ...


Task 'events' failed:
******************************************************************************************************************************************************
{
"counter": 80,
"created": "2024-07-05T13:55:03.683652",
"end_line": 83,
"event": "runner_on_failed",
"event_data": {
  "duration": 2.699977,
  "end": "2024-07-05T13:55:03.683359",
  "event_loop": null,
  "host": "localhost",
  "ignore_errors": null,
  "play": "localhost",
  "play_pattern": "localhost",
  "play_uuid": "8a9b8343-0f9b-55c6-d00c-000000000005",
  "playbook": "/kubesphere/playbooks/events.yaml",
  "playbook_uuid": "681d63a9-c4dc-44ae-a5cc-f2988bbf5620",
  "remote_addr": "127.0.0.1",
  "res": {
    "_ansible_no_log": false,
    "changed": true,
    "cmd": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/fluentbit-operator\n",
    "delta": "0:00:01.426265",
    "end": "2024-07-05 13:55:03.604192",
    "invocation": {
      "module_args": {
        "_raw_params": "/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/fluentbit-operator\n",
        "_uses_shell": true,
        "argv": null,
        "chdir": null,
        "creates": null,
        "executable": null,
        "removes": null,
        "stdin": null,
        "stdin_add_newline": true,
        "strip_empty_ends": true,
        "warn": true
      }
    },
    "msg": "non-zero return code",
    "rc": 1,
    "start": "2024-07-05 13:55:02.177927",
    "stderr": "error: error reading [/kubesphere/kubesphere/fluentbit-operator]: recognized file extensions are [.json .yaml .yml]",
    "stderr_lines": [
      "error: error reading [/kubesphere/kubesphere/fluentbit-operator]: recognized file extensions are [.json .yaml .yml]"
    ],
    "stdout": "",
    "stdout_lines": []
  },
  "resolved_action": "command",
  "role": "ks-events",
  "start": "2024-07-05T13:55:00.983382",
  "task": "ks-events | Apply fluentbit operator custom resources",
  "task_action": "command",
  "task_args": "",
  "task_path": "/kubesphere/installer/roles/ks-events/tasks/fluentbit-operator.yaml:46",
  "task_uuid": "8a9b8343-0f9b-55c6-d00c-00000000002a",
  "uuid": "87fa71af-aaa4-4885-a941-643a18ea1fd6"
},
"parent_uuid": "8a9b8343-0f9b-55c6-d00c-00000000002a",
"pid": 3338,
"runner_ident": "events",
"start_line": 82,
"stdout": "fatal: [localhost]: FAILED! => {\"changed\": true, \"cmd\": \"/usr/local/bin/kubectl apply -f /kubesphere/kubesphere/fluentbit-operator\\n\", \"delta\": \"0:00:01.426265\", \"end\": \"2024-07-05 13:55:03.604192\", \"msg\": \"non-zero return code\", \"rc\": 1, \"start\": \"2024-07-05 13:55:02.177927\", \"stderr\": \"error: error reading [/kubesphere/kubesphere/fluentbit-operator]: recognized file extensions are [.json .yaml .yml]\", \"stderr_lines\": [\"error: error reading [/kubesphere/kubesphere/fluentbit-operator]: recognized file extensions are [.json .yaml .yml]\"], \"stdout\": \"\", \"stdout_lines\": []}",
"uuid": "87fa71af-aaa4-4885-a941-643a18ea1fd6"
}
******************************************************************************************************************************************************

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions