kubesphere / ks-installer

Install KubeSphere on existing Kubernetes cluster
https://kubesphere.io
Apache License 2.0
527 stars 744 forks source link

k8s 1.26.7 / ks-installer v3.4.0 gatekeeper error #2225

Open xingxiuyi opened 1 year ago

xingxiuyi commented 1 year ago

kubernate=1.26.7 and ks-installer v3.4.0

install gatekeeper error.

Task 'gatekeeper' failed:
******************************************************************************************************************************************************
{
  "counter": 30,
  "created": "2023-08-06T07:47:05.201829",
  "end_line": 30,
  "event": "runner_on_failed",
  "event_data": {
    "duration": 45.000653,
    "end": "2023-08-06T07:47:05.201467",
    "event_loop": null,
    "host": "localhost",
    "ignore_errors": null,
    "play": "localhost",
    "play_pattern": "localhost",
    "play_uuid": "b2447d83-acb1-708c-d54a-000000000005",
    "playbook": "/kubesphere/playbooks/gatekeeper.yaml",
    "playbook_uuid": "1da50de5-4fe8-4433-ab65-5f086096a974",
    "remote_addr": "127.0.0.1",
    "res": {
      "_ansible_no_log": false,
      "attempts": 3,
      "changed": true,
      "cmd": "/usr/local/bin/helm upgrade --install gatekeeper /kubesphere/kubesphere/gatekeeper --namespace gatekeeper-system --create-namespace -f /kubesphere/kubesphere/gatekeeper/custom-values-gatekeeper.yaml\n",
      "delta": "0:00:04.670750",
      "end": "2023-08-06 15:47:05.094943",
      "invocation": {
        "module_args": {
          "_raw_params": "/usr/local/bin/helm upgrade --install gatekeeper /kubesphere/kubesphere/gatekeeper --namespace gatekeeper-system --create-namespace -f /kubesphere/kubesphere/gatekeeper/custom-values-gatekeeper.yaml\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": "2023-08-06 15:47:00.424193",
      "stderr": "Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: \"gatekeeper-admin\" namespace: \"\" from \"\": no matches for kind \"PodSecurityPolicy\" in version \"policy/v1beta1\"\nensure CRDs are installed first, resource mapping not found for name: \"gatekeeper-controller-manager\" namespace: \"gatekeeper-system\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"\nensure CRDs are installed first]",
      "stderr_lines": [
        "Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: \"gatekeeper-admin\" namespace: \"\" from \"\": no matches for kind \"PodSecurityPolicy\" in version \"policy/v1beta1\"",
        "ensure CRDs are installed first, resource mapping not found for name: \"gatekeeper-controller-manager\" namespace: \"gatekeeper-system\" from \"\": no matches for kind \"PodDisruptionBudget\" in version \"policy/v1beta1\"",
        "ensure CRDs are installed first]"
      ],
      "stdout": "Release \"gatekeeper\" does not exist. Installing it now.",
      "stdout_lines": [
        "Release \"gatekeeper\" does not exist. Installing it now."
      ]
    },
    "resolved_action": "command",
    "role": "gatekeeper",
    "start": "2023-08-06T07:46:20.200814",
    "task": "GateKeeper | Installing GateKeeper",
    "task_action": "command",
    "task_args": "",
    "task_path": "/kubesphere/installer/roles/gatekeeper/tasks/main.yaml:14",
    "task_uuid": "b2447d83-acb1-708c-d54a-000000000018",
    "uuid": "c04b5503-71ae-49d7-90bc-1f2ce5af9af6"
  },
  "parent_uuid": "b2447d83-acb1-708c-d54a-000000000018",
  "pid": 51697,
  "runner_ident": "gatekeeper",
  "start_line": 29,
  "stdout": "fatal: [localhost]: FAILED! => {\"attempts\": 3, \"changed\": true, \"cmd\": \"/usr/local/bin/helm upgrade --install gatekeeper /kubesphere/kubesphere/gatekeeper --namespace gatekeeper-system --create-namespace -f /kubesphere/kubesphere/gatekeeper/custom-values-gatekeeper.yaml\\n\", \"delta\": \"0:00:04.670750\", \"end\": \"2023-08-06 15:47:05.094943\", \"msg\": \"non-zero return code\", \"rc\": 1, \"start\": \"2023-08-06 15:47:00.424193\", \"stderr\": \"Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: \\\"gatekeeper-admin\\\" namespace: \\\"\\\" from \\\"\\\": no matches for kind \\\"PodSecurityPolicy\\\" in version \\\"policy/v1beta1\\\"\\nensure CRDs are installed first, resource mapping not found for name: \\\"gatekeeper-controller-manager\\\" namespace: \\\"gatekeeper-system\\\" from \\\"\\\": no matches for kind \\\"PodDisruptionBudget\\\" in version \\\"policy/v1beta1\\\"\\nensure CRDs are installed first]\", \"stderr_lines\": [\"Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: \\\"gatekeeper-admin\\\" namespace: \\\"\\\" from \\\"\\\": no matches for kind \\\"PodSecurityPolicy\\\" in version \\\"policy/v1beta1\\\"\", \"ensure CRDs are installed first, resource mapping not found for name: \\\"gatekeeper-controller-manager\\\" namespace: \\\"gatekeeper-system\\\" from \\\"\\\": no matches for kind \\\"PodDisruptionBudget\\\" in version \\\"policy/v1beta1\\\"\", \"ensure CRDs are installed first]\"], \"stdout\": \"Release \\\"gatekeeper\\\" does not exist. Installing it now.\", \"stdout_lines\": [\"Release \\\"gatekeeper\\\" does not exist. Installing it now.\"]}",
  "uuid": "c04b5503-71ae-49d7-90bc-1f2ce5af9af6"
}
kisylike commented 5 months ago

解决了吗?我也遇到这个问题